xref: /plan9/sys/src/ape/lib/ap/stdio/sscanf.c (revision ff8c3af2f44d95267f67219afa20ba82ff6cf7e4)
1 /*
2  * pANS stdio -- sscanf
3  */
4 #include "iolib.h"
5 int sscanf(const char *s, const char *fmt, ...){
6 	int n;
7 	FILE *f=_IO_sopenr(s);
8 	va_list args;
9 	va_start(args, fmt);
10 	n=vfscanf(f, fmt, args);
11 	va_end(args);
12 	_IO_sclose(f);
13 	return n;
14 }
15