157117Smuller /*- 257117Smuller * Copyright (c) 1992 Keith Muller. 357117Smuller * Copyright (c) 1992 The Regents of the University of California. 457117Smuller * All rights reserved. 557117Smuller * 657117Smuller * This code is derived from software contributed to Berkeley by 757117Smuller * Keith Muller of the University of California, San Diego. 857117Smuller * 957117Smuller * %sccs.include.redist.c% 1057117Smuller * 11*57541Smuller * @(#)options.h 1.2 (Berkeley) 01/14/93 1257117Smuller */ 1357117Smuller 1457117Smuller /* 1557117Smuller * Constants used to specify the legal sets of flags in pax. For each major 1657117Smuller * operation mode of pax, a set of illegal flags is defined. If any one of 1757117Smuller * those illegal flags are found set, we scream and exit 1857117Smuller */ 1957117Smuller #define NONE "none" 2057117Smuller 2157117Smuller /* 2257117Smuller * flags (one for each option). 2357117Smuller */ 2457117Smuller #define AF 0x00000001 2557117Smuller #define BF 0x00000002 2657117Smuller #define CF 0x00000004 2757117Smuller #define DF 0x00000008 2857117Smuller #define FF 0x00000010 2957117Smuller #define IF 0x00000020 3057117Smuller #define KF 0x00000040 3157117Smuller #define LF 0x00000080 3257117Smuller #define NF 0x00000100 3357117Smuller #define OF 0x00000200 3457117Smuller #define PF 0x00000400 3557117Smuller #define RF 0x00000800 3657117Smuller #define SF 0x00001000 3757117Smuller #define TF 0x00002000 3857117Smuller #define UF 0x00004000 3957117Smuller #define VF 0x00008000 4057117Smuller #define WF 0x00010000 4157117Smuller #define XF 0x00020000 4257117Smuller #define CBF 0x00040000 /* nonstandard extension */ 43*57541Smuller #define CDF 0x00080000 /* nonstandard extension */ 44*57541Smuller #define CEF 0x00100000 /* nonstandard extension */ 45*57541Smuller #define CGF 0x00200000 /* nonstandard extension */ 46*57541Smuller #define CHF 0x00400000 /* nonstandard extension */ 47*57541Smuller #define CLF 0x00800000 48*57541Smuller #define CTF 0x01000000 /* nonstandard extension */ 49*57541Smuller #define CUF 0x02000000 /* nonstandard extension */ 50*57541Smuller #define CXF 0x04000000 51*57541Smuller #define CYF 0x08000000 /* nonstandard extension */ 52*57541Smuller #define CZF 0x10000000 /* nonstandard extension */ 5357117Smuller 5457117Smuller /* 5557117Smuller * ascii string indexed by bit position above (alter the above and you must 5657117Smuller * alter this string) used to tell the user what flags caused us to complain 5757117Smuller */ 58*57541Smuller #define FLGCH "abcdfiklnoprstuvwxBDEGHLTUXYZ" 5957117Smuller 6057117Smuller /* 6157117Smuller * legal pax operation bit patterns 6257117Smuller */ 6357117Smuller 6457117Smuller #define ISLIST(x) (((x) & (RF|WF)) == 0) 6557117Smuller #define ISEXTRACT(x) (((x) & (RF|WF)) == RF) 6657117Smuller #define ISARCHIVE(x) (((x) & (AF|RF|WF)) == WF) 6757117Smuller #define ISAPPND(x) (((x) & (AF|RF|WF)) == (AF|WF)) 6857117Smuller #define ISCOPY(x) (((x) & (RF|WF)) == (RF|WF)) 6957117Smuller #define ISWRITE(x) (((x) & (RF|WF)) == WF) 7057117Smuller 7157117Smuller /* 7257117Smuller * Illegal option flag subsets based on pax operation 7357117Smuller */ 7457117Smuller 7557117Smuller #define BDEXTR (AF|BF|LF|TF|WF|XF|CBF|CHF|CLF|CXF) 76*57541Smuller #define BDARCH (CF|KF|LF|NF|PF|RF|CDF|CEF|CYF|CZF) 7757117Smuller #define BDCOPY (AF|BF|FF|OF|XF|CBF|CEF) 78*57541Smuller #define BDLIST (AF|BF|IF|KF|LF|OF|PF|RF|TF|UF|WF|XF|CBF|CDF|CHF|CLF|CXF|CYF|CZF) 79