* sysdeps/alpha/fpu/libm-test-ulps: Update. * scripts/data/c++-types...
[glibc.git] / stdio-common / bug8.c
blob77bbfe3435bbae71cc4c2bff02a93e4522e25dcf
1 #include <stdio.h>
2 #include <string.h>
4 int
5 main(int argc, char *argv[])
7 char buf[100];
8 int point, x, y;
9 int status = 0;
11 sscanf("0x10 10", "%x %x", &x, &y);
12 sprintf(buf, "%d %d", x, y);
13 puts (buf);
14 status |= strcmp (buf, "16 16");
15 sscanf("P012349876", "P%1d%4d%4d", &point, &x, &y);
16 sprintf(buf, "%d %d %d", point, x, y);
17 status |= strcmp (buf, "0 1234 9876");
18 puts (buf);
19 sscanf("P112349876", "P%1d%4d%4d", &point, &x, &y);
20 sprintf(buf, "%d %d %d", point, x, y);
21 status |= strcmp (buf, "1 1234 9876");
22 puts (buf);
24 puts (status ? "Test failed" : "Test passed");
26 return status;