ftwalk.h revision 3e14f97f673e8a630f076077de35afdd43dc1587
93N/A/***********************************************************************
93N/A* *
93N/A* This software is part of the ast package *
93N/A* Copyright (c) 1985-2010 AT&T Intellectual Property *
93N/A* and is licensed under the *
93N/A* Common Public License, Version 1.0 *
93N/A* by AT&T Intellectual Property *
93N/A* *
93N/A* A copy of the License is available at *
93N/A* http://www.opensource.org/licenses/cpl1.0.txt *
93N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
93N/A* *
93N/A* Information and Software Systems Research *
93N/A* AT&T Research *
93N/A* Florham Park NJ *
93N/A* *
93N/A* Glenn Fowler <gsf@research.att.com> *
93N/A* David Korn <dgk@research.att.com> *
93N/A* Phong Vo <kpv@research.att.com> *
93N/A* *
93N/A***********************************************************************/
93N/A#pragma prototyped
5491N/A/*
93N/A * Phong Vo
5680N/A * Glenn Fowler
93N/A * AT&T Research
3817N/A *
93N/A * ast ftwalk interface definitions
93N/A * ftwalk was the initial improvement on ftw and nftw
5491N/A * which formed the basis for the POSIX fts proposal
618N/A *
5491N/A * NOTE: this file is in cahoots with the fts implementation
844N/A */
5491N/A
2289N/A#ifndef _FTWALK_H
93N/A#define _FTWALK_H
5491N/A
3271N/A#define fts_info info
5680N/A#define fts_level level
5680N/A#define fts_link link
5680N/A#define fts_name name
5680N/A#define fts_namelen namelen
5680N/A#define fts_parent parent
93N/A#define fts_path path
93N/A#define fts_pathlen pathlen
99N/A#define _fts_status status
93N/A#define _fts_statb statb
5680N/A
93N/A#define FTSENT Ftw_t /* <fts.h> internal */
2289N/A#define Ftsent FTW /* <fts.h> internal */
2289N/A
5680N/A#define _FTSENT_LOCAL_PRIVATE_ /* <fts.h> internal */ \
285N/A union \
5680N/A { \
93N/A long number; /* local numeric value */ \
93N/A void* pointer; /* local pointer value */ \
93N/A } local;
93N/A
285N/A#include <fts.h>
93N/A
5680N/A/*
2289N/A * ftwalk() argument flags
93N/A */
93N/A
5680N/A#define FTW_CANON FTS_CANON
93N/A#define FTW_CHILDREN (FTS_USER<<0)
93N/A#define FTW_DELAY FTS_NOSTAT
93N/A#define FTW_DOT FTS_NOCHDIR
93N/A#define FTW_META FTS_META
93N/A#define FTW_MOUNT FTS_XDEV
2289N/A#define FTW_MULTIPLE FTS_ONEPATH
93N/A#define FTW_NOSEEDOTDIR FTS_NOSEEDOTDIR
93N/A#define FTW_PHYSICAL FTS_PHYSICAL
93N/A#define FTW_POST (FTS_USER<<1)
93N/A#define FTW_SEEDOTDIR FTS_SEEDOTDIR
93N/A#define FTW_TOP FTS_TOP
93N/A#define FTW_TWICE (FTS_USER<<2)
93N/A#define FTW_USER (FTS_USER<<3)
894N/A
93N/A/*
93N/A * Ftw_t.info type bits
894N/A */
93N/A
2289N/A#define FTW_C FTS_C
2289N/A#define FTW_D FTS_D
2289N/A#define FTW_DC FTS_DC
2289N/A#define FTW_DNR FTS_DNR
2289N/A#define FTW_DNX FTS_DNX
2289N/A#define FTW_DP FTS_DP
93N/A#define FTW_F FTS_F
93N/A#define FTW_NR FTS_NR
93N/A#define FTW_NS FTS_NS
93N/A#define FTW_NSOK FTS_NSOK
93N/A#define FTW_NX FTS_NX
93N/A#define FTW_P FTS_P
2289N/A#define FTW_SL FTS_SL
93N/A
93N/A/*
93N/A * Ftw_t.status entry values
93N/A */
2289N/A
93N/A#define FTW_NAME FTS_DOT /* access by Ftw_t.name */
2289N/A#define FTW_PATH FTS_NOCHDIR /* access by Ftw_t.path */
93N/A
3817N/A/*
3817N/A * Ftw_t.status return values
3817N/A */
#define FTW_AGAIN FTS_AGAIN
#define FTW_FOLLOW FTS_FOLLOW
#define FTW_NOPOST FTS_NOPOSTORDER
#define FTW_SKIP FTS_SKIP
#define FTW_STAT FTS_STAT
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int ftwalk(const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*));
extern int ftwflags(void);
#undef extern
#endif