Download The Image Processing Workbench - ERI people pages

Transcript
- 249 -
combination of ANSI C [ANSI 1989] and POSIX [IEEE 1988].
8.6.1. h/config.h
The file h/config.h contains many #define’s that customize your C environment. The directory h/conf contains versions of h/config.h for various systems.
You should copy or link the most appropriate one to h/config.h. Unless your system
EXACTLY matches one of the configurations in h/conf, you should check each
#define against its description in h/conf/README. Here are some things to pay special attention to:
CC_NOBCOPY, CC_NOBZERO
Note that these options read as a double-negative; i.e.
bcopy() ISN’T provided in your host’s C library.
CC_NOBCOPY should be 1 if
CC_BIGENDIAN
This option refers to the order of bytes in an integer; it should be 1 on machines
where the memory address of an integer is also the address of its high-order byte
(e.g., MC680x0).
OPT_BUF
This is the buffer size IPW uses with read() and write(). It MUST NOT be
larger than the maximum number of bytes that may be written to a pipe in a single write(). 4096 is the largest portable value. On memory-limited systems,
you may want to use a smaller value, in which case 1024 is suggested.
FREG_?
These options are only appropriate for machines with separate floating-point
registers (e.g. MC68881) that are known to the C compiler. Do NOT use for
machines that store floating-point values in general registers (e.g. VAX).
8.6.2. h/ansi
If your system has ANSI-conforming C header files, then you must copy or link
<float.h> and <limits.h> to the directory h/ansi. Otherwise, you must create substitutes for these header files, as described below.
8.6.2.1. h/ansi/float.h
The file h/ansi/float.h is a substitute for the ANSI header file <float.h>.
The directory h/ansi/conf.float contains versions of h/ansi/float.h for various
systems. If you’re lucky, you’ll be able to copy or link one of these files unchanged into
h/ansi/float.h. If you’re a bit less lucky, i.e. if your particular machine isn’t mentioned explicitly, BUT it supports IEEE 754 floating point, you can copy or link the generic file h/ansi/conf.float/ieee754.
If, however, you’re not so lucky, you’ll have to generate a h/ansi/float.h from
scratch. First, try going to the directory src/etc/machine and typing make. If the
resulting program machine40 compiles and runs successfully, it will generate a
float.h case for your machine - you just have to catch the output of machine -float
in h/ansi/float.h.
In the unlikely event that machine won’t compile or run successfully, you’ll have
to do some detective work. Your system may have a file <values.h> that contains
_________________
40
machine incorporates a C version of the Fortran subroutine machar [Cody 1988].