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