cederom commented on code in PR #16544: URL: https://github.com/apache/nuttx/pull/16544#discussion_r2154321789
########## libs/libc/stream/lib_libvscanf.c: ########## @@ -1279,6 +1279,24 @@ int lib_vscanf(FAR struct lib_instream_s *stream, FAR int *lastc, return ret; } +/**************************************************************************** + * Name: lib_scanf + ****************************************************************************/ + +int lib_scanf(FAR struct lib_instream_s *stream, FAR int *lastc, Review Comment: This is a `...` wrapper for `lib_vscanf()` with `va_list ap` parameter, not quite ISO compliant [1] but aligns with current implementation :-P >#include <stdio.h> int scanf(const char * restrict format, ...); int fscanf(FILE * restrict stream, const char * restrict format, ...); int sscanf(const char * restrict str, const char * restrict format, ...); #include <stdarg.h> int vscanf(const char * restrict format, va_list ap); int vsscanf(const char * restrict str, const char * restrict format, va_list ap); int vfscanf(FILE * restrict stream, const char * restrict format, va_list ap); > The functions fscanf(), scanf(), sscanf(), vfscanf(), vscanf() and vsscanf() conform to ISO/IEC 9899:1999 ("ISO C99"). [1] https://man.freebsd.org/cgi/man.cgi?query=scanf&sektion=3 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org