/****************************************************************************

	These identifiers enhance code readability as well as providing the
capability to avoid machine-dependent data type problems.  The following
types work for the VAX/VMS and SAGE/CPM-68K compilers.  If a compiler does
not have 8-bit chars, 16 or 32-bit shorts and 32-bit longs,  then problems
will arise.
	There are places in TECOC at which a LONG is assumed to be the same
size as an address.  The "L" suffix to contants is used in the code wherever
constants are added to pointers.
	The mode control flags (like ES, ED) are 16-bit entities defined as
UWORD.  The DoEvEs function will not function correctly if UWORD does not
produce 16-bit variables.
	The MakDBf function will not work properly if LONG does not
produce 32-bit variables.

*****************************************************************************/

#define BOOLEAN		char		/* holds YES or NO */
#define BYTE		char		/* Signed byte (8 bits) */
#define DEFAULT		int		/* Default size (16 or 32 bits) */
#define FOREVER		for(;;)		/* Infinite loop declaration */
#define LOCAL		auto		/* Local variable.  This must be */
					/* "auto" for the recursive */
					/* ZFrSrc, CMatch and BakSrc */
					/* functions to execute properly. */
#define LONG		long		/* signed long (32 bits) */
#define NO		'\0'		/* "FALSE" */
#define	NULL		0		/* for assignment to pointers */
#define WORD		short		/* signed short (16 bits) */
#define YES		'\1'		/* "TRUE" */



/*****************************************************************************

	The following identifiers are used in the system-dependent files
(those with names starting with a "Z") to chose which code to compile.  Only
ONE of the following lines should be active.  Under VAX/VMS,  the VAX-11 C
compiler defines the symbol "vax11c" for this purpose,  so it does not need
to be defined here.
	Note that the UNKNOWN identifier should only be used when porting
TECO-C to a new environment.  When set,  it will cause code to be compiled
which has stubs for all the system-dependent functions.

*****************************************************************************/

/*#define UNKNOWN 1*/		/* porting to unknown compiler */
/*#define XENIX 1*/			/* XENIX compiler */


/*****************************************************************************

	The values of the following identifiers are system-dependent.

EXTERN	usually "extern",  this identifier lets the more useful keyword
	"globalref" be used to define an external variable in VAX C.
GLOBAL	used for the single definition of a variable.  This identifier
	allows the use of the keyword "globaldef" in VAX C.
VOID	if the compiler supports the keyword "void",  then this should be
	defined as such,  else it should be meaningless.

EBFEXP	amount by which the edit buffer is expanded each time the user tries
	to insert too much text.
EBFINIT	initial size of the edit buffer.  This value is added to IBFINIT 
	to create a value used to initially allocate both buffers.
IBFEXP	amount by which the input buffer is expanded each time it becomes
	too small for a reasonable-length line (IBFMIN) to be read.
IBFINIT	initial size of the input buffer.  This value is added to EBFINIT
	to create a value used to initially allocate both buffers.
IBFMIN	minimum size of the input buffer.  This value is checked before each
	read operation.
NIFDBS	number of input file data blocks.  This should be 3 plus the
	number of levels that EI files may be nested.  8 is a good number.

*****************************************************************************/



#ifdef UNKNOWN
#define EXTERN	extern		/* External variable */
#define GLOBAL	/**/		/* Global variable */
#define VOID	/**/		/* Void function return */
#define	EBFEXP		100L	/* edit buffer expansion value */
#define EBFINIT		100L	/* edit buffer initial size */
#define EXS_SIZE	5	/* size of expression stack */
#define LPS_SIZE	5	/* size of loop stack */
#define MCS_SIZE	5	/* size of macro stack */
#define QRS_SIZE	5	/* size of q-register stack */
#define	NIFDBS		4	/* number of input file data blocks */
#define	IBFMIN		100L	/* input buffer minimum size */
#define	IBFEXP		100L	/* input buffer expansion size */
#define IBFINIT		100L	/* input buffer initial size */
#define CBFINIT		100L	/* command buffer initial size */
#define SBFINIT		100L	/* size of search string buffer */
#define TBFINIT		100	/* size of tag buffer for O command */
#define ZBFINIT		100L	/* size of EI file input buffer */
#endif



#ifdef vax11c
#define EXTERN	globalref	/* External variable */
#define GLOBAL	globaldef	/* Global variable */
#define VOID	void		/* Void function return */

#define CBFINIT		20000L	/* command buffer initial size */
#define	EBFEXP		64000L	/* edit buffer expansion value */
#define EBFINIT		64000L	/* edit buffer initial size */
#define	IBFEXP		100000L	/* input buffer expansion size */
#define IBFINIT		64000L	/* input buffer initial size */
#define	IBFMIN		10000L	/* input buffer minimum size */
#define	NIFDBS		8	/* number of input file data blocks */
#define SBFINIT		1000L	/* size of search string buffer */
#define TBFINIT		1000	/* size of tag buffer for O command */
#define WBFINIT		1000	/* batch input and output buffer size */
#define ZBFINIT		10000L	/* size of EI file input buffer */
#define EXS_SIZE	50	/* size of expression stack */
#define LPS_SIZE	20	/* size of loop stack */
#define MCS_SIZE	10	/* size of macro stack */
#define QRS_SIZE	20	/* size of q-register stack */
#define TERM_IN_EFN	1	/* terminal input event flag */
#define TERM_OUT_EFN	2	/* terminal output event flag */
struct io_status_block
	{
	short   io_status;
	short   byte_count;
	short   terminator;
	short   terminator_size;
	};
struct message_vector
	{
	short	argcnt;		/* argument count */
	short	msgflg;		/* message flags */
	int	msgcod;		/* message code */
	int	rmsstv;		/* RMS stv */
	};

#endif


#ifdef XENIX
#define EXTERN	extern		/* External variable */
#define GLOBAL	/**/		/* Global variable */
#define VOID	/**/		/* Void function return */

#define BLK_SIZE	128	/* CPM-68K block size for I/O */
#define FSP_SIZE	15	/* max size of null-terminated file spec */

#define CBFINIT		200L	/* command buffer initial size */
#define	EBFEXP		5000L	/* edit buffer expansion value */
#define EBFINIT		32000L	/* edit buffer initial size */
#define	IBFEXP		5000L	/* input buffer expansion size */
#define IBFINIT		32000L	/* input buffer initial size */
#define	IBFMIN		1024L	/* input buffer minimum size */
#define	NIFDBS		6	/* number of input file data blocks */
#define SBFINIT		100L	/* size of search string buffer */
#define TBFINIT		100	/* size of tag buffer for O command */
#define ZBFINIT		2048	/* size of EI file input buffer */
#define LPS_SIZE	20	/* size of loop stack */
#define MCS_SIZE	10	/* size of macro stack */
#define QRS_SIZE	20	/* size of q-register stack */
#define EXS_SIZE	50	/* size of expression stack */
#endif
