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