aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/compat_fts.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-10-18 23:58:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-10-18 23:58:12 +0000
commit1ea2f3d63b242d71cc359642172f12b3b0a56a8f (patch)
tree6000d94b664fe8d75da2cf1849e94a3e6dfabf27 /compat_fts.h
parent6f918b70d4fbe4fe01d50aaaf631876109db472d (diff)
downloadmandoc-1ea2f3d63b242d71cc359642172f12b3b0a56a8f.tar.gz
mandoc-1ea2f3d63b242d71cc359642172f12b3b0a56a8f.tar.zst
mandoc-1ea2f3d63b242d71cc359642172f12b3b0a56a8f.zip
bring back support for sorting
Diffstat (limited to 'compat_fts.h')
-rw-r--r--compat_fts.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/compat_fts.h b/compat_fts.h
index 1eed2ae3..f4a97a4c 100644
--- a/compat_fts.h
+++ b/compat_fts.h
@@ -38,9 +38,12 @@
typedef struct {
struct _ftsent *fts_cur; /* current node */
struct _ftsent *fts_child; /* linked list of children */
+ struct _ftsent **fts_array; /* sort array */
dev_t fts_dev; /* starting device # */
char *fts_path; /* path for this descent */
size_t fts_pathlen; /* sizeof(path) */
+ int fts_nitems; /* elements in the sort array */
+ int (*fts_compar)(); /* compare function */
#define FTS_NOCHDIR 0x0004 /* don't change directories */
#define FTS_PHYSICAL 0x0010 /* physical walk */
@@ -94,7 +97,8 @@ typedef struct _ftsent {
int fts_close(FTS *);
-FTS *fts_open(char * const *, int, void *);
+FTS *fts_open(char * const *, int,
+ int (*)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *);
int fts_set(FTS *, FTSENT *, int);