1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1985-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
18 * David Korn <dgk@research.att.com> *
19 * Phong Vo <kpv@research.att.com> *
21 ***********************************************************************/
28 * ast ftwalk interface definitions
29 * ftwalk was the initial improvement on ftw and nftw
30 * which formed the basis for the POSIX fts proposal
32 * NOTE: this file is in cahoots with the fts implementation
39 #define fts_level level
42 #define fts_namelen namelen
43 #define fts_parent parent
45 #define fts_pathlen pathlen
46 #define _fts_status status
47 #define _fts_statb statb
49 #define FTSENT Ftw_t /* <fts.h> internal */
50 #define Ftsent FTW /* <fts.h> internal */
52 #define _FTSENT_LOCAL_PRIVATE_ /* <fts.h> internal */ \
55 long number; /* local numeric value */ \
56 void* pointer; /* local pointer value */ \
62 * ftwalk() argument flags
65 #define FTW_CANON FTS_CANON
66 #define FTW_CHILDREN (FTS_USER<<0)
67 #define FTW_DELAY FTS_NOSTAT
68 #define FTW_DOT FTS_NOCHDIR
69 #define FTW_META FTS_META
70 #define FTW_MOUNT FTS_XDEV
71 #define FTW_MULTIPLE FTS_ONEPATH
72 #define FTW_NOSEEDOTDIR FTS_NOSEEDOTDIR
73 #define FTW_PHYSICAL FTS_PHYSICAL
74 #define FTW_POST (FTS_USER<<1)
75 #define FTW_SEEDOTDIR FTS_SEEDOTDIR
76 #define FTW_TOP FTS_TOP
77 #define FTW_TWICE (FTS_USER<<2)
78 #define FTW_USER (FTS_USER<<3)
81 * Ftw_t.info type bits
87 #define FTW_DNR FTS_DNR
88 #define FTW_DNX FTS_DNX
93 #define FTW_NSOK FTS_NSOK
99 * Ftw_t.status entry values
102 #define FTW_NAME FTS_DOT /* access by Ftw_t.name */
103 #define FTW_PATH FTS_NOCHDIR /* access by Ftw_t.path */
106 * Ftw_t.status return values
109 #define FTW_AGAIN FTS_AGAIN
110 #define FTW_FOLLOW FTS_FOLLOW
111 #define FTW_NOPOST FTS_NOPOSTORDER
112 #define FTW_SKIP FTS_SKIP
113 #define FTW_STAT FTS_STAT
115 #if _BLD_ast && defined(__EXPORT__)
116 #define extern __EXPORT__
119 extern int ftwalk(const char*, int(*)(Ftw_t
*), int, int(*)(Ftw_t
*, Ftw_t
*));
120 extern int ftwflags(void);