/*
 * Master configuration file for C versions of TeX and Metafont
 *
 * Tim Morgan  2/13/88
 */


/*
   This is included *after* stdio, so the following is safe:

   CTex mixes output to stdio and stderr quite indiscriminately.
   This is a *bad thing*...

   Here I redefine stdout to be stderr, so that all output goes
   to the same stream (Web TeX's original terminal stream).  Having
   done this, I trap *all* I/O library calls, and filter out any
   for stderr, which I redirect into a RISC_OS window.  The ones
   which are not redirected are still intercepted to give the
   wimp polling loop a chance to do some work.
      This is also a convenient hook for trapping dvi writes to
   a file, in order to redirect them to a pipe - and then send the
   dvi straight to the dvi viewer which can start immediately.
      Finally, the editor to be invoked on error is my hack of
   uEmacs, which accepts a -line parameter, *and* multitasks under
   the wimp!
      ... this is turning into quite a nice little system... (TeXtures
   eat your heart out :-))

                      Graham Toal <gtoal@uk.ac.ed>

 */

#ifdef RISC_OS
#ifdef stdout
#undef stdout     /* in case library defines it as a macro */
#endif
#define stdout stderr
#define TERMINAL stderr
#define TERMINAL_PATH 0
#endif


/*
 * Default editor command string: %d expands to the line number where
 * TeX or Metafont found an error, and %s expands to the name of the file.
 */
#ifdef ARTHUR
#ifdef RISC_OS
#define EDITOR          "!uEmacs %s -line %d"
#else
#define EDITOR          "twin %s -line %d" /* Does this work reversed? */
#endif
#else
#define EDITOR          "/usr/ucb/vi +%d %s"
#endif
/*
 * If the type "int" is at least 32 bits (including a sign bit), this
 * symbol should be #undef'd; otherwise, it should be #define'd.
 */
#undef  SIXTEENBIT

/*
 * Our character set is 7-bit ASCII unless NONASCII is defined.
 * For other character sets, make sure that first_text_char and
 * last_text_char are defined correctly in TeX (they're 0 and 127,
 * respectively, by default).  In the file tex.defines, change
 * the indicated range of type "char" to be the same as
 * first_text_char..last_text_char, re-tangle, and "#define NONASCII".
 */
#undef  NONASCII

/* Define if we're running under System V */
#undef  SYSV

/* Define if we're running under 4.2 or 4.3 BSD */
#ifdef ARTHUR
#undef  BSD
#else
#define BSD
#endif

/*
 * The type "schar" should be defined here to be the smallest signed
 * type available.  ANSI C compilers may need to use "signed char".
 * If you don't have signed characters, then use "short".
 */
typedef signed char schar;

/*
 * The type "integer" must be a signed integer capable of holding at
 * least the range of numbers (-2^32)..(2^32-1).
 * The ANSI draft C standard says that "long" meets this requirement.
 */
typedef long integer;

/* Boolean can by any convenient type */
typedef char boolean;

/*
 * The type glueratio should be a floating-point type which meets
 * the following restriction: sizeof(glueratio) <= sizeof(integer).
 */
typedef float glueratio;

/* Real can by any convenient floating-point type */
typedef double real;

/* TeX search paths: This is what we use at UCI. */
#ifdef ARM
    /* Use current directory, and via *$Path - ie compatible with OS paths. */
#define TEXINPUTS       "texinputs:"
#define TEXFONTS        "texfonts:"
#define TEXPOOL         "texformats:"
#define TEXFORMATS      "texformats:"
#else
#define TEXINPUTS       ".:/usr/local/lib/tex82"
#define TEXFONTS        ".:/usr/local/lib/fonts/tfm"
#define TEXPOOL         ".:/usr/local/lib/tex82"
#define TEXFORMATS      ".:/usr/local/lib/tex82"
#endif

#ifdef ARM
#define MFINPUTS        "mfinputs:"/* Note bug - ":" is an item seperator!! */
#define MFBASES         "mfbases:"
#define MFPOOL          "texformats:"
#else
/* Metafont search paths */
#define MFINPUTS        ".:/usr/local/lib/mf84"
#define MFBASES         ".:/usr/local/lib/mf84/bases"
#define MFPOOL          ".:/usr/local/lib/mf84"
#endif

/*
 * Metafont Window Support: More than one may be defined.  At UCI,
 * we support X10, X11, and SunWindows, although I haven't added
 * X11 support to Metafont yet.
 */
#undef  SUNWIN                  /* Want SunWindows support */
#undef  X10WIN                  /* Want X Version 10 Window support */
#undef  X11WIN                  /* Want X Version 11 Window support */
#undef  HP2627WIN               /* Do not want HP Window support */
#undef  TEKTRONIXWIN            /* Want Tektronix window support */

/* NB: You can't define X10WIN and X11WIN simultaneously */
#if defined(X10WIN) && defined(X11WIN)
syntax error
#endif

/*
 * The maximum length of a filename including a directory specifier.
 * This value is also defined in the change files for tex and mf, so
 * it appears in texd.h and mfd.h as "filenamesize".  It can be safely
 * changed in these files if necessary, although you should really edit
 * the files tex/ctex.ch and mf/cmf.ch.  Most sites should not have to
 * change this value anyway, since it doesn't hurt much if it's too large.
 */
#define FILENAMESIZE    1024
