]>
git.saurik.com Git - apple/file_cmds.git/blob - pax/options.h
1 /* $OpenBSD: options.h,v 1.4 2003/06/13 17:51:14 millert Exp $ */
2 /* $NetBSD: options.h,v 1.3 1995/03/21 09:07:32 cgd Exp $ */
5 * Copyright (c) 1992 Keith Muller.
6 * Copyright (c) 1992, 1993
7 * The Regents of the University of California. All rights reserved.
9 * This code is derived from software contributed to Berkeley by
10 * Keith Muller of the University of California, San Diego.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. Neither the name of the University nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * @(#)options.h 8.2 (Berkeley) 4/18/94
40 * argv[0] names. Used for tar and cpio emulation
44 #define NM_CPIO "cpio"
48 * Constants used to specify the legal sets of flags in pax. For each major
49 * operation mode of pax, a set of illegal flags is defined. If any one of
50 * those illegal flags are found set, we scream and exit
55 * flags (one for each option).
75 #define CBF 0x00040000 /* nonstandard extension */
76 #define CDF 0x00080000 /* nonstandard extension */
77 #define CEF 0x00100000 /* nonstandard extension */
78 #define CGF 0x00200000 /* nonstandard extension */
79 #define CHF 0x00400000 /* nonstandard extension */
80 #define CLF 0x00800000 /* nonstandard extension */
81 #define CPF 0x01000000 /* nonstandard extension */
82 #define CTF 0x02000000 /* nonstandard extension */
83 #define CUF 0x04000000 /* nonstandard extension */
84 #define CXF 0x08000000
85 #define CYF 0x10000000 /* nonstandard extension */
86 #define CZF 0x20000000 /* nonstandard extension */
87 #define C0F 0x40000000 /* nonstandard extension */
90 * ascii string indexed by bit position above (alter the above and you must
91 * alter this string) used to tell the user what flags caused us to complain
93 #define FLGCH "abcdfiklnoprstuvwxBDEGHLPTUXYZ0"
96 * legal pax operation bit patterns
99 #define ISLIST(x) (((x) & (RF|WF)) == 0)
100 #define ISEXTRACT(x) (((x) & (RF|WF)) == RF)
101 #define ISARCHIVE(x) (((x) & (AF|RF|WF)) == WF)
102 #define ISAPPND(x) (((x) & (AF|RF|WF)) == (AF|WF))
103 #define ISCOPY(x) (((x) & (RF|WF)) == (RF|WF))
104 #define ISWRITE(x) (((x) & (RF|WF)) == WF)
107 * Illegal option flag subsets based on pax operation
110 #define BDEXTR (AF|BF|LF|TF|WF|XF|CBF|CHF|CLF|CPF|CXF)
111 #define BDARCH (CF|KF|LF|NF|PF|RF|CDF|CEF|CYF|CZF)
112 #define BDCOPY (AF|BF|FF|CBF|CEF)
113 #define BDLIST (AF|BF|IF|KF|LF|PF|RF|TF|UF|WF|XF|CBF|CDF|CHF|CLF|CPF|CXF|CYF|CZF)