If you want almanak to compile under your favourite compiler
you should read this section...

Since Almanak may run on a UNIX machine as well as a DOS machine I've
included special ifdef's in the code for easy portability.

Almanak was written using 99.99 % ANSI C and compiles
without any problems under the following compilers:

Turbo C++ 1.0 - 3.1, Zortech C++ 3.0, Watcom C 386 8.0,
Ultrix ANSI C, Microsoft 6.0, GCC 2.18

( All trademarks are respective of their own companies )

Almanak was written and tested under the Zortech compiler.
The other compilers have been used to verify that the source code
is 'portable' and that the resulting code is executable.

Almanak does not compile under Turbo C ver 2.0 since ver 2.0
doesn't have the function strftime and mktime in it's library.


If you have problems compiling almanak check the following:

Look at the function Abort in the module filespec.c. Abort uses
a variable number of arguments. I use <stdarg.h> while your
compiler may use the older ( pre ANSI ) <varargs.h>.

Some pre ANSI compilers don't have __DATE__ or __TIME__  defined,
define them to whatever strings you like.


If you've got the Zortech compiler and want to use the extended
character set on the PC please read the last section of this file.

Below is a list of command lines for use with various compilers:

- Borland C++ 3.0
bcc -ms almanak.c datecalc.c filespec.c jd2greg.c

- Borland C++ 1.0
tcc -ms almanak.c datecalc.c filespec.c jd2greg.c

- Microsoft
cl /AS almanak.c datecalc.c filespec.c jd2greg.c

- Zortech
ztc -mis almanak.c datecalc.c filespec.c jd2greg.c

- Watcom
wcl386 almanak.c datecalc.c filespec.c jd2greg.c

- UN?X
cc -o almanak almanak.c datecalc.c filespec.c jd2greg.c

- GCC
gcc -o almanak almanak.c datecalc.c filespec.c jd2greg.c

The following section is only for people using Zortech compilers
and only if you have access to the library source.
( this is a copy of the message I sent Zortech )

Discovered problem in premature scan stop of strings containing
extended ASCII character ( i.e. 127 and upwards ). Scanning stops
when an extended character is encountered. The error is not obvious,
it only occurs in special situations ( like after running the utility
EXPAND under MS-DOS 5.0 ) and generally gets reset after a program
has twiddled with both display pages ( i.e. Brief ).

The solution is quite simple the two 'helper' functions for
sscanf :  sgetc and sungetc should have 'unsigned' casts
so change the file scanf.s and recompile the library module using
the command: repdos scanf

before: ******** in file scanf.c
static int sgetc(void *ps)
{      return (*(*(char **)ps)) ? *(*(char **)ps)++ : EOF;
}

static int sungetc(int c,void *ps)
{      return (c == EOF) ? c : (*--(*(char **)ps) = c);
}

after: ******** in file scanf.c
static int sgetc(void *ps)
{  return (*(*( unsigned char **)ps)) ? *(*( unsigned char **)ps)++ : EOF;
}

static int sungetc(int c,void *ps)
{  return (c == EOF) ? c : (*--(*( unsigned char **)ps) = c);
}
