1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

initial import

This commit is contained in:
Roland McGrath
1995-02-18 01:27:10 +00:00
commit 28f540f45b
2263 changed files with 218361 additions and 0 deletions

25
manual/examples/dir.c Normal file
View File

@@ -0,0 +1,25 @@
/*@group*/
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
/*@end group*/
int
main (void)
{
DIR *dp;
struct dirent *ep;
dp = opendir ("./");
if (dp != NULL)
{
while (ep = readdir (dp))
puts (ep->d_name);
(void) closedir (dp);
}
else
puts ("Couldn't open the directory.");
return 0;
}