# 2.11BSD#431 - /usr/src/bin/ar/archive.h

##### Macros

    AR_A              X
    AR_B              X
    AR_C              X
    AR_D              X
    AR_M              X
    AR_O              X
    AR_P              X
    AR_Q              X
    AR_R              X
    AR_T              X
    AR_TR             X
    AR_U              X
    AR_V              X
    AR_X              X
    HDR1              X
    HDR2              X
    HDR3              X
    NOPAD             X
    OLDARMAXNAME      X
    RPAD              X
    SETCF             X
    WPAD              X

       1: /*-
       2:  * Copyright (c) 1991 The Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * This code is derived from software contributed to Berkeley by
       6:  * Hugh Smith at The University of Guelph.
       7:  *
       8:  * Redistribution and use in source and binary forms, with or without
       9:  * modification, are permitted provided that the following conditions
      10:  * are met:
      11:  * 1. Redistributions of source code must retain the above copyright
      12:  *    notice, this list of conditions and the following disclaimer.
      13:  * 2. Redistributions in binary form must reproduce the above copyright
      14:  *    notice, this list of conditions and the following disclaimer in the
      15:  *    documentation and/or other materials provided with the distribution.
      16:  * 3. All advertising materials mentioning features or use of this software
      17:  *    must display the following acknowledgement:
      18:  *	This product includes software developed by the University of
      19:  *	California, Berkeley and its contributors.
      20:  * 4. 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.
      23:  *
      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
      34:  * SUCH DAMAGE.
      35:  *
      36:  *	@(#)archive.h	5.8 (Berkeley) 4/12/91
      37:  */
      38:
      39: /* Ar(1) options. */
      40: #define AR_A    0x0001
      41: #define AR_B    0x0002
      42: #define AR_C    0x0004
      43: #define AR_D    0x0008
      44: #define AR_M    0x0010
      45: #define AR_O    0x0020
      46: #define AR_P    0x0040
      47: #define AR_Q    0x0080
      48: #define AR_R    0x0100
      49: #define AR_T    0x0200
      50: #define AR_TR   0x0400
      51: #define AR_U    0x0800
      52: #define AR_V    0x1000
      53: #define AR_X    0x2000
      54: extern u_int options;
      55:
      56: /* Set up file copy. */
      57: #define SETCF(from, fromname, to, toname, pad) { \
      58:     cf.rfd = from; \
      59:     cf.rname = fromname; \
      60:     cf.wfd = to; \
      61:     cf.wname = toname; \
      62:     cf.flags = pad; \
      63: }
      64:
      65: /* File copy structure. */
      66: typedef struct {
      67:     int rfd;            /* read file descriptor */
      68:     char *rname;            /* read name */
      69:     int wfd;            /* write file descriptor */
      70:     char *wname;            /* write name */
      71: #define NOPAD   0x00            /* don't pad */
      72: #define RPAD    0x01            /* pad on reads */
      73: #define WPAD    0x02            /* pad on writes */
      74:     u_int flags;            /* pad flags */
      75: } CF;
      76:
      77: /* Header structure internal format. */
      78: typedef struct {
      79:     off_t size;         /* size of the object in bytes */
      80:     long date;          /* date */
      81:     int lname;          /* size of the long name in bytes */
      82:     int gid;            /* group */
      83:     int uid;            /* owner */
      84:     u_short mode;           /* permissions */
      85:     char name[MAXNAMLEN + 1];   /* name */
      86: } CHDR;
      87:
      88: /* Header format strings. */
      89: #define HDR1    "%s%-13d%-12ld%-6u%-6u%-8o%-10ld%2s"
      90: #define HDR2    "%-16.16s%-12ld%-6u%-6u%-8o%-10ld%2s"
      91:
      92: #define OLDARMAXNAME    15
      93: #define HDR3    "%-16.15s%-12ld%-6u%-6u%-8o%-10ld%2s"
      94:
      95:
      96: void    close_archive();
      97: void    skip_arobj();
      98: int copy_ar();
      99: int get_arobj();
     100: int open_archive();
     101: int put_arobj();

#### Defined macros

AR_A defined in line 40; used 10 times

- in /usr/src/bin/ar/ar.c line 99, 166, 172, 184, 193
- in /usr/src/bin/ar/move.c line 73, 103
- in /usr/src/bin/ar/replace.c line 101, 134, 163

AR_B defined in line 41; used 10 times

- in /usr/src/bin/ar/ar.c line 103, 166, 172, 184, 193
- in /usr/src/bin/ar/move.c line 73, 99
- in /usr/src/bin/ar/replace.c line 101, 129, 163

