(_hurd_intr_rpc_mach_msg): New declaration.
[glibc.git] / stdio-common / scanf4.c
blobb624b69d98bb731237743b4308b47301b1588496
1 #include <stdio.h>
3 int main(int arc, char *argv)
5 int n, res;
6 unsigned int val;
8 FILE *fp = fopen ("/dev/null", "r");
10 val = 0;
11 res = fscanf(fp, "%n", &val);
13 printf("Result of fscanf %%n = %d\n", res);
14 printf("Scanned format = %d\n", val);
16 res = fscanf(fp, "");
17 printf("Result of fscanf \"\" = %d\n", res);
18 if (res != 0)
19 abort ();
21 res = fscanf(fp, "BLURB");
22 printf("Result of fscanf \"BLURB\" = %d\n", res);
23 if (res >= 0)
24 abort ();
26 fclose (fp);
28 return 0;
29 return 0;