Skip to content

Commit 4685c87

Browse files
committed
added (v)sscanf
1 parent df22afa commit 4685c87

File tree

5 files changed

+831
-1
lines changed

5 files changed

+831
-1
lines changed

src/libc/include/stdio.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ int asprintf(char **__restrict p_buffer, const char *__restrict format, ...)
113113
int vasprintf(char **__restrict p_buffer, const char *__restrict format, va_list va)
114114
__attribute__((format(__printf__, 2, 0))) __attribute__((nonnull(1)));
115115

116+
int sscanf(const char *__restrict buffer, const char *__restrict format, ...)
117+
__attribute__((format(__scanf__, 2, 3)));
118+
119+
int vsscanf(const char *__restrict buffer, const char *__restrict format, va_list va)
120+
__attribute__((format(__scanf__, 2, 0)));
121+
116122
void perror(const char *str);
117123

118124
__END_DECLS
@@ -121,7 +127,7 @@ __END_DECLS
121127
namespace std {
122128
using ::size_t;
123129
using ::FILE;
124-
130+
125131
using ::fopen;
126132
using ::fclose;
127133
using ::fflush;
@@ -151,6 +157,8 @@ namespace std {
151157
using ::vfprintf;
152158
using ::asprintf;
153159
using ::vasprintf;
160+
using ::sscanf;
161+
using ::vsscanf;
154162
using ::perror;
155163
} /* namespace std */
156164
#endif /* __cplusplus */

0 commit comments

Comments
 (0)