llvm-libunwind: use conventional (non-Darwin) X86 register numbers
[freebsd-src.git] / contrib / mdocml / test-fts.c
blobdbee52926d4a4c0176e01a12eed5158dbd763186
1 #include <sys/types.h>
2 #include <sys/stat.h>
3 #include <fts.h>
4 #include <stdio.h>
6 int
7 main(void)
9 const char *argv[2];
10 FTS *ftsp;
11 FTSENT *entry;
13 argv[0] = ".";
14 argv[1] = (char *)NULL;
16 ftsp = fts_open((char * const *)argv,
17 FTS_PHYSICAL | FTS_NOCHDIR, NULL);
19 if (ftsp == NULL) {
20 perror("fts_open");
21 return 1;
24 entry = fts_read(ftsp);
26 if (entry == NULL) {
27 perror("fts_read");
28 return 1;
31 if (fts_set(ftsp, entry, FTS_SKIP) != 0) {
32 perror("fts_set");
33 return 1;
36 if (fts_close(ftsp) != 0) {
37 perror("fts_close");
38 return 1;
41 return 0;