=================================================================== RCS file: /cvs/mandoc/compat_fts.h,v retrieving revision 1.3 retrieving revision 1.5 diff -u -p -r1.3 -r1.5 --- mandoc/compat_fts.h 2015/11/07 14:01:16 1.3 +++ mandoc/compat_fts.h 2020/06/14 22:49:36 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: compat_fts.h,v 1.3 2015/11/07 14:01:16 schwarze Exp $ */ +/* $OpenBSD: compat_fts.h,v 1.5 2020/06/14 22:49:36 schwarze Exp $ */ /* $NetBSD: fts.h,v 1.7 2012/03/01 16:18:51 hans Exp $ */ /* @@ -38,9 +38,13 @@ 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)(const struct _ftsent **, const struct _ftsent **); + /* compare function */ #define FTS_NOCHDIR 0x0004 /* don't change directories */ #define FTS_PHYSICAL 0x0010 /* physical walk */ @@ -94,7 +98,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);