2 #define _XOPEN_SOURCE 600
3 /* The following macro definitions are a hack. They word around disabling
4 the GNU extension while still using a few internal headers. */
5 #define u_char unsigned char
6 #define u_short unsigned short
7 #define u_int unsigned int
8 #define u_long unsigned long
17 printf ("test at line %d failed\n", __LINE__); \
28 if (sscanf (" 0.25s x", "%e%3c", &f
, c
) != 2)
30 else if (f
!= 0.25 || memcmp (c
, "s x", 3) != 0)
32 if (sscanf (" 1.25s x", "%as%2c", &f
, c
) != 2)
34 else if (f
!= 1.25 || memcmp (c
, " x", 2) != 0)
36 if (sscanf (" 2.25s x", "%las%2c", &d
, c
) != 2)
38 else if (d
!= 2.25 || memcmp (c
, " x", 2) != 0)
40 if (sscanf (" 3.25S x", "%4aS%2c", &f
, c
) != 2)
42 else if (f
!= 3.25 || memcmp (c
, " x", 2) != 0)
44 if (sscanf (" 4.25[0-9.] x", "%a[0-9.]%2c", &f
, c
) != 2)
46 else if (f
!= 4.25 || memcmp (c
, " x", 2) != 0)
48 if (sscanf (" 5.25[0-9.] x", "%la[0-9.]%2c", &d
, c
) != 2)
50 else if (d
!= 5.25 || memcmp (c
, " x", 2) != 0)