#include <u.h>
#include <libc.h>
#include <stdio.h>
void
main(int argc, char **argv)
{
char buf[512];
int np, n;
if(argc != 3)
sysfatal("Usage: testscanf pattern string");
np = 0;
n = sscanf(argv[2], argv[1], buf, &np);
print("sscanf(\"%s\", \"%s\", buf, &np) returns %d, np=%d\n", argv[2], argv[1], n, np);
exits(0);
}
|