-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.h
381 lines (345 loc) · 9.15 KB
/
options.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
/* @(#) options.h 2.22 88/08/24 15:27:36 */
/*
The contents of this file are hereby released to the public domain.
-- Rahul Dhesi 1991/07/06
For documentation about this file, see options.doc.
*/
#define ZOO /* always defined */
#define PORTABLE /* always defined */
#define ZOOCOMMENT /* always defined */
/***********************************************************************/
/* Linux */
/***********************************************************************/
#ifdef LINUX
#define FILTER
#define IO_MACROS
#define EXISTS(f) (access(f, 00) == 0)
#define FNLIMIT 1023
#define CHEKDIR
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
#define NOENUM
#define REN_STDC
#define SETBUF
#define GETTZ
#define FATTR
#define T_SIGNAL void
#define STDARG
#define HAVE_ISATTY /* undocumented #define option */
#define ANSI_PROTO
#define VOIDPTR void *
#define NO_STDIO_FN /* Do we need this? RUARI QUINN */
#endif /* Linux */
/***********************************************************************/
/* SYSTEM V (should be compatible with most releases) */
/***********************************************************************/
#ifdef SYS_V
#define FILTER
#define IO_MACROS
#define EXISTS(f) (access(f, 00) == 0)
#define FNLIMIT 14
#define CHEKDIR
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
#define NOENUM
#define REN_LINK
#define SETBUF
#define GETTZ
#define FATTR
#define T_SIGNAL void
#define VARARGS
#define NEED_MEMMOVE
/* #define NEED_MEMCPY */
#define T_UINT16 unsigned short /* must be 16 bit unsigned */
#define HAVE_ISATTY
/* #define NEED_VPRINTF */
#endif /* SYS_V */
/***********************************************************************/
/* Turbo C++ 1.0 under MS-DOS */
/***********************************************************************/
#ifdef TURBOC
#undef PORTABLE
#define ANSI_HDRS
#define USE_ASCII
#define SPECINIT
#define SPECEXIT
#define PURIFY
#define DISK_CH ':'
#define IGNORECASE
#define WILDCARD "*.*"
#define FOLD
#define FORCESLASH
#define FNLIMIT 12
#define CUR_DIR "."
#define PATH_SEP ":/\\"
#define EXT_SEP ":/\\."
#define SETMODE
/* 0x8000 and 0x4000 taken from <fcntl.h> for Turbo C */
#define MODE_BIN(f) setmode(fileno(f), 0x8000)
#define MODE_TEXT(f) setmode(fileno(f), 0x4000)
#define NEED_STDIO
#define ANSI_PROTO
#define VOIDPTR void *
#define REN_STDC
#define STDARG
#define T_UINT16 unsigned short /* must be 16 bit unsigned */
/* #define UNBUF_IO */
/* #define UNBUF_LIMIT 512 */
#define T_SIGNAL void
#define DIRECT_CONVERT
#define CHECK_BREAK
#define check_break kbhit
#define HAVE_ISATTY
#ifdef PORTABLE /* for testing only */
# define SPECNEXT
# define NIXTIME
# undef WILDCARD
#endif
#endif /* TURBOC */
/***********************************************************************/
/* Older BSD 4.3 and most derivatives */
/***********************************************************************/
#ifdef BSD4_3
#define FILTER
#define IO_MACROS
#define EXISTS(f) (access(f, 00) == 0)
#define FNLIMIT 1023
#define CHEKDIR
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
#define REN_STDC
#define SETBUF
#define GETTZ
#define FATTR
#ifdef __STDC__
#ifndef ANSI_HDRS
#define ANSI_HDRS
#endif
#define T_SIGNAL void
#define STDARG
#define ANSI_PROTO
#define VOIDPTR void *
#else
#define NOENUM
#define NOSTRCHR /* not really needed for 4.3BSD */
#define T_SIGNAL int
#define VARARGS
#define NEED_MEMMOVE
#define NEED_VPRINTF /* older BSDs only; newer ones have vprintf */
#endif
#define T_UINT16 unsigned short /* must be 16 bit unsigned */
#define HAVE_ISATTY
#endif /* BSD4_3 */
/* Ultrix 4.1 */
#ifdef ULTRIX
#define NO_STDIO_FN /* avoid declaring certain stdio functions */
#define NOSTRCHR /* needed? */
#define FILTER
#define IO_MACROS
#define EXISTS(f) (access(f, 00) == 0)
#define FNLIMIT 1023
#define CHEKDIR
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
#define NOENUM
#define REN_STDC
#define SETBUF
#define GETTZ
#define FATTR
#define T_SIGNAL void
#define VARARGS
#define NEED_MEMMOVE
#define T_UINT16 unsigned short /* must be 16 bit unsigned */
#define HAVE_ISATTY
/* #define NEED_VPRINTF */
#define BSD4_3 /* for I/O definitions */
#endif /* ULTRIX */
/***********************************************************************/
/* Newer BSD 4.4 (projected) */
/***********************************************************************/
#ifdef BSD4_4
/* #define NOSTRCHR */
#define FILTER
#define IO_MACROS
#define EXISTS(f) (access(f, 00) == 0)
#define FNLIMIT 1023
#define CHEKDIR
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
/* #define NOENUM */
#define REN_STDC
#define SETBUF
#define GETTZ
#define FATTR
#define T_SIGNAL void
#define STDARG
/* #define VARARGS */
/* #define NEED_MEMMOVE */
#define T_UINT16 unsigned short /* must be 16 bit unsigned */
#define HAVE_ISATTY
/* #define NEED_VPRINTF */
#define BSD4_3 /* for I/O definitions */
#endif /* BSD4_4 */
/***********************************************************************/
/* VAX/VMS version 5.3 or so */
/***********************************************************************/
#ifdef VMS
/*
Select VMS pre-4.6 or later next line. Pre-4.6 library does not have
rename() and memset() so zoo defines its own; 4.6 has these, so we
must use them, else VMS library functions will conflict with our
own.
*/
# if 0 /* Make this 1 for VMS version 4.5 or earlier */
# define NEED_VMS_RENAME /* used in vms.c */
# define NEED_MEMSET
# endif
#define REN_STDC
#define IO_MACROS
#define SPEC_WILD
#define EXT_ANYWAY
#define VER_CH ';'
#define SPECEXIT
#define CHEKUDIR
#define FNLIMIT 78
#define DIR_SEP '.' /* separates dir fields */
#define DISK_CH ':'
#define DIR_LBRACK "[" /* left bracketing symbol dir dir name */
#define PATH_CH "]"
#define PATH_SEP ":]"
#define EXT_SEP ":]."
#define CUR_DIR "."
#define NIXTIME
#define NEEDCTYP
#define NOENUM
#define IGNORECASE
#define SPECMOD
#define SPECNEXT
#define WILDCARD "*.*"
#define FOLD
#define NO_STDIO_FN
#define T_SIGNAL void
#define T_UINT16 unsigned short /* must be 16 bit unsigned */
#define VARARGS
#endif /* VMS */
/***********************************************************************/
/* AMIGA, SOME VERSION -- NOT TESTED, MAY NEED PORTING */
/***********************************************************************/
#ifdef MCH_AMIGA
#define PURIFY
#define DISK_CH ':'
#define SPECNEXT
#define WILDCARD "*"
#define IGNORECASE
#define FNLIMIT 30
#define NEEDCTYP
#define CUR_DIR "."
#define PATH_SEP ":/"
#define EXT_SEP ":/."
#define NOSIGNAL
#define REN_STDC
#define NOENUM
#define SETBUF
#define CHEKUDIR
#define GETUTIME
#define NIXTIME
#endif
/***********************************************************************/
/* GENERIC **IX SYSTEM -- GOOD STARTING POINT FOR YOURS */
/***********************************************************************/
#ifdef GENERIC
/* #define SPECNEXT */
/* #define IGNORECASE */
#define FNLIMIT 14
#define NEEDCTYP
#define CUR_DIR "."
#define PATH_SEP "/"
#define EXT_SEP "/."
/* #define NOSIGNAL */
/* REN_LINK is UNIX-specific. Can't find a generic rename() function */
#define REN_LINK
#define NOENUM
/* #define SETBUF */
#define CHEKDIR
#define NIXTIME
#define HAVE_ISATTY
#define NEED_MEMMOVE
#endif /* GENERIC */
/***********************************************************************/
/* REST OF THIS FILE SHOULD NOT NEED ANY CHANGES */
/***********************************************************************/
/***********************************************************************/
/* Common filename conventions for **IX systems */
/***********************************************************************/
#ifdef NIXFNAME
#define CUR_DIR "."
#define PATH_SEP "/"
#define EXT_CH '.'
#define EXT_SEP "/."
#define EXT_DFLT ".zoo"
#endif
/* Compensate for strchr/index differences */
#ifdef NOSTRCHR
#define strchr index
#define strrchr rindex
#endif
/* let non-**IX lints under **IX work (see makefile) */
#ifdef CROSS_LINT
# undef ANSI_HDRS
# undef ANSI_PROTO
# ifdef STDARG
# undef STDARG
# define VARARGS
# endif /* STDARG */
#endif
/* assume certain defaults */
#ifndef VOIDPTR
# define VOIDPTR char *
#endif
#ifndef VER_DISPLAY
# define VER_DISPLAY ";"
#endif
#ifndef VER_INPUT
# define VER_INPUT ":;"
#endif
#ifndef PATH_CH
# define PATH_CH "/"
#endif
#ifndef EXT_CH
# define EXT_CH '.'
#endif
#ifndef EXT_DFLT
# define EXT_DFLT ".zoo"
#endif
#ifndef STDARG
# ifndef VARARGS
# define VARARGS
# endif
#endif
#ifndef T_SIGNAL
# define T_SIGNAL int
#endif
#ifdef STDARG
# ifdef VARARGS
# include "DO NOT DEFINE BOTH STDARG AND VARARGS"
# endif
#endif
/* We supply a default for T_UINT16 if it is not defined. But this
value is critical, so we compile in a runtime check. */
#ifndef T_UINT16
# define T_UINT16 unsigned short
# define CHECK_TUINT /* will do runtime check for correct size */
#endif
/* ANSI compatibility in declarations -- see zoofns.h for usage */
#ifndef PARMS
# ifdef ANSI_PROTO
# define PARMS(x) x
# else
# define PARMS(x) ()
# endif
#endif