xref: /original-bsd/include/ar.h (revision 333da485)
1 /*-
2  * Copyright (c) 1991, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  * (c) UNIX System Laboratories, Inc.
5  * All or some portions of this file are derived from material licensed
6  * to the University of California by American Telephone and Telegraph
7  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8  * the permission of UNIX System Laboratories, Inc.
9  *
10  * This code is derived from software contributed to Berkeley by
11  * Hugh Smith at The University of Guelph.
12  *
13  * %sccs.include.redist.c%
14  *
15  *	@(#)ar.h	8.2 (Berkeley) 01/21/94
16  */
17 
18 #ifndef _AR_H_
19 #define	_AR_H_
20 
21 /* Pre-4BSD archives had these magic numbers in them. */
22 #define	OARMAG1	0177555
23 #define	OARMAG2	0177545
24 
25 #define	ARMAG		"!<arch>\n"	/* ar "magic number" */
26 #define	SARMAG		8		/* strlen(ARMAG); */
27 
28 #define	AR_EFMT1	"#1/"		/* extended format #1 */
29 
30 struct ar_hdr {
31 	char ar_name[16];		/* name */
32 	char ar_date[12];		/* modification time */
33 	char ar_uid[6];			/* user id */
34 	char ar_gid[6];			/* group id */
35 	char ar_mode[8];		/* octal file permissions */
36 	char ar_size[10];		/* size in bytes */
37 #define	ARFMAG	"`\n"
38 	char ar_fmag[2];		/* consistency check */
39 };
40 
41 #endif /* !_AR_H_ */
42