diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2002-06-18 18:13:14 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2002-06-18 18:13:14 +0000 |
commit | c3a1a84ac4ab349cae4edd4ea4916d441e5592d2 (patch) | |
tree | 73dad42ab84d2e1f7ae89fca2652ee78b01649af /contrib/libio/tests/tstdiomisc.c | |
parent | 1b5c321d3f5e74248a590fd7e644c832368dda9d (diff) |
FreeBSD is one of the OS's that does not require the use of libio with Gcc 3.1.
Notes
Notes:
svn path=/head/; revision=98396
Diffstat (limited to 'contrib/libio/tests/tstdiomisc.c')
-rw-r--r-- | contrib/libio/tests/tstdiomisc.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/contrib/libio/tests/tstdiomisc.c b/contrib/libio/tests/tstdiomisc.c deleted file mode 100644 index cd8e88fd6cec..000000000000 --- a/contrib/libio/tests/tstdiomisc.c +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef STDIO_H -#define STDIO_H <iostdio.h> -#endif -#include STDIO_H - -void -t1 () -{ - int n = -1; - sscanf ("abc ", "abc %n", &n); - printf ("t1: count=%d\n", n); -} - -void -t2 () -{ - int n; - long N; - int retval; -#define SCAN(INPUT, FORMAT, VAR) \ - VAR = -1; \ - retval = sscanf (INPUT, FORMAT, &VAR); \ - printf ("sscanf (\"%s\", \"%s\", &x) => %d, x = %ld\n", \ - INPUT, FORMAT, retval, (long)VAR); - - SCAN ("12345", "%ld", N); - SCAN ("12345", "%llllld", N); - SCAN ("12345", "%LLLLLd", N); - SCAN ("test ", "%*s%n", n); - SCAN ("test ", "%2*s%n", n); - SCAN ("12 ", "%l2d", n); - SCAN ("12 ", "%2ld", N); -} - -int -main () -{ - t1 (); - t2 (); - - fflush (stdout); - return 0; -} |