2 - header for dv2dt.c and dt2dv.c, conversion programs
3 for human-readable "DTL" <-> DVI.
4 - (ANSI C) version 0.6.0 - 18:31 GMT +11 Wed 8 March 1995
5 - author: Geoffrey Tobin G.Tobin@ee.latrobe.edu.au
6 - patch: Michal Tomczak-Jaegermann ntomczak@vm.ucs.ualberta.ca
7 - Reference: "The DVI Driver Standard, Level 0",
8 by The TUG DVI Driver Standards Committee.
9 Appendix A, "Device-Independent File Format".
12 /* variety of DTL produced */
13 #define VARIETY "sequences-6"
15 /* version of DTL programs */
16 #define VERSION "0.6.0"
18 /* Test for ANSI/ISO Standard C */
19 #if (defined(__cplusplus) || defined(__STDC__) || defined(c_plusplus))
25 /* Version (Traditional or ANSI) of C affects prototype and type definitions */
27 #define ARGS(parenthesized_list) parenthesized_list
29 #define ARGS(parenthesized_list) ()
35 #define FILE_BEGIN SEEK_SET
42 /* types to store 4 byte signed and unsigned integers */
44 typedef unsigned long U4;
45 /* scanf and printf formats to read or write those */
48 /* 4 byte hexadecimal */
49 /* #define XF4 "%04lx" */
54 /* type for byte count for DVI file */
55 /* COUNT must be large enough to hold a U4 (unsigned 4 byte) value */
58 /* size of a TeX and DVI word is 32 bits; in some systems a `long int' is needed */
59 typedef long int word_t;
60 /* format for a DVI word */
63 /* string of 8-bit characters for machine: keyboard, screen, memory */
66 typedef char String[MAXSTRLEN+1];
68 /* string s of length l and maximum length m */
69 typedef struct {int l; int m; char * s;} Lstring;
71 int debug = 0; /* normally, debugging is off */
73 /* Is each DTL command parenthesised by a BCOM and an ECOM? */
75 int group = 0; /* by default, no grouping */
77 /* signals of beginning and end of a command and its arguments */
78 /* these apply only if group is nonzero */
83 # define BCOM_CHAR '{'
84 # define ECOM_CHAR '}'
86 /* beginning and end of a message string */
91 #define BMES_CHAR '\''
92 #define EMES_CHAR BMES_CHAR
94 /* beginning and end of sequence of font characters */
100 #define ESEQ_CHAR ')'
102 /* escape and quote characters */
104 #define ESC_CHAR '\\'
105 #define QUOTE_CHAR '\"'
107 /* command names in DTL */
168 #define SPECIAL "special"
171 #define POSTPOST "post_post"
172 #define OPCODE "opcode"