]> git.lyx.org Git - lyx.git/blob - development/Win32/packaging/dtl/dtl.h
* Enable man2ps to work without hard-coding the locations of groff or dpost.
[lyx.git] / development / Win32 / packaging / dtl / dtl.h
1 /* dtl.h
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".
10 */
11
12 /* variety of DTL produced */
13 #define  VARIETY  "sequences-6"
14
15 /* version of DTL programs */
16 #define VERSION "0.6.0"
17
18 /* Test for ANSI/ISO Standard C */
19 #if (defined(__cplusplus) || defined(__STDC__) || defined(c_plusplus))
20 #define STDC 1
21 #else
22 #define STDC 0
23 #endif
24
25 /* Version (Traditional or ANSI) of C affects prototype and type definitions */
26 #if STDC
27 #define ARGS(parenthesized_list) parenthesized_list
28 #else /* NOT STDC */
29 #define ARGS(parenthesized_list) ()
30 #endif /* NOT STDC */
31
32 #if STDC
33 #define Void void
34 #define VOID void
35 #define FILE_BEGIN SEEK_SET
36 #else  /* NOT STDC */
37 #define Void int
38 #define VOID
39 #define FILE_BEGIN 0
40 #endif /* NOT STDC */
41
42 /* types to store 4 byte signed and unsigned integers */
43 typedef long  S4;
44 typedef unsigned long  U4;
45 /* scanf and printf formats to read or write those */
46 #define SF4  "%ld"
47 #define UF4  "%lu"
48 /* 4 byte hexadecimal */
49 /* #define XF4  "%04lx" */
50 #define XF4  "%lx"
51 /* 4 byte octal */
52 #define OF4  "%lo"
53
54 /* type for byte count for DVI file */
55 /* COUNT must be large enough to hold a U4 (unsigned 4 byte) value */
56 typedef U4  COUNT;
57
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 */
61 #define WF "%ld"
62
63 /* string of 8-bit characters for machine: keyboard, screen, memory */
64
65 #define MAXSTRLEN 256
66 typedef char String[MAXSTRLEN+1];
67
68 /* string s of length l and maximum length m */
69 typedef struct {int l; int m; char * s;} Lstring;
70
71 int debug = 0;  /* normally, debugging is off */
72
73 /* Is each DTL command parenthesised by a BCOM and an ECOM? */
74
75 int group = 0;  /* by default, no grouping */
76
77 /* signals of beginning and end of a command and its arguments */
78 /* these apply only if group is nonzero */
79
80 # define  BCOM  "{"
81 # define  ECOM  "}"
82
83 # define BCOM_CHAR '{'
84 # define ECOM_CHAR '}'
85
86 /* beginning and end of a message string */
87
88 #define  BMES  "'"
89 #define  EMES  BMES
90
91 #define  BMES_CHAR  '\''
92 #define  EMES_CHAR  BMES_CHAR
93
94 /* beginning and end of sequence of font characters */
95
96 #define  BSEQ  "("
97 #define  ESEQ  ")"
98
99 #define  BSEQ_CHAR  '('
100 #define  ESEQ_CHAR  ')'
101
102 /* escape and quote characters */
103
104 #define  ESC_CHAR  '\\'
105 #define  QUOTE_CHAR  '\"'
106
107 /* command names in DTL */
108
109 #define  SETCHAR  "\\"
110 #define  SET      "s"
111 #define  SET1     "s1"
112 #define  SET2     "s2"
113 #define  SET3     "s3"
114 #define  SET4     "s4"
115 #define  SETRULE  "sr"
116 #define  PUT      "p"
117 #define  PUT1     "p1"
118 #define  PUT2     "p2"
119 #define  PUT3     "p3"
120 #define  PUT4     "p4"
121 #define  PUTRULE  "pr"
122 #define  NOP      "nop"
123 #define  BOP      "bop"
124 #define  EOP      "eop"
125 #define  PUSH     "["
126 #define  POP      "]"
127 #define  RIGHT    "r"
128 #define  RIGHT1   "r1"
129 #define  RIGHT2   "r2"
130 #define  RIGHT3   "r3"
131 #define  RIGHT4   "r4"
132 #define  W        "w"
133 #define  W0       "w0"
134 #define  W1       "w1"
135 #define  W2       "w2"
136 #define  W3       "w3"
137 #define  W4       "w4"
138 #define  X        "x"
139 #define  X0       "x0"
140 #define  X1       "x1"
141 #define  X2       "x2"
142 #define  X3       "x3"
143 #define  X4       "x4"
144 #define  DOWN     "d"
145 #define  DOWN1    "d1"
146 #define  DOWN2    "d2"
147 #define  DOWN3    "d3"
148 #define  DOWN4    "d4"
149 #define  Y        "y"
150 #define  Y0       "y0"
151 #define  Y1       "y1"
152 #define  Y2       "y2"
153 #define  Y3       "y3"
154 #define  Y4       "y4"
155 #define  Z        "z"
156 #define  Z0       "z0"
157 #define  Z1       "z1"
158 #define  Z2       "z2"
159 #define  Z3       "z3"
160 #define  Z4       "z4"
161 #define  FONT     "f"
162 #define  FONT1    "f1"
163 #define  FONT2    "f2"
164 #define  FONT3    "f3"
165 #define  FONT4    "f4"
166 #define  FONTDEF  "fd"
167 #define  FONTNUM  "fn"
168 #define  SPECIAL  "special"
169 #define  PRE      "pre"
170 #define  POST     "post"
171 #define  POSTPOST "post_post"
172 #define  OPCODE   "opcode"
173
174 /* end dtl.h */