To port testbase to a new environment you need to write some system-
and floating-point-dependent routines.  These are kept in the system/
and precision/ subdirectories, respectively.  The easiest ways to write
these routines for a new system are to inspect those already existing
for similar systems and copy (or #include) as much as possible.

There are five source files for system-dependent routines.  If the
new system is to be called XYZ, say, then the files are:

	system/XYZ-config.h
	    Defines and include files, as follows:

		TEST_EXCEPTIONS_DEFAULT should be #defined to 1 if
		    IEEE exceptions should by default be checked
		    to see if they're correctly set by the
		    conversion routines

		NORMAL_ROUNDING should be the default rounding mode;
		    round_unbiased on IEEE machines, round_biased on Vax's

		DECIMALSTRING_LENGTH is some value well above the
		    size of the full exponent range (e.g., for double
		    precision this is something > 308 - (-308))
	    
		FDECIMAL is a FORTRAN declaration for a character string
		    of this size; not presently used

		MAXFLOATSIZE is how many multiples of FLOATSIZEUNIT (see
		    below) comprise the largest precision that you will
		    be testing.  On most IEEE machines this is 2 if you
		    will be testing up to double precision.

		ALLOC_TYPE is the type returned by the malloc() family
		    of calls

		include files, if any, are those needed for defining
		    the malloc() family of calls

	system/XYZ-except.c
	    Defines two routines for dealing with IEEE exceptions:

		clear_exceptions() clears all IEEE exception flags
		get_exceptions() returns a mask of the set IEEE
		    exception flags

	system/XYZ-intr.c
	    Defines one routine:

		init_interrupt_handling(), which intializes so that
		    any desired interrupts will result in the routine
		    "interrupt" being called, allowing testbase to shut
		    down gracefully

	system/XYZ-os.c
	    Defines one routine:

		seconds() returns a floating-point representation of the
		    number of real-time elapsed seconds since some event
		    (such as the last boot, or any fixed time)

	system/XYZ-round.c
	    Defines one routine:

		set_test_rounding(), which, given a testbase rounding
		    mode, sets the floating-point rounding to that mode
		    (if no modes other than the default are supported then
		    this routine simply does nothing)


For a given precision P, there are two relevant files:

	precision/XYZ-P.h
	    Defines the following:

		FLOATSIZEUNIT is the units with which this floating-point
		    precision is laid out in memory.  Typically this is
		    4 bytes (in which case use "unsigned long") but in
		    some cases (e.g., Vax) it's 2 bytes (use "unsigned short")

		FLOAT is a type equivalent to this precision (e.g., 'double'
		    for double-precision)

		FLOAT_IS_ARRAY is 1 if the FLOAT type is an array and 0 if not

		FLOATSTRING is a name for the type, such as "double"

		FBINARY is a FORTRAN equivalent of FLOAT

		CONV is a scanf conversion for the precision, such as "%lf"
		    for double-precision

		BIGINTSIZE is black-magic that should be copied from
		    precision/sun4.1-{s,d,x,q}p.h for single, double,
		    extended, and quadruple precision, respectively

		FLOAT_PRECISION is the number of bits in the precision's
		    floating-point mantissa (including the implicit top
		    bit, if any).  It's 24 for IEEE single precision and
		    53 for double precision.

	    For IEEE machines, simply #include precision/sun4.1-{s,d,x,q}p.h.


	precision/XYZ-P.c
	    A bunch of precision-related routines.  For IEEE machines,
	    these can all be taken directly from precision/sun4.1-{s,d,x,q}p.c
	    by just #include'ing the appropriate file.  For non-IEEE machines,
	    see precision/vms-{d,f,g}.c as an example.


Once you have written the system/ and precision/ routines for system
XYZ and precision P, you then configure testbase by running

	config.sh XYZ P

This will copy the corresponding source files into the testbase main
directly.  Now use "make" to build testbase.  You can use

	make clean
	make config-clean

to remove the current configuration and prepare for executing "config.sh"
again.  The current configuration is recorded in the file "curr-config".
