xref: /original-bsd/bin/pax/sel_subs.h (revision 541b0a81)
1 /*-
2  * Copyright (c) 1992 Keith Muller.
3  * Copyright (c) 1992, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * Keith Muller of the University of California, San Diego.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)sel_subs.h	8.1 (Berkeley) 05/31/93
12  */
13 
14 /*
15  * data structure for storing uid/grp selects (-U, -G non standard options)
16  */
17 
18 #define USR_TB_SZ	317		/* user selection table size */
19 #define GRP_TB_SZ	317		/* user selection table size */
20 
21 typedef struct usrt {
22 	uid_t uid;
23 	struct usrt *fow;		/* next uid */
24 } USRT;
25 
26 typedef struct grpt {
27 	gid_t gid;
28 	struct grpt *fow;		/* next gid */
29 } GRPT;
30 
31 /*
32  * data structure for storing user supplied time ranges (-T option)
33  */
34 
35 #define ATOI2(s)	((((s)[0] - '0') * 10) + ((s)[1] - '0'))
36 
37 typedef struct time_rng {
38 	time_t		low_time;	/* lower inclusive time limit */
39 	time_t		high_time;	/* higher inclusive time limit */
40 	int		flgs;		/* option flags */
41 #define	HASLOW		0x01		/* has lower time limit */
42 #define HASHIGH		0x02		/* has higher time limit */
43 #define CMPMTME		0x04		/* compare file modification time */
44 #define CMPCTME		0x08		/* compare inode change time */
45 #define CMPBOTH	(CMPMTME|CMPCTME)	/* compare inode and mod time */
46 	struct time_rng	*fow;		/* next pattern */
47 } TIME_RNG;
48