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