repo.or.cz
/
freebsd-src.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
llvm-libunwind: use conventional (non-Darwin) X86 register numbers
[freebsd-src.git]
/
contrib
/
mdocml
/
test-fts.c
blob
dbee52926d4a4c0176e01a12eed5158dbd763186
1
#include <sys/types.h>
2
#include <sys/stat.h>
3
#include <fts.h>
4
#include <stdio.h>
5
6
int
7
main
(
void
)
8
{
9
const char
*
argv
[
2
];
10
FTS
*
ftsp
;
11
FTSENT
*
entry
;
12
13
argv
[
0
] =
"."
;
14
argv
[
1
] = (
char
*)
NULL
;
15
16
ftsp
=
fts_open
((
char
*
const
*)
argv
,
17
FTS_PHYSICAL
|
FTS_NOCHDIR
,
NULL
);
18
19
if
(
ftsp
==
NULL
) {
20
perror
(
"fts_open"
);
21
return
1
;
22
}
23
24
entry
=
fts_read
(
ftsp
);
25
26
if
(
entry
==
NULL
) {
27
perror
(
"fts_read"
);
28
return
1
;
29
}
30
31
if
(
fts_set
(
ftsp
,
entry
,
FTS_SKIP
) !=
0
) {
32
perror
(
"fts_set"
);
33
return
1
;
34
}
35
36
if
(
fts_close
(
ftsp
) !=
0
) {
37
perror
(
"fts_close"
);
38
return
1
;
39
}
40
41
return
0
;
42
}