Home | History | Annotate | Line # | Download | only in include
ar.h revision 1.4
      1  1.4  cgd /*	$NetBSD: ar.h,v 1.4 1994/10/26 00:55:43 cgd 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.3  cgd  * 3. All advertising materials mentioning features or use of this software
     24  1.3  cgd  *    must display the following acknowledgement:
     25  1.3  cgd  *	This product includes software developed by the University of
     26  1.3  cgd  *	California, Berkeley and its contributors.
     27  1.3  cgd  * 4. Neither the name of the University nor the names of its contributors
     28  1.3  cgd  *    may be used to endorse or promote products derived from this software
     29  1.3  cgd  *    without specific prior written permission.
     30  1.3  cgd  *
     31  1.3  cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     32  1.3  cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     33  1.3  cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     34  1.3  cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     35  1.3  cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36  1.3  cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37  1.3  cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38  1.3  cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     39  1.3  cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     40  1.3  cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     41  1.3  cgd  * SUCH DAMAGE.
     42  1.3  cgd  *
     43  1.4  cgd  *	@(#)ar.h	8.2 (Berkeley) 1/21/94
     44  1.3  cgd  */
     45  1.3  cgd 
     46  1.3  cgd #ifndef _AR_H_
     47  1.3  cgd #define	_AR_H_
     48  1.3  cgd 
     49  1.3  cgd /* Pre-4BSD archives had these magic numbers in them. */
     50  1.3  cgd #define	OARMAG1	0177555
     51  1.3  cgd #define	OARMAG2	0177545
     52  1.3  cgd 
     53  1.3  cgd #define	ARMAG		"!<arch>\n"	/* ar "magic number" */
     54  1.3  cgd #define	SARMAG		8		/* strlen(ARMAG); */
     55  1.3  cgd 
     56  1.3  cgd #define	AR_EFMT1	"#1/"		/* extended format #1 */
     57  1.3  cgd 
     58  1.3  cgd struct ar_hdr {
     59  1.3  cgd 	char ar_name[16];		/* name */
     60  1.3  cgd 	char ar_date[12];		/* modification time */
     61  1.3  cgd 	char ar_uid[6];			/* user id */
     62  1.3  cgd 	char ar_gid[6];			/* group id */
     63  1.3  cgd 	char ar_mode[8];		/* octal file permissions */
     64  1.3  cgd 	char ar_size[10];		/* size in bytes */
     65  1.3  cgd #define	ARFMAG	"`\n"
     66  1.3  cgd 	char ar_fmag[2];		/* consistency check */
     67  1.3  cgd };
     68  1.3  cgd 
     69  1.3  cgd #endif /* !_AR_H_ */
     70