1 /*
2  * $Header: /cvsroot/arc/arc/arc.h,v 1.2 2003/10/31 02:22:36 highlandsun Exp $
3  */
4 
5 #undef	DOS	/* Just in case... */
6 #undef	UNIX
7 
8 /*
9  * Assumptions:
10  * char = 8 bits
11  * short = 16 bits
12  * long = 32 bits
13  * int >= 16 bits
14  */
15 
16 #if	MSDOS || GEMDOS
17 #define	DOS	1
18 #define	CUTOFF	'\\'
19 #define	OPEN_R	"rb"
20 #define	OPEN_W	"wb"
21 #if	__GNUC__
22 #include <types.h>
23 #include <string.h>
24 #endif
25 #endif
26 
27 #if	!MSDOS
28 #define	envfind	getenv
29 #define	setmem(a, b, c)	memset(a, c, b)
30 #endif
31 
32 #if	BSD || SYSV
33 #define	UNIX	1
34 #define	CUTOFF	'/'
35 #define	OPEN_R	"r"
36 #define	OPEN_W	"w"
37 #include <ctype.h>
38 #include <sys/types.h>
39 #endif
40 
41 #if	_MTS
42 #define	CUTOFF	sepchr[0]
43 #define	OPEN_R	"rb"
44 #define	OPEN_W	"wb"
45 #endif
46 
47 #define	MYBUF	32766		/* Used for fopens and filecopy() */
48 
49 #if	_MTS || SYSV
50 #define	rindex	strrchr
51 #define	index	strchr
52 #endif
53 
54 #if	__STDC__
55 #include <stdlib.h>
56 #define	VOID	void
57 #define	PROTO(args)	args
58 #else
59 #define	VOID	int
60 #define	PROTO(args)	()
61 #endif
62 
63 /*  ARC - Archive utility - ARC Header
64 
65     Version 2.17, created on 04/22/87 at 13:09:43
66 
67 (C) COPYRIGHT 1985,86 by System Enhancement Associates; ALL RIGHTS RESERVED
68 
69     By:	 Thom Henderson
70 
71     Description:
72 	 This is the header file for the ARC archive utility.  It defines
73 	 global parameters and the references to the external data.
74 
75 
76     Language:
77 	 Computer Innovations Optimizing C86
78 */
79 
80 #define ARCMARK 26		/* special archive marker        */
81 #define ARCVER 9		/* archive header version code   */
82 #define STRLEN 100		/* system standard string length */
83 #define FNLEN 13		/* file name length              */
84 #define MAXARG 400		/* maximum number of arguments   */
85 
86 #if	!UNIX
87 typedef unsigned int	u_int;
88 #ifndef	__GNUC__
89 typedef unsigned char	u_char;
90 typedef unsigned short	u_short;
91 #endif
92 #endif
93 #define	reg	register
94 
95 #ifndef DONT_DEFINE		/* Defined by arcdata.c */
96 #include "arcs.h"
97 
98 extern int      keepbak;	/* true if saving the old archive */
99 #if	!DOS
100 extern int      image;		/* true to suppress CRLF/LF x-late */
101 #endif
102 #if	_MTS
103 extern char     sepchr[2];	/* Shared file separator, default = ':' */
104 extern char     tmpchr[2];	/* Temporary file prefix, default = '-' */
105 #endif
106 #if	GEMDOS
107 extern int      hold;		/* hold screen before exiting */
108 #endif
109 extern int      arcwarn;	/* true to print warnings */
110 extern int      note;		/* true to print comments */
111 extern int      bose;		/* true to be verbose */
112 extern int      nocomp;		/* true to suppress compression */
113 extern int      overlay;	/* true to overlay on extract */
114 extern int      kludge;		/* kludge flag */
115 extern char    *arctemp;	/* arc temp file prefix */
116 extern char    *password;	/* encryption password pointer */
117 extern int      nerrs;		/* number of errors encountered */
118 extern int      changing;	/* true if archive being modified */
119 
120 extern char     hdrver;		/* header version */
121 
122 extern FILE    *arc;		/* the old archive */
123 extern FILE    *new;		/* the new archive */
124 extern char     arcname[STRLEN];/* storage for archive name */
125 extern char     bakname[STRLEN];/* storage for backup copy name */
126 extern char     newname[STRLEN];/* storage for new archive name */
127 extern u_short	arcdate;	/* archive date stamp */
128 extern u_short	arctime;	/* archive time stamp */
129 extern u_short	olddate;	/* old archive date stamp */
130 extern u_short	oldtime;	/* old archive time stamp */
131 extern int      dosquash;	/* squash instead of crunch */
132 #endif				/* DONT_DEFINE */
133