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
Mon May 13 12:03:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc/history.git]
/
stdio-common
/
bug9.c
blob
5a7166ce904027c293cdc73ec85bc82c52fffc56
1
#include <stdio.h>
2
#include <string.h>
3
4
int
5
main
()
6
{
7
char
buf
[
100
];
8
int
a
,
b
;
9
int
status
=
0
;
10
11
sscanf
(
"12ab"
,
"%dab%n"
, &
a
, &
b
);
12
sprintf
(
buf
,
"%d, %d"
,
a
,
b
);
13
puts
(
buf
);
14
status
|=
strcmp
(
buf
,
"12, 4"
);
15
16
sscanf
(
"12ab100"
,
"%dab%n100"
, &
a
, &
b
);
17
sprintf
(
buf
,
"%d, %d"
,
a
,
b
);
18
puts
(
buf
);
19
status
|=
strcmp
(
buf
,
"12, 4"
);
20
21
return
status
;
22
}