mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
Update.
2000-12-15 Andreas Jaeger <aj@suse.de> * stdio-common/scanf9.c (main): Reformat and change to avoid warnings. * stdio-common/tstdiomisc.c: Make local functions static. * stdio-common/tst-printf.c: Likewise. * elf/constload2.c: Add prototype declarations to shut up gcc. * elf/dep1.c: Likewise. * elf/dep2.c: Likewise. * elf/dep3.c: Likewise. * elf/dep4.c: Likewise. * elf/ltglobmod2.c: Likewise. * libio/fmemopen.c: Make local functions static. * elf/Makefile (distribute): Added testobj.h. * elf/testobj.h: New file. * elf/testobj1.c: Include testobj.h and move prototype declarations to testobj.h. * elf/testobj2.c: Likewise. * elf/testobj3.c: Likewise. * elf/testobj4.c: Likewise. * elf/testobj5.c: Likewise. * elf/testobj6.c: Likewise. * elf/testobj1_1.c: Likewise. * elf/preloadtest.c: Likewise.
This commit is contained in:
@@ -2,22 +2,29 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int matches;
|
||||
char str[10];
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int matches;
|
||||
char str[10];
|
||||
|
||||
str[0] = '\0';
|
||||
matches = -9;
|
||||
matches = sscanf("x ]", "%[^] ]", str);
|
||||
printf("Matches = %d, string str = \"%s\".\n", matches, str);
|
||||
printf("str should be \"x\".\n");
|
||||
if (strcmp (str, "x")) abort ();
|
||||
matches = sscanf ("x ]", "%[^] ]", str);
|
||||
printf ("Matches = %d, string str = \"%s\".\n", matches, str);
|
||||
printf ("str should be \"x\".\n");
|
||||
|
||||
if (strcmp (str, "x"))
|
||||
abort ();
|
||||
|
||||
str[0] = '\0';
|
||||
matches = -9;
|
||||
matches = sscanf(" ] x", "%[] ]", str);
|
||||
printf("Matches = %d, string str = \"%s\".\n", matches, str);
|
||||
printf("str should be \" ] \".\n");
|
||||
if (strcmp (str, " ] ")) abort ();
|
||||
exit(0);
|
||||
matches = sscanf (" ] x", "%[] ]", str);
|
||||
printf ("Matches = %d, string str = \"%s\".\n", matches, str);
|
||||
printf ("str should be \" ] \".\n");
|
||||
|
||||
if (strcmp (str, " ] "))
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user