home *** CD-ROM | disk | FTP | other *** search
- /* Copyright 1985, 1986, 1987, 1988 Chris Lewis
- All Rights Reserved
-
- Permission to copy and further distribute is freely given provided
- this copyright notice remains intact and that this software is not
- sold for profit.
-
- Project: Generic Troff drivers
- Module: defs.h
- Author: Chris Lewis
- Specs: Main header file - contains some customization
- */
-
- #ifndef LIBDIR
- #define LIBDIR "/usr/lib/troff2"
- #endif
-
- /*#define BSD /* Define if you are a V7 or BSD machine */
- #define ATT /* Define if you are some sort of SIII or SV system */
- #define SVR3 /* Define if you are System VR3 (ATT should also be
- defined */
-
- #ifdef SVR3
- #ifndef lint
- static char defid[] = "@(#)defs.h: 1.14 Copyright 89/06/14 17:39:59 Chris Lewis";
- #endif
- #else
- #ident "@(#)defs.h: 1.14 Copyright 89/06/14 17:39:59 Chris Lewis"
- #endif
-
-
- /*#define UNSIGNEDCHAR /* define if chars are unsigned on your machine */
-
- /* Supported backends */
- #define PS /* Postscript */
- #define LJ /* Laserjet */
- #define LK /* Laserjet with K cartridge */
- #define DT /* ditroff */
-
- /* don't change anything below here */
- #include <stdio.h>
- #include <ctype.h>
-
- #ifdef BSD
- #include <strings.h>
- #define strchr index
- #define strrchr rindex
- #else
- #include <string.h>
- #endif
-
- #ifdef UNSIGNEDCHAR
- /* Ah heck, and this is probably not ANSI C either... */
- #define SIGNED(x) (((x)&0x80) ? ((x) - 256) : (x))
- #endif
-
- #define ESC 0x80
- #define FLASH 0x00
- #define CONTROL 0x40
- #define LEAD 0x60
- #define SIZE 0x50
-
- #define DOWN 0
- #define UP 1
- #define LOWER 2
- #define UPPER 3
- #define FORWARD 4
- #define BACKWARD 5
-
- #define TROFFRESOLUTION 432
- /*#define FONT8 /* 8 Font device */
- #define FONT4 /* 4 font device - should be possible to leave FONT8*/
- #define DEBUGPRINTF if (diagFile) debugprintf
-
- #define SPECIAL /* define if you want to supports special directives */
- #define FORM /* define if you want the forms facility */
-
- #define DEBUG
- #define DEBUGPRINTF if (diagFile) debugprintf
- FILE *diagFile;
-
- typedef int(*FUNC)();
-
- #define FNULL (FUNC) NULL
-
- struct troff2befont {
- int t2b_font; /* font (troff nomenclature) S=don't change */
- float t2b_xc; /* X-shift */
- float t2b_yc; /* Y-shift */
- float t2b_scale; /* point size scale adjust */
- char *t2b_charseq; /* character sequence - may include PS */
- char *t2b_name; /* name of character */
- };
-
- struct backend {
- char *bename;
- FUNC beprolog,
- beepilog,
- beputchar,
- bepage,
- befontsel, /* special function F */
- beoverlay, /* special function O */
- bebin, /* special function B */
- bexlat; /* Xlate function */
- struct troff2befont
- *bestdfont, /* standard font translate table */
- *besymfont; /* symbol font translate table */
- };
-
- struct backend *be;
- #define BNULL (struct backend *) NULL
-
- extern char *progname;
- int metrics;
- extern char *skipblanks();
-
- /* Common Back-end definitions */
-
- #define U (-1) /* Use standard font */
- #define S (-2) /* Use symbol font */
- #define D (-3) /* Draw macro exists - use string directly */
-
- #define NOCODE 0
-
- #define SN(x) , x
-
- int currentPage;
- int pagePending;
-
- #define T2VERSION "R1.14 89/06/14"
-