
/**********************************************************************/
/************************  Global Definitions  ************************/
/**********************************************************************/


typedef int BOOLEAN;
#define NEW(A) ((A *) malloc(sizeof(A)))
#define abs(x) ((x)<0?-(x):x)
#define DEBUG   1			/* for massive printing of input */
					/* trace information; select by -d */
                          /* to enable statistics reporting via -s option */
#define STATS

#define BINARYOPEN fopen		/* byte-oriented host version */

#define ARITHRSHIFT 1                   /* define if ">>" operator is a */
                                        /* sign-propagating arithmetic  */
                                        /*   right shift */
#define USEGLOBALMAG 1			/* when defined, the dvi global */
   					/*   magnification is applied   */
      
/* We can leave USEGLOBALMAG undefined when we have a limited
   number of font magnifications (at 300dpi) available.  Otherwise, we
   will simply complain about missing PXL files
 */

/* #undef USEGLOBALMAG */

                        /* define for "optimal" relative postioning, rather
                           than absolute.  Relative can reduce size of postcript
                           output 20% (and reduce print time by almost as much */
#define USERELPOS 1 

#define  DVIFORMAT        2
#define  TRUE             1
#define  FALSE            0
#define  FIRSTPXLCHAR     0
#define  LASTPXLCHAR    255

#ifndef FONTAREA
#define  FONTAREA         "/usr/lib/tex/fonts"
#endif

#ifndef PXLAREA
#define	PXLAREA		FONTAREA
#endif

#ifdef BUILTIN
#ifndef FONTMAP
			/* directory comes from FONTAREA or TEXFONTS or -a */
#define FONTMAP		"TeXPSfonts.map"
#endif
#endif

#ifndef HDRFILE
#define HDRFILE         "/usr/lib/tex.ps"
#endif

#ifdef apollo
#ifndef SPOOLFILE
#define SPOOLFILE       "/local/spool/laser/tex."
#endif
#define MAXFLEN 28
#endif apollo
#define  READ             4  /* for access() */
#define  RESOLUTION      300
#define  hconvRESOLUTION 300
#define  vconvRESOLUTION 300
#define  STACKSIZE      100
#define  STRSIZE        257
#define  MAX_PATHS	20
#define  NONEXISTANT     -1   /* offset for PXL files not found */
#define  NO_FILE        (FILE *)-1
#define  UNDEFPOS	-314159728
#define max_drift	2	/* max nbr of pixels drift by rounding */

#ifdef apollo           /* define for enabling of -c option (create output file) */
#define CREOPT
#endif apollo

extern int  access();
extern char *index();
extern char *malloc();
extern char *getenv();
extern int  free();
extern char *rindex();
extern char *sprintf();
extern char *strcpy(); 
extern char *logname();

#define EQ(a,b) (strcmp(a,b)==0)
