home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
zoo-2.1.lha
/
zoo
/
options.doc
< prev
next >
Wrap
Text File
|
1991-07-17
|
16KB
|
322 lines
/* derived from: options.doc 1.4 88/08/22 15:24:59 */
/* $Source: /usr/home/dhesi/zoo/RCS/options.doc,v $ */
/* $Id: options.doc,v 1.5 91/07/09 02:53:10 dhesi Exp $ */
Documentation about the file options.h.
The file options.h 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, in portable.h, and possibly in
machine.h and options.c. Everywhere else in the code we only use
names of attributes.
LOOK IN THE FOLLOWING FILES WHEN MAKING CHANGES TO SUPPORT A NEW SYSTEM:
options.h, portable.h, machine.c
ALSO GLANCE AT THESE FILES TO MAKE SURE THEY WILL WORK:
zooio.h, machine.h
Machine names:
MSC Microsoft C under MS-DOS (not currently in use)
TURBOC Turbo C++ 1.0 under MS-DOS (works, compiled version is
separately distributed)
SYS_V Most releases of System V (works)
VMS VAX/VMS 5.4 (works, stream-LF files only)
BSD4_3 4.3BSD an most derivatives (works)
MCH_AMIGA AmigaDOS Aztec/Manx C (not tested; compiled version
will eventually follow)
MERGED OR MIXED SYSTEMS. Many vendors of **IX systems take one of the
two (System V or BSD) and add features from the other. In some cases
they do a terrible job of reconciling irreconcilable differences between
the two, such that the merged system will now compile neither System V
stuff nor BSD stuff. If you are dealing with such a system, try
compiling with both BSD4_3 and SYS_V in turn, and see if one of them
works. If not, then go through the list of compilation symbols below
and pick a set that matches your system.
------------------------------------------------------------------------
NOTE: The term "zoofile" below refers to an open file of type
ZOOFILE. Currently this is defined to be equivalent to a standard
buffered file pointer of type "ZOOFILE *" but this could change in the
future. Dependence on exact definition of ZOOFILE is localized to a
few files: options.h, portable.h, portable.c, and machine.c.
------------------------------------------------------------------------
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 contain function isadir() that
tests a supplied zoofile and returns 1 if it corresponds to a
directory or other special type of file, else 0.
CHEKUDIR
Like CHEKDIR but use function isuadir() that tests a pathname, not
a zoofile. Both CHEKDIR and CHEKUDIR may be defined, if both
functions isadir() and isuadir() are available; in this case
zoo code will use both and will execute slightly faster.
(However, simultaneous definition of CHEKDIR and CHEKUDIR has
not been tested.)
DISK_CH
If defined, must hold the value of a character that separates a
disk name from the rest of the pathname. All characters up to and
including this character will be removed from a pathname before it
is stored in an archive. Usually a colon (':').
EXISTS
If defined, is assumed to be a macro that accepts a filename and
returns an int value of 1 if the file exists and 0 if it doesn't.
If not defined, existence of files is tested by attempting to open
them for read or write access.
FATTR
If defined, file attributes will be preserved. A function
getfattr(f) must also exist that returns the attributes of a
zoofile f (or of a pathname f, if the symbol FATTR_FNAME is
also defined); and a function setfattr(f, a) must exist that
sets the attributes of a file with pathname f to the value a.
For more details see the source code in sysv.c and bsd.c. Currently
the attribute value a is required to be in the zoo portable
format. The lowest nine bits of this format correspond to
the **IX mode bits described for chmod(2) and these are the only
bits currently used.
FATTR_FNAME
If defined, and if FATTR is also defined, zoo code will
obtain the attributes of a file by calling the function
getfattr(f) and supplying it with filename f. If FATTR_FNAME
is not defined, then getfattr(f) is supplied a zoofile f.
ANSI_PROTO
Use ANSI-style function prototypes declarations.
VOIDPTR
The type of a generic pointer, as returned by malloc(). This
should be defined as void * in an ANSI C environment. In most
other environments it will be char *.
LINT
If defined, SCCS identifier strings will not be included in the
generated code. This will make the code smaller and will also
avoid complaints from lint about unused variables. This symbol
should be defined in the Makefile, NOT in `options.h', otherwise
it will not be fully effective.
FOLD
Fold filenames to lowercase. Define this for case-insensitive filesystems
FPUTCHAR
If defined, a library function fputchar() is assumed available
that is like fput() but is a function, not a macro, to save
space. If not defined Zoo uses its own fputchar() function.
PORTABLE
Use portable functions --- define for every system except MS-DOS
PURIFY
When filenames are being read from standard input, ignore all
characters begining with the first blank or tab encountered.
This will allow filenames to be fed from a program that produces
lines containing filenames followed by other information that
should be ignored. Should be defined for most non-**IX systems.
DONT_SORT
Don't sort filename arguments -- files will be stored in the
exact order in which names are supplied on the command line.
Not currently used for any system, but could be used if memory
is really tight.
NOENUM
Compiler does not support enumerations
FNLIMIT
Pathname length limit for this system
NEEDCTYP
If defined, tells the code to include the header file ctype.h for
use by character conversion macros. If and only if NEEDCTYP is not
defined, macros or appropriate function declarations can be put in
portable.h. Zoo uses isupper(), isdigit(), toascii(), and tolower().
If NEEDCTYP is not defined, the symbol USE_ASCII can be defined to
cause zoo to assume the ASCII character set and use its own isupper(),
isdigit(), toascii(), and tolower() functions, possibly making the
executable code smaller.
USE_ASCII
See description of NEEDCTYP. USE_ASCII should not be defined if
NEEDCTYP is defined, else there may be conflicts between macro
and function names.
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 zoofile.
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 zoofile instead of a filename.
NOSIGNAL
Don't use signals because library doesn't support them
T_SIGNAL
The data type returned by a signal handler. Historically
"int", but "void" in ANSI C.
PATH_CH
The character that separates the directory name from the filename
in a pathname. 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.
NEED_MEMSET If defined, zoo will define its own equivalent of memset().
if not defined, zoo will try to link with a standard library function
memset().
EXT_DFLT
default extension for archives. String. Currently ".zoo".
NIXFNAME
If defined, PATH_