ar.h revision 1.3 1 1.3 cgd /*-
2 1.3 cgd * Copyright (c) 1991, 1993
3 1.3 cgd * The Regents of the University of California. All rights reserved.
4 1.3 cgd * (c) UNIX System Laboratories, Inc.
5 1.3 cgd * All or some portions of this file are derived from material licensed
6 1.3 cgd * to the University of California by American Telephone and Telegraph
7 1.3 cgd * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 1.3 cgd * the permission of UNIX System Laboratories, Inc.
9 1.3 cgd *
10 1.3 cgd * This code is derived from software contributed to Berkeley by
11 1.3 cgd * Hugh Smith at The University of Guelph.
12 1.3 cgd *
13 1.3 cgd * Redistribution and use in source and binary forms, with or without
14 1.3 cgd * modification, are permitted provided that the following conditions
15 1.3 cgd * are met:
16 1.3 cgd * 1. Redistributions of source code must retain the above copyright
17 1.3 cgd * notice, this list of conditions and the following disclaimer.
18 1.3 cgd * 2. Redistributions in binary form must reproduce the above copyright
19 1.3 cgd * notice, this list of conditions and the following disclaimer in the
20 1.3 cgd * documentation and/or other materials provided with the distribution.
21 1.3 cgd * 3. All advertising materials mentioning features or use of this software
22 1.3 cgd * must display the following acknowledgement:
23 1.3 cgd * This product includes software developed by the University of
24 1.3 cgd * California, Berkeley and its contributors.
25 1.3 cgd * 4. Neither the name of the University nor the names of its contributors
26 1.3 cgd * may be used to endorse or promote products derived from this software
27 1.3 cgd * without specific prior written permission.
28 1.3 cgd *
29 1.3 cgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30 1.3 cgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 1.3 cgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 1.3 cgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33 1.3 cgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 1.3 cgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 1.3 cgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 1.3 cgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 1.3 cgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 1.3 cgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 1.3 cgd * SUCH DAMAGE.
40 1.3 cgd *
41 1.3 cgd * from: @(#)ar.h 8.2 (Berkeley) 1/21/94
42 1.3 cgd * $Id: ar.h,v 1.3 1994/05/16 10:58:54 cgd Exp $
43 1.3 cgd */
44 1.3 cgd
45 1.3 cgd #ifndef _AR_H_
46 1.3 cgd #define _AR_H_
47 1.3 cgd
48 1.3 cgd /* Pre-4BSD archives had these magic numbers in them. */
49 1.3 cgd #define OARMAG1 0177555
50 1.3 cgd #define OARMAG2 0177545
51 1.3 cgd
52 1.3 cgd #define ARMAG "!<arch>\n" /* ar "magic number" */
53 1.3 cgd #define SARMAG 8 /* strlen(ARMAG); */
54 1.3 cgd
55 1.3 cgd #define AR_EFMT1 "#1/" /* extended format #1 */
56 1.3 cgd
57 1.3 cgd struct ar_hdr {
58 1.3 cgd char ar_name[16]; /* name */
59 1.3 cgd char ar_date[12]; /* modification time */
60 1.3 cgd char ar_uid[6]; /* user id */
61 1.3 cgd char ar_gid[6]; /* group id */
62 1.3 cgd char ar_mode[8]; /* octal file permissions */
63 1.3 cgd char ar_size[10]; /* size in bytes */
64 1.3 cgd #define ARFMAG "`\n"
65 1.3 cgd char ar_fmag[2]; /* consistency check */
66 1.3 cgd };
67 1.3 cgd
68 1.3 cgd #endif /* !_AR_H_ */
69