Thu Jun 27 02:49:28 1996 Ulrich Drepper <drepper@cygnus.com>
[glibc/history.git] / stdio-common / bug8.c
blob39a41855de3d8b9e52ea1f027a03e69e7674bec6
1 #include <stdio.h>
2 #include <string.h>
4 main()
6 char buf[100];
7 int point, x, y;
8 int status = 0;
10 sscanf("0x10 10", "%x %x", &x, &y);
11 sprintf(buf, "%d %d", x, y);
12 puts (buf);
13 status |= strcmp (buf, "16 16");
14 sscanf("P012349876", "P%1d%4d%4d", &point, &x, &y);
15 sprintf(buf, "%d %d %d", point, x, y);
16 status |= strcmp (buf, "0 1234 9876");
17 puts (buf);
18 sscanf("P112349876", "P%1d%4d%4d", &point, &x, &y);
19 sprintf(buf, "%d %d %d", point, x, y);
20 status |= strcmp (buf, "1 1234 9876");
21 puts (buf);
23 puts (status ? "Test failed" : "Test passed");
25 return status;