Thu Jun 27 02:49:28 1996 Ulrich Drepper <drepper@cygnus.com>
[glibc/history.git] / stdio-common / scanf7.c
blob386dac4d06a0e3521ec6fa90703723151fce2fd5
1 #include <stdio.h>
2 #include <stdlib.h>
4 main ()
6 long long int n;
7 int ret;
9 n = -1;
10 ret = sscanf ("1000", "%lld", &n);
11 printf ("%%lld: ret: %d, n: %Ld, c: %c\n", ret, n);
12 if (ret != 1 || n != 1000L)
13 abort ();
15 n = -2;
16 ret = sscanf ("1000", "%llld", &n);
17 printf ("%%llld: ret: %d, n: %Ld\n", ret, n);
18 if (ret != 0 || n >= 0L)
19 abort ();
21 return 0;