
/* core.h								*/
/*	Have deliberately chose NOT to have INNEROPTIONS in here, so	*/
/*	think hard before changing mind about that...			*/

/*	Note that there is a system core.h file (which presumably deals	*/
/*	with core dump files).  Presumably no conflict.  Even if there	*/
/*	would be, presumably one can get both into one's program by	*/
/*	using <core.h> "core.h" and/or fooling with -I on compile	*/

/*	Anticipate multiple attempted loads of core.h			*/
#ifndef COREH_VERSION

#define COREH_VERSION "core.h  version 1.2   4 Feb 2004"
/*   4 Feb 04.  v 1.2  WJS						*/
/*	MAXLEN_PROGRAM_ID_STRING 					*/
/*	pwd.h (needed for "approved" way to get user name)		*/
/*  16 Jan 04.  v 1.1  WJS						*/
/*	MISSING_VALUE_REAL, NULL_DEVICE					*/

#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include OPTIONS

#ifndef FALSE
  /*  Not sure where the system defns of these are on Bob's box, if 	*/
  /*  anywhere and we gotta have them.  C defines FALSE but doesn't	*/
  /*  care about TRUE, so define latter in terms of former in case	*/
  /*  there are system differences (eg, VMS generally likes -1 for	*/
  /*  TRUE...)								*/
#define FALSE 0
#define TRUE !FALSE
#endif
#if FALSE || !TRUE
#error "Bad TRUE/FALSE values got into program at compile time"
#endif
#define NOT_VALID -1
  /*  We use -1 as different from TRUE & FALSE.  Check this is OK	*/
#if (TRUE == NOT_VALID) || (FALSE == NOT_VALID)
#error "TRUE/FALSE value conflicts w/something we assume is neither"
#endif

#ifndef CYGWIN
#define CYGWIN FALSE
#endif

#ifndef HP
#define HP FALSE
#endif

#ifndef IBM
#define IBM FALSE
#endif

#ifndef IRIX
#define IRIX FALSE
#endif

#ifndef OSF
#define OSF FALSE
#endif

#ifndef PC
#define PC FALSE
#endif

#ifndef SOL
#define SOL FALSE
#endif

#ifndef SUN
#define SUN FALSE
#endif

#ifndef ULTRIX
#define ULTRIX FALSE
#endif

#ifndef VMS
#define VMS FALSE
#endif

#if HP
#define NOUNDERSCORES
#elif IBM
#define NOUNDERSCORES
#endif

#ifdef NOUNDERSCORES
#define jdbopen_ jdbopen
#define jdbreada_ jdbreada
#define jdbclose_ jdbclose
#define jdblevel_ jdblevel
#define jdbattributes_ jdbattributes
#define jdbcomments_ jdbcomments
#endif

double strtod();
extern char **environ;

typedef signed char Logical;	/*  NB: occasionally gets -1,		*/
				/*   hence need signed			*/

#define COPY_INTO_FIXED_LEN_BUFFER(dest,source,errmsg) \
	copy_into_fixed_len_buffer((dest),sizeof((dest)),(source),errmsg)


#if VMS
#define STDOUT_NAME "SYS$OUTPUT:"
#define STDERR_NAME "SYS$ERROR:"
#define NULL_DEVICE "NL:"
#define strcasecmp strcasecmp_wjs
#include <types.h>
  /*  Looks like waitpid stuff not in VMS until v 7...			*/
  /*  Define WNOHANG here; a dummy waitpid() function in 		*/
  /*    wjsdummyunixlib (mult defns if defined here)			*/
#define WNOHANG 1	/* Defined in wait.h for VMS v 7 but not 6	*/
#else
#define STDOUT_NAME "/dev/stdout"
#define STDERR_NAME "/dev/stderr"
#define NULL_DEVICE "/dev/null"
#include <sys/types.h>
#include <sys/wait.h>
#endif

/* MISSING_VALUE_STRING		String that represents various data	*/
/* 			    anomalies when data is presented in string	*/
/*			    form					*/
/* MISSING_VALUE_REAL 		Floating point number that represents	*/
/* 			    various data anomalies when data is		*/
/* 			    represented in floating point form		*/
#define MISSING_VALUE_STRING "nd"
#define MISSING_VALUE_REAL -9999.

#define MAXLEN_PROGRAM_ID_STRING 256

#endif
