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