summaryrefslogtreecommitdiff
path: root/src/stdio/sscanf_s.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-16 15:55:19 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-16 15:55:19 -0400
commite223e635cc53fa11e473cdbc864eb69a3da5f290 (patch)
treed481ca6fb0b7f4184f3ec259a6f9c37d76e56a26 /src/stdio/sscanf_s.c
parent700fbd205a1a428677876d322606b9a354221892 (diff)
add skeleton of symbols from C11 LIB_EXT1
Diffstat (limited to 'src/stdio/sscanf_s.c')
-rw-r--r--src/stdio/sscanf_s.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/stdio/sscanf_s.c b/src/stdio/sscanf_s.c
new file mode 100644
index 00000000..c91786f6
--- /dev/null
+++ b/src/stdio/sscanf_s.c
@@ -0,0 +1,32 @@
+#include "stdio.h"
+#include "stdarg.h"
+
+/** read formatted input from a string **/
+int sscanf_s(const char * restrict s, const char * restrict format, ...)
+{
+ __C_EXT(1, 201112L);
+ int retval;
+ va_list ap;
+ va_start(ap, format);
+ retval = vsscanf(s, format, ap);
+ va_end(ap);
+ return retval;
+}
+
+/***
+The fn(sscanf) function reads formatted input from the string arg(s). The
+format of arg(format) at the variadic arguments is the same as that for
+fn(scanf).
+***/
+
+/* UNSPECIFIED: ??? */
+/* UNDEFINED: ??? */
+/* IMPLEMENTATION: ??? */
+/* LOCALE: ??? */
+
+/* RETURN(EOF): an input failure occurred */
+/* RETURN: the number of input items assigned */
+
+/*
+CEXT1(201112)
+*/