/* common.h -- common header for all L Avery's programs * * This header file should be included in all C programs, usually * following the #include's for system header files (e.g. stdio.h) and * preceding the #include's for program-specific headers. */ /* operating system-dependent constants */ /* unix constants */ #if (defined unix) #ifndef NULL #define NULL 0 #endif #define NOERR 0 #define ERROR 1 #define STARTUP { PROGNAME = *argv; argv++; argc--; } #define EXITOK exit(NOERR) /* VAX VMS constants */ #elif (defined vaxc) #include ssdef #define NOERR SS$_NORMAL #define ERROR 0 #define STARTUP { PROGNAME = *argv; redirect(&argc, &argv); argv++; argc--; } #define EXITOK exitok(NOERR) /* unknown operating system */ #else #ifndef NULL #define NULL ((char *) 0) #endif #define NOERR 0 #define ERROR 1 #define STARTUP { PROGNAME = *argv; argv++; argc--; } #define EXITOK exit(NOERR) /* end of operating system section */ #endif /* hardware-dependent constants */ /* sparc */ #if (defined sparc) #ifndef MAXINT #define MAXINT (0x7fffffff) #define MININT (-0x100000000) #define MAXLONG (0x7fffffff) #define MINLONG (-0x100000000) #endif /* vax */ #elif (defined vaxc) #ifndef MAXINT #define MAXINT (32767) #define MININT (-32768) #define MAXLONG (0x7fffffff) #define MINLONG (-0x100000000) #endif /* unknown hardware */ #else #ifndef MAXINT #define MAXINT (32767) #define MININT (-32768) #define MAXLONG (0x7fffffff) #define MINLONG (-0x100000000) #endif /* end of hardware section */ #endif /* constants independent of environment */ #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #define LLEN 0x400 #define delete unlink