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