Skip to content

Commit da4b70d

Browse files
committed
added (v)sscanf
1 parent dad4470 commit da4b70d

File tree

5 files changed

+830
-0
lines changed

5 files changed

+830
-0
lines changed

src/libc/include/stdio.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ int asprintf(char **__restrict p_buffer, const char *__restrict format, ...)
121121
int vasprintf(char **__restrict p_buffer, const char *__restrict format, va_list va)
122122
__attribute__((format(__printf__, 2, 0))) __attribute__((nonnull(1)));
123123

124+
int sscanf(const char *__restrict buffer, const char *__restrict format, ...)
125+
__attribute__((format(__scanf__, 2, 3)));
126+
127+
int vsscanf(const char *__restrict buffer, const char *__restrict format, va_list va)
128+
__attribute__((format(__scanf__, 2, 0)));
129+
124130
void perror(const char *str);
125131

126132
__END_DECLS
@@ -164,6 +170,8 @@ using ::fprintf;
164170
using ::vfprintf;
165171
using ::asprintf;
166172
using ::vasprintf;
173+
using ::sscanf;
174+
using ::vsscanf;
167175
using ::perror;
168176
} /* namespace std */
169177
#endif /* __cplusplus */

0 commit comments

Comments
 (0)