xref: /titanic_41/usr/src/lib/libast/i386/include/ast/ftwalk.h (revision f3312ec0e8acbd249df97358fb8c3ca92f4e089c)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
5 *               This software is part of the ast package               *
6 *          Copyright (c) 1985-2010 AT&T Intellectual Property          *
7 *                      and is licensed under the                       *
8 *                  Common Public License, Version 1.0                  *
9 *                    by AT&T Intellectual Property                     *
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 #define _fts_status	status
56 #define _fts_statb	statb
57 
58 #define FTSENT		Ftw_t			/* <fts.h> internal	*/
59 #define Ftsent		FTW			/* <fts.h> internal	*/
60 
61 #define _FTSENT_LOCAL_PRIVATE_			/* <fts.h> internal	*/ \
62 	union								   \
63 	{								   \
64 	long		number;			/* local numeric value	*/ \
65 	__V_*		pointer;		/* local pointer value	*/ \
66 	}		local;
67 
68 #include <fts.h>
69 
70 /*
71  * ftwalk() argument flags
72  */
73 
74 #define FTW_CANON	FTS_CANON
75 #define FTW_CHILDREN	(FTS_USER<<0)
76 #define FTW_DELAY	FTS_NOSTAT
77 #define FTW_DOT		FTS_NOCHDIR
78 #define FTW_META	FTS_META
79 #define FTW_MOUNT	FTS_XDEV
80 #define FTW_MULTIPLE	FTS_ONEPATH
81 #define FTW_NOSEEDOTDIR	FTS_NOSEEDOTDIR
82 #define FTW_PHYSICAL	FTS_PHYSICAL
83 #define FTW_POST	(FTS_USER<<1)
84 #define FTW_SEEDOTDIR	FTS_SEEDOTDIR
85 #define FTW_TOP		FTS_TOP
86 #define FTW_TWICE	(FTS_USER<<2)
87 #define FTW_USER	(FTS_USER<<3)
88 
89 /*
90  * Ftw_t.info type bits
91  */
92 
93 #define FTW_C		FTS_C
94 #define FTW_D		FTS_D
95 #define FTW_DC		FTS_DC
96 #define FTW_DNR		FTS_DNR
97 #define FTW_DNX		FTS_DNX
98 #define FTW_DP		FTS_DP
99 #define FTW_F		FTS_F
100 #define FTW_NR		FTS_NR
101 #define FTW_NS		FTS_NS
102 #define FTW_NSOK	FTS_NSOK
103 #define FTW_NX		FTS_NX
104 #define FTW_P		FTS_P
105 #define FTW_SL		FTS_SL
106 
107 /*
108  * Ftw_t.status entry values
109  */
110 
111 #define FTW_NAME	FTS_DOT		/* access by Ftw_t.name		*/
112 #define FTW_PATH	FTS_NOCHDIR	/* access by Ftw_t.path		*/
113 
114 /*
115  * Ftw_t.status return values
116  */
117 
118 #define FTW_AGAIN	FTS_AGAIN
119 #define FTW_FOLLOW	FTS_FOLLOW
120 #define FTW_NOPOST	FTS_NOPOSTORDER
121 #define FTW_SKIP	FTS_SKIP
122 #define FTW_STAT	FTS_STAT
123 
124 #if _BLD_ast && defined(__EXPORT__)
125 #undef __MANGLE__
126 #define __MANGLE__ __LINKAGE__		__EXPORT__
127 #endif
128 
129 extern __MANGLE__ int	ftwalk __PROTO__((const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*)));
130 extern __MANGLE__ int	ftwflags __PROTO__((void));
131 
132 #undef __MANGLE__
133 #define __MANGLE__ __LINKAGE__
134 
135 #endif
136