AR_C defined in line 42; used 4 times

- in /usr/src/bin/ar/ar.c line 106, 190-193(2)
- in /usr/src/bin/ar/archive.c line 70

AR_D defined in line 43; used 5 times

- in /usr/src/bin/ar/ar.c line 109, 160, 181(2), 208

AR_M defined in line 44; used 5 times

- in /usr/src/bin/ar/ar.c line 116, 160, 184(2), 208

AR_O defined in line 45; used 3 times

- in /usr/src/bin/ar/ar.c line 120, 199
- in /usr/src/bin/ar/extract.c line 109

AR_P defined in line 46; used 4 times

- in /usr/src/bin/ar/ar.c line 123, 160, 187(2)

AR_Q defined in line 47; used 5 times

- in /usr/src/bin/ar/ar.c line 127, 160, 190(2), 208

AR_R defined in line 48; used 5 times

- in /usr/src/bin/ar/ar.c line 131, 160, 193(2), 208

AR_T defined in line 49; used 4 times

- in /usr/src/bin/ar/ar.c line 138, 160, 196(2)

AR_TR defined in line 50; used 10 times

- in /usr/src/bin/ar/ar.c line 135, 181-199(7)
- in /usr/src/bin/ar/archive.c line 218
- in /usr/src/bin/ar/misc.c line 124

AR_U defined in line 51; used 5 times

- in /usr/src/bin/ar/ar.c line 142, 193, 199
- in /usr/src/bin/ar/extract.c line 87
- in /usr/src/bin/ar/replace.c line 111

AR_V defined in line 52; used 16 times

- in /usr/src/bin/ar/append.c line 81
- in /usr/src/bin/ar/ar.c line 145, 181-199(7)
- in /usr/src/bin/ar/contents.c line 75
- in /usr/src/bin/ar/delete.c line 75
- in /usr/src/bin/ar/extract.c line 98
- in /usr/src/bin/ar/move.c line 91
- in /usr/src/bin/ar/print.c line 74
- in /usr/src/bin/ar/replace.c line 116, 152

AR_X defined in line 53; used 4 times

- in /usr/src/bin/ar/ar.c line 148, 160, 199(2)

HDR1 defined in line 89; used 1 times

- in /usr/src/bin/ar/archive.c line 230

HDR2 defined in line 90; used 1 times

- in /usr/src/bin/ar/archive.c line 235

HDR3 defined in line 93; used 1 times

- in /usr/src/bin/ar/archive.c line 226

NOPAD defined in line 71; used 3 times

- in /usr/src/bin/ar/delete.c line 86
- in /usr/src/bin/ar/move.c line 119
- in /usr/src/bin/ar/replace.c line 170

OLDARMAXNAME defined in line 92; used 3 times

- in /usr/src/bin/ar/archive.c line 219-223(2)
- in /usr/src/bin/ar/misc.c line 125

RPAD defined in line 72; used 7 times

- in /usr/src/bin/ar/archive.c line 300
- in /usr/src/bin/ar/delete.c line 72
- in /usr/src/bin/ar/extract.c line 78
- in /usr/src/bin/ar/move.c line 88
- in /usr/src/bin/ar/print.c line 66
- in /usr/src/bin/ar/replace.c line 132, 138

SETCF defined in line 57; used 12 times

- in /usr/src/bin/ar/append.c line 73
- in /usr/src/bin/ar/delete.c line 72, 86
- in /usr/src/bin/ar/extract.c line 78
- in /usr/src/bin/ar/move.c line 88, 119
- in /usr/src/bin/ar/print.c line 66
- in /usr/src/bin/ar/replace.c line 120, 132, 138, 162, 170

WPAD defined in line 73; used 8 times

- in /usr/src/bin/ar/append.c line 73
- in /usr/src/bin/ar/archive.c line 305
- in /usr/src/bin/ar/delete.c line 72
- in /usr/src/bin/ar/move.c line 88
- in /usr/src/bin/ar/replace.c line 120, 132, 138, 163

#### Usage of this include

archive.h used 10 times

- in /usr/src/bin/ar/append.c line 48
- in /usr/src/bin/ar/ar.c line 52
- in /usr/src/bin/ar/archive.c line 49
- in /usr/src/bin/ar/contents.c line 50
- in /usr/src/bin/ar/delete.c line 48
- in /usr/src/bin/ar/extract.c line 49
- in /usr/src/bin/ar/misc.c line 47
- in /usr/src/bin/ar/move.c line 48
- in /usr/src/bin/ar/print.c line 45
- in /usr/src/bin/ar/replace.c line 50

Last modified: 1993-09-25 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1362 |