diff options
Diffstat (limited to 'man3/scandir.3')
-rw-r--r-- | man3/scandir.3 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/man3/scandir.3 b/man3/scandir.3 index 27359c923..3eb65a9a4 100644 --- a/man3/scandir.3 +++ b/man3/scandir.3 @@ -275,25 +275,25 @@ in reverse order. #include <dirent.h> #include <stdio.h> #include <stdlib.h> - +\& int main(void) { struct dirent **namelist; int n; - +\& n = scandir(".", &namelist, NULL, alphasort); if (n == \-1) { perror("scandir"); exit(EXIT_FAILURE); } - +\& while (n\-\-) { printf("%s\en", namelist[n]\->d_name); free(namelist[n]); } free(namelist); - +\& exit(EXIT_SUCCESS); } .EE |