libc icon indicating copy to clipboard operation
libc copied to clipboard

Missing scanf family of functions

Open stefanct opened this issue 2 years ago • 4 comments

If there is no intention to add support for them, I think it should at least be documented as it is quite essential for parsing data in some applications. What's your stance on the issue? Is there any suggested workaround currently?

stefanct avatar Mar 06 '22 17:03 stefanct

I have no stance on these functions :). I haven't developed a system that has required them, and you are the first to ask. No technical or ideological reason.

phillipjohnston avatar Mar 06 '22 17:03 phillipjohnston

picolibc (newlib-nano) has full support. I only mention as an immediate solution - I assume you are here because you do not wish to use newlib.

phillipjohnston avatar Mar 06 '22 17:03 phillipjohnston

Looking over these functions, one blocker is that I do not actually support FILE or stdin/out/err in this library, so it would be gated on having a suitable solution for that.

Some of the functions, such as sscanf and vsscanf, look like they would be suitable for implementation, however.

phillipjohnston avatar Mar 06 '22 17:03 phillipjohnston

Yes, in this regard it is similar to some of the printf functions. sscanf is what I was after in this case. It's not a big deal for me and I can work around it.

stefanct avatar Mar 06 '22 17:03 stefanct