Files
glibc/stdio-common/temptest.c
T

29 lines
448 B
C
Raw Normal View History

1995-02-18 01:27:10 +00:00
#include <stdio.h>
#include <stdlib.h>
1995-02-18 01:27:10 +00:00
#include <string.h>
char *files[500];
int
1996-10-08 23:39:20 +00:00
main (int argc, char *argv[])
1995-02-18 01:27:10 +00:00
{
FILE *fp;
int i;
for (i = 0; i < 500; i++) {
1997-06-19 19:11:22 +00:00
files[i] = tempnam (NULL, "file");
if (files[i] == NULL) {
printf ("tempnam failed\n");
1995-02-18 01:27:10 +00:00
exit (1);
}
1997-06-19 19:11:22 +00:00
printf ("file: %s\n", files[i]);
fp = fopen (files[i], "w");
1995-02-18 01:27:10 +00:00
fclose (fp);
}
for (i = 0; i < 500; i++)
remove (files[i]);
return 0;
1995-02-18 01:27:10 +00:00
}