1 /*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Cimarron D. Taylor of the University of California, Berkeley. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)find.h 5.3 (Berkeley) 11/15/90 11 */ 12 13 /* node definition */ 14 typedef struct _plandata { 15 struct _plandata *next; /* next node */ 16 int (*eval)(); /* node evaluation function */ 17 int flags; /* private flags */ 18 int type; /* plan node type */ 19 union { 20 gid_t _g_data; /* gid */ 21 ino_t _i_data; /* inode */ 22 mode_t _m_data; /* mode mask */ 23 nlink_t _l_data; /* link count */ 24 off_t _o_data; /* file size */ 25 time_t _t_data; /* time value */ 26 uid_t _u_data; /* uid */ 27 struct _plandata *_p_data[2]; /* PLAN trees */ 28 struct _ex { 29 char **_e_argv; /* argv array */ 30 char **_e_orig; /* original strings */ 31 int *_e_len; /* allocated length */ 32 } ex; 33 char *_a_data[2]; /* array of char pointers */ 34 char *_c_data; /* char pointer */ 35 } p_un; 36 #define a_data p_un._a_data 37 #define c_data p_un._c_data 38 #define i_data p_un._i_data 39 #define g_data p_un._g_data 40 #define l_data p_un._l_data 41 #define m_data p_un._m_data 42 #define o_data p_un._o_data 43 #define p_data p_un._p_data 44 #define t_data p_un._t_data 45 #define u_data p_un._u_data 46 #define e_argv p_un.ex._e_argv 47 #define e_orig p_un.ex._e_orig 48 #define e_len p_un.ex._e_len 49 } PLAN; 50 51 /* node types */ 52 #define T_AND 1 /* must start at >0 */ 53 #define T_ATIME 2 54 #define T_CLOSEPAREN 3 55 #define T_CTIME 4 56 #define T_DEPTH 5 57 #define T_EXEC 6 58 #define T_EXPR 7 59 #define T_FOLLOW 8 60 #define T_FSTYPE 9 61 #define T_GROUP 10 62 #define T_INUM 11 63 #define T_LINKS 12 64 #define T_LS 13 65 #define T_MTIME 14 66 #define T_NAME 15 67 #define T_NEWER 16 68 #define T_NOGROUP 17 69 #define T_NOT 18 70 #define T_NOUSER 19 71 #define T_OK 20 72 #define T_OPENPAREN 21 73 #define T_OR 22 74 #define T_PERM 23 75 #define T_PRINT 24 76 #define T_PRUNE 25 77 #define T_SIZE 26 78 #define T_TYPE 27 79 #define T_USER 28 80 #define T_XDEV 29 81 82 extern int ftsoptions; 83 extern int isdeprecated, isdepth, isoutput, isrelative, isstopdnx; 84 void *emalloc(); 85