mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
05be689b57
* stdio-common/Makefile (tests): Add bug10. * stdio-common/bug10.c: New file. From HJ Lu. * stdio-common/tstdiomisc.c: Make more test-suite like: exit status tells about successful run. * stdio-common/vfscanf.c [!USE_IN_LIBIO]: Use `flags' to check format correctness. Correct handling of trailing white spaces in format + EOF. Fri Dec 15 01:31:56 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu> * stdio-common/Makefile (tests): Add bug8 and bug9. * stdio-common/bug8.c, stdio-common/bug9.c: New tests. * stdio-common/vfscanf.c: Fix bug in dynamic buffer handling. * stdlib/strtod.c: Correct spelling: nominator -> numerator. Thanks to Jim Meyering. Sat Nov 25 06:05:12 1995 H.J. Lu <hjl@nynexst.com> * stdio-common/vfscanf.c: Always check width !=0. Correctly handle %%.
23 lines
366 B
C
23 lines
366 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int
|
|
main()
|
|
{
|
|
char buf[100];
|
|
int a, b;
|
|
int status = 0;
|
|
|
|
sscanf ("12ab", "%dab%n", &a, &b);
|
|
sprintf (buf, "%d, %d", a, b);
|
|
puts (buf);
|
|
status |= strcmp (buf, "12, 4");
|
|
|
|
sscanf ("12ab100", "%dab%n100", &a, &b);
|
|
sprintf (buf, "%d, %d", a, b);
|
|
puts (buf);
|
|
status |= strcmp (buf, "12, 4");
|
|
|
|
return status;
|
|
}
|