repo.or.cz
/
glibc
/
history.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Thu Jun 27 02:49:28 1996 Ulrich Drepper <drepper@cygnus.com>
[glibc/history.git]
/
stdio-common
/
scanf7.c
blob
386dac4d06a0e3521ec6fa90703723151fce2fd5
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
main
()
5
{
6
long long int
n
;
7
int
ret
;
8
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
();
14
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
();
20
21
return
0
;
22
}