summaryrefslogtreecommitdiffstats
path: root/man3/ftw.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/ftw.3')
-rw-r--r--man3/ftw.316
1 files changed, 8 insertions, 8 deletions
diff --git a/man3/ftw.3 b/man3/ftw.3
index 59931bb3b..68f181825 100644
--- a/man3/ftw.3
+++ b/man3/ftw.3
@@ -453,7 +453,7 @@ argument when calling
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
static int
display_info(const char *fpath, const struct stat *sb,
int tflag, struct FTW *ftwbuf)
@@ -464,35 +464,35 @@ display_info(const char *fpath, const struct stat *sb,
(tflag == FTW_NS) ? "ns" : (tflag == FTW_SL) ? "sl" :
(tflag == FTW_SLN) ? "sln" : "???",
ftwbuf\->level);
-
+\&
if (tflag == FTW_NS)
printf("\-\-\-\-\-\-\-");
else
printf("%7jd", (intmax_t) sb\->st_size);
-
+\&
printf(" %\-40s %d %s\en",
fpath, ftwbuf\->base, fpath + ftwbuf\->base);
-
+\&
return 0; /* To tell nftw() to continue */
}
-
+\&
int
main(int argc, char *argv[])
{
int flags = 0;
-
+\&
if (argc > 2 && strchr(argv[2], \[aq]d\[aq]) != NULL)
flags |= FTW_DEPTH;
if (argc > 2 && strchr(argv[2], \[aq]p\[aq]) != NULL)
flags |= FTW_PHYS;
-
+\&
if (nftw((argc < 2) ? "." : argv[1], display_info, 20, flags)
== \-1)
{
perror("nftw");
exit(EXIT_FAILURE);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE