forget difference between big and small commands - obsolete with vm.
[minix.git] / lib / stdio / sscanf.c
blob6e1ad56c728e755e7cfc33dbe9db4f389c8ef1b9
1 /*
2 * sscanf - read formatted output from a string
3 */
4 /* $Header$ */
6 #include <stdio.h>
7 #include <stdarg.h>
8 #include <string.h>
9 #include "loc_incl.h"
11 int sscanf(const char *s, const char *format, ...)
13 va_list ap;
14 int retval;
15 FILE tmp_stream;
17 va_start(ap, format);
19 tmp_stream._fd = -1;
20 tmp_stream._flags = _IOREAD + _IONBF + _IOREADING;
21 tmp_stream._buf = (unsigned char *) s;
22 tmp_stream._ptr = (unsigned char *) s;
23 tmp_stream._count = strlen(s);
25 retval = _doscan(&tmp_stream, format, ap);
27 va_end(ap);
29 return retval;