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