xref: /titanic_50/usr/src/lib/libast/i386/include/ast/ftwalk.h (revision 743541abe0006f1be576e21a976c36fb2e87accc)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
5 *               This software is part of the ast package               *
6 *           Copyright (c) 1985-2007 AT&T Knowledge Ventures            *
7 *                      and is licensed under the                       *
8 *                  Common Public License, Version 1.0                  *
9 *                      by AT&T Knowledge Ventures                      *
10 *                                                                      *
11 *                A copy of the License is available at                 *
12 *            http://www.opensource.org/licenses/cpl1.0.txt             *
13 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14 *                                                                      *
15 *              Information and Software Systems Research               *
16 *                            AT&T Research                             *
17 *                           Florham Park NJ                            *
18 *                                                                      *
19 *                 Glenn Fowler <gsf@research.att.com>                  *
20 *                  David Korn <dgk@research.att.com>                   *
21 *                   Phong Vo <kpv@research.att.com>                    *
22 *                                                                      *
23 ***********************************************************************/
24 
25 /*
26  * Phong Vo
27  * Glenn Fowler
28  * AT&T Research
29  *
30  * ast ftwalk interface definitions
31  * ftwalk was the initial improvement on ftw and nftw
32  * which formed the basis for the POSIX fts proposal
33  *
34  * NOTE: this file is in cahoots with the fts implementation
35  */
36 
37 #ifndef _FTWALK_H
38 #if !defined(__PROTO__)
39 #include <prototyped.h>
40 #endif
41 #if !defined(__LINKAGE__)
42 #define __LINKAGE__		/* 2004-08-11 transition */
43 #endif
44 
45 #define _FTWALK_H
46 
47 #define fts_info	info
48 #define fts_level	level
49 #define fts_link	link
50 #define fts_name	name
51 #define fts_namelen	namelen
52 #define fts_parent	parent
53 #define fts_path	path
54 #define fts_pathlen	pathlen
55 
56 #define FTSENT		Ftw_t			/* <fts.h> internal	*/
57 #define Ftsent		FTW			/* <fts.h> internal	*/
58 
59 #define _FTSENT_LOCAL_PRIVATE_			/* <fts.h> internal	*/ \
60 	union								   \
61 	{								   \
62 	long		number;			/* local numeric value	*/ \
63 	__V_*		pointer;		/* local pointer value	*/ \
64 	}		local;
65 
66 #define _FTSENT_PRIVATE_			/* fts internal		*/ \
67 	short		status;			/* internal status	*/ \
68 	struct stat	statb;			/* fts_statp data	*/
69 
70 #include <fts.h>
71 
72 /*
73  * ftwalk() argument flags
74  */
75 
76 #define FTW_CANON	FTS_CANON
77 #define FTW_CHILDREN	(FTS_USER<<0)
78 #define FTW_DELAY	FTS_NOSTAT
79 #define FTW_DOT		FTS_NOCHDIR
80 #define FTW_META	FTS_META
81 #define FTW_MOUNT	FTS_XDEV
82 #define FTW_MULTIPLE	FTS_ONEPATH
83 #define FTW_NOSEEDOTDIR	FTS_NOSEEDOTDIR
84 #define FTW_PHYSICAL	FTS_PHYSICAL
85 #define FTW_POST	(FTS_USER<<1)
86 #define FTW_SEEDOTDIR	FTS_SEEDOTDIR
87 #define FTW_TOP		FTS_TOP
88 #define FTW_TWICE	(FTS_USER<<2)
89 #define FTW_USER	(FTS_USER<<3)
90 
91 /*
92  * Ftw_t.info type bits
93  */
94 
95 #define FTW_C		FTS_C
96 #define FTW_D		FTS_D
97 #define FTW_DC		FTS_DC
98 #define FTW_DNR		FTS_DNR
99 #define FTW_DNX		FTS_DNX
100 #define FTW_DP		FTS_DP
101 #define FTW_F		FTS_F
102 #define FTW_NR		FTS_NR
103 #define FTW_NS		FTS_NS
104 #define FTW_NSOK	FTS_NSOK
105 #define FTW_NX		FTS_NX
106 #define FTW_P		FTS_P
107 #define FTW_SL		FTS_SL
108 
109 /*
110  * Ftw_t.status entry values
111  */
112 
113 #define FTW_NAME	FTS_DOT		/* access by Ftw_t.name		*/
114 #define FTW_PATH	FTS_NOCHDIR	/* access by Ftw_t.path		*/
115 
116 /*
117  * Ftw_t.status return values
118  */
119 
120 #define FTW_AGAIN	FTS_AGAIN
121 #define FTW_FOLLOW	FTS_FOLLOW
122 #define FTW_NOPOST	FTS_NOPOSTORDER
123 #define FTW_SKIP	FTS_SKIP
124 #define FTW_STAT	FTS_STAT
125 
126 #if _BLD_ast && defined(__EXPORT__)
127 #undef __MANGLE__
128 #define __MANGLE__ __LINKAGE__		__EXPORT__
129 #endif
130 
131 extern __MANGLE__ int	ftwalk __PROTO__((const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*)));
132 extern __MANGLE__ int	ftwflags __PROTO__((void));
133 
134 #undef __MANGLE__
135 #define __MANGLE__ __LINKAGE__
136 
137 #endif
138