home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
proglc
/
zoo141_c.lzh
/
OPTIONS.H
< prev
next >
Wrap
C/C++ Source or Header
|
1987-02-07
|
7KB
|
245 lines
/* options.h */
/*
The contents of this file are hereby released to the public domain.
-- Rahul Dhesi 1986/11/14
*/
/*
This file defines various symbols and macros that are needed to ensure
system-independence. The basic philosophy is to use a distinct symbol for
each attribute that varies from machine to machine. Then, for each new
system, we define symbols corresponding to its attributes. Thus, ideally,
the only place in Zoo code that we actually use the name of a machine is in
this file, portable.h, and possibly in machine.h and options.c. Everywhere
else in the code we only use names of attributes. If you need to define a
new machine name, please refer first to the guidelines in the implementor's
documentation.
Machine names:
MSC Microsoft C under MS-DOS
SYS_V UNIX System V release 2.1
XENIX Xenix release 3.0
VMS VAX/VMS 4.4
BSD4_3 4.3BSD
Attributes of systems:
CHEKDIR
Test each supplied filename and if it is a directory or other special
type of file, do not try to add it to an archive. If CHEKDIR is
defined, then machine.c must also include function isadir() that
tests a supplied handle and returns 1 if it corresponds to a
directory or other special type of file.
CHEKUDIR
Like CHEKDIR but use function isuadir() that tests a pathname, not
a handle. Only one of CHEKDIR, CHEKUDIR may be defined.
LINT_ARGS
Use ANSI-style function argument lists in declarations
FLAT
include files are all in one place (no sys/anything)
FOLD
fold filenames to lowercase. Define this for case-insensitive filesystems
PORTABLE
use portable functions --- define for every system except MS-DOS
DONT_SORT
don't sort filename arguments (already sorted by shell).
NOENUM
compiler does not support enumerations
DUMB_ASS
dumb assertions must be used because the preprocessor doesn't define
the symbols __FILE__ and __LINE__ (which hold the name of the current
file and the number of the current line)
FNLIMIT
filename length limit for this system
NEEDCTYP
the header file ctype.h is needed because functions such as tolower() are
defined only as macros
NIXTIME
If defined, a function setutime() must be defined that will set the
date and time of a file whose pathname is supplied. If not defined,
a function settime() must be defined that will do the same for
a file handle.
GETUTIME
If defined, a function getutime() must be defined that will return
the MS-DOS format date and time of the specified filename. If this
symbol is not defined, then a function gettime() must be defined
that will do the same for a supplied handle instead of a filename.
NOFCNTL
if defined, system expects "file.h" to be included rather than "fcntl.h"
NOSIGNAL
don't use signals because library doesn't support them
PATH_CH
the character that should separate the directory name from the filename
in the listing of the contents of an archive. String value.
PATH_SEP
the set of characters that may separate preceding directory/device
information from the filename. String value.
EXT_SEP is the union of PATH_SEP and the set of characters separating a
filename extension from the rest of the filename. String value.
EXT_CH
character that separates base part of filename from extension. Char value.
EXT_DFLT
default extension for archives. String. Usually ".zoo"
NIXFNAME
if defined, PATH_CH, PATH_SEP, EXT_SEP, EXT_CH, and EXT_DFLT get defined
to conform to UNIX conventions and should not be separately defined
FORCESLASH
if defined any backslashes in names of files will be converted to
slashes before the files are added to an archive. This is useful
for MSDOS-like systems that accept both slashes and backslashes,
since the standard archive format allows only slashes as directory
separators.
REN_LINK
rename a file by using link() followed by unlink() (e.g. Xenix, System V)
REN_NORM
use normal rename function: "int rename(new, old)" (e.g. Microsoft C)
REN_REV
use reverse rename function: "int rename(old, new)" (e.g. 4.2BSD)
Note: define exactly one of REN_LINK, REN_NORM, and REN_REV.
SETMODE
change mode of standard output to binary when piping output, then change
it back to text. Macros MODE_BIN(handle) and MODE_TEXT(handle) must also
be defined.
SETBUF
standard output should be set to be unbuffered so output shows up
quickly.
SPECNEXT
If defined, a machine-dependent function nextfile() must be defined that
will expand wildcards in a supplied pathname. If not defined, a null
nextfile() is automatically used and any wildcard expansion must
have been done before the command line parameters are supplied to
the program.
*/
/* ZOO is always defined currently */
#define ZOO
#ifdef XENIX
#define FNLIMIT 14
#define NIXTIME
#define NIXFNAME
#define LINT_ARGS
#define PORTABLE
#define REN_LINK
#endif
#ifdef SYS_V
#define FNLIMIT 14
#define CHEKDIR
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
#define NOENUM
#define PORTABLE
#define REN_LINK
#define SETBUF
#endif
#ifdef MSC
#define IGNORECASE
#define WILDCARDS
#define FOLD
#define FORCESLASH
#define FNLIMIT 12
#define NEEDCTYP
#define CUR_DIR "."
#define PATH_CH "/"
#define PATH_SEP ":/\\"
#define EXT_CH '.'
#define EXT_SEP ":/\\."
#define EXT_DFLT ".zoo"
#define SETMODE
#define MODE_BIN(handle) setmode(handle, O_BINARY)
#define MODE_TEXT(handle) setmode(handle, O_TEXT)
#define LINT_ARGS
#define REN_NORM
#ifdef PORTABLE
#define SPECNEXT
#define NIXTIME
#endif
#endif /* MSC */
#ifdef BSD4_3
#define FNLIMIT 1023
#define CHEKDIR
#define NIXTIME
#define NIXFNAME
#define NEEDCTYP
#define PORTABLE
#define NOENUM
#define REN_REV
#define SETBUF
#endif
#ifdef VMS
#define FNLIMIT 78
#define PATH_SEP ":]"
#define EXT_CH '.'
#define EXT_SEP ":]."
#define EXT_DFLT ".zoo"
#define NOENUM
#define FLAT
#define PORTABLE
#define DUMB_ASS
#define NOFCNTL
#endif
#ifdef MCH_AMIGA
#define SPECNEXT
#define IGNORECASE
#define FNLIMIT 30
#define NEEDCTYP
#define CUR_DIR "."
#define PATH_CH "/"
#define PATH_SEP ":/"
#define EXT_CH '.'
#define EXT_SEP ":/."
#define EXT_DFLT ".zoo"
#define PORTABLE
#define NOSIGNAL
#define REN_REV
/* #define FLAT */
#define NOENUM
#define SETBUF
#define CHEKUDIR
#define GETUTIME
#define NIXTIME
#endif
#ifdef NIXFNAME
#define CUR_DIR "."
#define PATH_CH "/"
#define PATH_SEP "/"
#define EXT_CH '.'
#define EXT_SEP "/."
#define EXT_DFLT ".zoo"
#endif
#ifdef GENERIC
/* #define SPECNEXT */
#define IGNORECASE
#define FNLIMIT 11
#define NEEDCTYP
#define CUR_DIR "."
#define PATH_CH "/"
#define PATH_SEP ":/"
#define EXT_CH '.'
#define EXT_SEP ":/."
#define EXT_DFLT ".zoo"
#define PORTABLE
#define NOSIGNAL
/* REN_LINK is UNIX-specific. Can't find a generic rename() function */
#define REN_LINK
/* #define FLAT */
#define NOENUM
#define SETBUF
#define CHEKUDIR
#define GETUTIME
#define NIXTIME
#endif