X-Git-Url: https://git.saurik.com/apple/shell_cmds.git/blobdiff_plain/1a5bac7242b5267f816c85cfd03283a4f58392b3..71aad6740de6ae0068511076140d8875bbed2a15:/find/find.h diff --git a/find/find.h b/find/find.h index 24eaa55..8960a0b 100644 --- a/find/find.h +++ b/find/find.h @@ -13,10 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -34,7 +30,7 @@ * SUCH DAMAGE. * * @(#)find.h 8.1 (Berkeley) 6/6/93 - * $FreeBSD: src/usr.bin/find/find.h,v 1.6.2.6 2001/09/19 09:44:24 ru Exp $ + * $FreeBSD: src/usr.bin/find/find.h,v 1.21 2010/12/11 08:32:16 joel Exp $ */ #include @@ -44,7 +40,7 @@ struct _plandata; struct _option; /* execute function */ -typedef int exec_f __P((struct _plandata *, FTSENT *)); +typedef int exec_f(struct _plandata *, FTSENT *); /* create function */ typedef struct _plandata *creat_f(struct _option *, char ***); @@ -57,6 +53,7 @@ typedef struct _plandata *creat_f(struct _option *, char ***); #define F_TIME2_C 0x00000020 /* one of -newer?c */ #define F_TIME2_T 0x00000040 /* one of -newer?t */ #define F_MAXDEPTH F_TIME_A /* maxdepth vs. mindepth */ +#define F_DEPTH F_TIME_A /* -depth n vs. -d */ /* command line function modifiers */ #define F_EQUAL 0x00000000 /* [acm]min [acm]time inum links size */ #define F_LESSTHAN 0x00000100 @@ -67,8 +64,13 @@ typedef struct _plandata *creat_f(struct _option *, char ***); #define F_MTMASK 0x00003000 #define F_MTFLAG 0x00000000 /* fstype */ #define F_MTTYPE 0x00001000 +#define F_MTUNKNOWN 0x00002000 #define F_IGNCASE 0x00010000 /* iname ipath iregex */ -#define F_CLEANUP 0x00020000 /* need an extra cleanup call at the end*/ +#define F_EXACTTIME F_IGNCASE /* -[acm]time units syntax */ +#define F_EXECPLUS 0x00020000 /* -exec ... {} + */ +#define F_TIME_B 0x00040000 /* one of -Btime, -Bnewer, -newerB* */ +#define F_TIME2_B 0x00080000 /* one of -newer?B */ +#define F_LINK 0x00100000 /* lname or ilname */ /* node definition */ typedef struct _plandata { @@ -84,6 +86,7 @@ typedef struct _plandata { u_long _f_notflags; } fl; nlink_t _l_data; /* link count */ + short _d_data; /* level depth (-1 to N) */ off_t _o_data; /* file size */ time_t _t_data; /* time value */ uid_t _u_data; /* uid */ @@ -93,6 +96,13 @@ typedef struct _plandata { char **_e_argv; /* argv array */ char **_e_orig; /* original strings */ int *_e_len; /* allocated length */ + int _e_pbnum; /* base num. of args. used */ + int _e_ppos; /* number of arguments used */ + int _e_pnummax; /* max. number of arguments */ + int _e_psize; /* number of bytes of args. */ + int _e_pbsize; /* base num. of bytes of args */ + int _e_psizemax; /* max num. of bytes of args */ + struct _plandata *_e_next;/* next F_EXECPLUS in tree */ } ex; char *_a_data[2]; /* array of char pointers */ char *_c_data; /* char pointer */ @@ -101,6 +111,7 @@ typedef struct _plandata { } PLAN; #define a_data p_un._a_data #define c_data p_un._c_data +#define d_data p_un._d_data #define fl_flags p_un.fl._f_flags #define fl_notflags p_un.fl._f_notflags #define g_data p_un._g_data @@ -116,9 +127,16 @@ typedef struct _plandata { #define e_argv p_un.ex._e_argv #define e_orig p_un.ex._e_orig #define e_len p_un.ex._e_len +#define e_pbnum p_un.ex._e_pbnum +#define e_ppos p_un.ex._e_ppos +#define e_pnummax p_un.ex._e_pnummax +#define e_psize p_un.ex._e_psize +#define e_pbsize p_un.ex._e_pbsize +#define e_psizemax p_un.ex._e_psizemax +#define e_next p_un.ex._e_next typedef struct _option { - char *name; /* option name */ + const char *name; /* option name */ creat_f *create; /* create function */ exec_f *execute; /* execute function */ int flags;