w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

print_routines.c
Go to the documentation of this file.
1 /* print_routines.c: higher-level routines for printing OPL and OVP files.
2 
3 This file is part of Omega,
4 which is based on the web2c distribution of TeX,
5 
6 Copyright (c) 1994--2001 John Plaice and Yannis Haralambous
7 
8 Omega is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12 
13 Omega is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Omega; if not, write to the Free Software Foundation, Inc.,
20 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21 
22 */
23 
24 #include "cpascal.h"
25 #include "list_routines.h"
26 #include "manifests.h"
27 #include "print_routines.h"
28 #include "header_routines.h"
29 #include "out_routines.h"
30 #include "error_routines.h"
31 #include "omfonts.h"
32 
33 void
35 {
36  left();
37  out("CHECKSUM");
38  out(" "); out_num(check_sum);
39  right();
40 }
41 
42 void
44 {
45  left();
46  out("DESIGNSIZE");
47  out(" "); out_fix(design_size);
48  right();
49 }
50 
51 void
53 {
54  left();
55  out("CODINGSCHEME");
56  out(" "); out(coding_scheme);
57  right();
58 }
59 
60 void
62 {
63  left();
64  out("FAMILY");
65  out(" "); out(family);
66  right();
67 }
68 
69 void
71 {
72  left();
73  out("FACE");
74  out(" ");
75  if ((face >= F_MIN) && (face <= F_MAX)) print_xerox_face(face);
76  else out_num(face);
77  right();
78 }
79 
80 void
82 {
83  left();
84  out("SEVENBITSAFEFLAG"); out(" ");
85  if (seven_bit == 1) out("TRUE");
86  else if (seven_bit == 0) out("FALSE");
87  else internal_error_1("print_seven_bit_safe_flag (seven_bit=%d)", seven_bit);
88  right();
89 
90 }
91 
92 void
94 {
95  left();
96  out("FONTDIMEN"); out_ln();
97 }
98 
99 void
101 {
102  left();
103  out("BOUNDARYCHAR");
104  out(" "); out_char(val); right();
105 }
106 
107 void
109 {
110  left();
111  out("LIGTABLE"); out_ln();
112 }
113 
114 void
116 {
117  left();
118  out("CHARACTER");
119  out(" "); out_char(val); out_ln();
120 }
121 
122 void
124 {
125  left();
126  if ((font_type==FT_MATHSY) &&
127  (parameter>=P_MATHSY_MIN) &&
128  (parameter<=P_MATHSY_MAX)) {
130  } else if ((font_type==FT_MATHEX) &&
131  (parameter>=P_MATHEX_MIN) &&
132  (parameter<=P_MATHEX_MAX)) {
134  } else if (parameter<=P_MAX) {
136  } else {
137  out("PARAMETER"); out(" "); out_int(parameter,10);
138  }
139  out(" "); out_fix(fval);
140  right();
141 }
142 
143 void
145 {
146  left();
147  out("LABEL"); out(" ");
148  if (val == -1) out("BOUNDARYCHAR");
149  else out_char(val);
150  right();
151 }
152 
153 void
154 print_ligature_command(unsigned command, unsigned val1, unsigned val2)
155 {
156  left();
158  out(" "); out_char(val1);
159  out(" "); out_char(val2);
160  right();
161 }
162 
163 void
165 {
166  left();
167  out("KRN");
168  out(" "); out_char(val);
169  out(" "); out_fix(fval);
170  right();
171 }
172 
173 void
175 {
176  left();
177  out("STOP");
178  right();
179 }
180 
181 void
183 {
184  left();
185  out("SKIP");
186  out(" "); out_int(val,10);
187  right();
188 }
189 
190 void
191 print_character_measure(unsigned measure, fix fval)
192 {
193  left();
194  out_character_measure(measure);
195  out(" "); out_fix(fval);
196  right();
197 }
198 
199 void
201 {
202  left();
203  out("NEXTLARGER");
204  out(" "); out_char(val);
205  right();
206 }
207 
208 void
210 {
211  left(); out("VARCHAR"); out_ln();
212 }
213 
214 void
215 print_extensible_piece(unsigned piece, unsigned val)
216 {
217  left();
218  out_extensible_piece(piece);
219  out(" "); out_char(val);
220  right();
221 }
222 
223 /* Primitives used in VF and OVF files */
224 
225 void
226 print_vtitle(string sval)
227 {
228  left();
229  out("VTITLE");
230  out(" "); out(sval);
231  right();
232 }
233 
234 void
236 {
237  left();
238  out("MAPFONT");
239  out(" "); out_int(val,10); out_ln();
240 }
241 
242 void
243 print_font_name(string sval)
244 {
245  left();
246  out("FONTNAME");
247  out(" "); out(sval);
248  right();
249 }
250 
251 void
252 print_font_area(string sval)
253 {
254  left();
255  out("FONTAREA");
256  out(" "); out(sval);
257  right();
258 }
259 
260 void
262 {
263  left();
264  out("FONTCHECKSUM");
265  out(" "); out_num(val);
266  right();
267 }
268 
269 void
271 {
272  left();
273  out("FONTAT");
274  out(" "); out_fix(fval);
275  right();
276 }
277 
278 void
280 {
281  left();
282  out("FONTDSIZE");
283  out(" "); out_fix(fval);
284  right();
285 }
286 
287 void
289 {
290  left(); out("MAP"); out_ln();
291 }
292 
293 void
295 {
296  left();
297  out("SELECTFONT");
298  out(" "); out_int(val,10);
299  right();
300 }
301 
302 void
304 {
305  left();
306  out("SETCHAR");
307  out(" "); out_char(val);
308  right();
309 }
310 
311 void
313 {
314  left();
315  out("PUTCHAR");
316  out(" "); out_char(val);
317  right();
318 }
319 
320 void
321 print_set_rule(fix fval1, fix fval2)
322 {
323  left();
324  out("SETRULE");
325  out(" "); out_fix(fval1);
326  out(" "); out_fix(fval2);
327  right();
328 }
329 
330 void
331 print_put_rule(fix fval1, fix fval2)
332 {
333  left();
334  out("PUTRULE");
335  out(" "); out_fix(fval1);
336  out(" "); out_fix(fval2);
337  right();
338 }
339 
340 void
342 {
343  left(); out("PUSH"); right();
344 }
345 
346 void
348 {
349  left(); out("POP"); right();
350 }
351 
352 void
353 print_move(unsigned direction, fix fval)
354 {
355  left();
357  out(" "); out_fix(fval);
358  right();
359 }
360 
361 void
362 print_special(string sval)
363 {
364  left();
365  out("SPECIAL");
366  out(" "); out(sval);
367  right();
368 }
369 
370 void
371 print_special_hex(unsigned char *special, int k)
372 {
373  left();
374  out("SPECIALHEX ");
375  for (; k > 0; k--, special++) {
376  if ((k & 0x1f) == 0)
377  out_ln();
378  else if ((k & 0x03) == 0)
379  out(" ");
380  out_hex(*special);
381  }
382  right();
383 }
384 
385 /* Primitives used in OPL and OVF files */
386 
387 void
388 print_character_repeat(unsigned val1, unsigned val2)
389 {
390  left();
391  out("CHARREPEAT");
392  out(" "); out_char(val1);
393  out(" "); out_char(val2); out_ln();
394 }
395 
396 void
398 {
399  left();
400  out("OFMLEVEL");
401  out(" "); out_int(val,16);
402  right();
403 }
404 
405 void
407 {
408  left();
410  right();
411 }
#define special
Definition: devnag.c:330
void internal_error_1(const_string fmt, int item)
FILE * out
Definition: hbf2gf.c:286
unsigned char out_char[1023 *1023+1]
Definition: hbf2gf.c:373
unsigned check_sum
string family
boolean seven_bit
string coding_scheme
@ parameter
Definition: inputstack.h:292
FT_Face face
Definition: cffdrivr.c:659
@ right
Definition: annotate.c:15
int fix
Definition: list_routines.h:24
#define P_MATHEX_MIN
Definition: manifests.h:150
#define FT_MATHSY
Definition: manifests.h:246
#define FT_MATHEX
Definition: manifests.h:247
#define P_MATHEX_MAX
Definition: manifests.h:159
#define P_MATHSY_MAX
Definition: manifests.h:146
#define P_MAX
Definition: manifests.h:124
#define F_MAX
Definition: manifests.h:110
#define F_MIN
Definition: manifests.h:89
#define P_MATHSY_MIN
Definition: manifests.h:128
#define design_size
Definition: mfluac.c:339
int k
Definition: otp-parser.c:70
void out_hex(unsigned char c)
Definition: out_routines.c:352
void out_extensible_piece(unsigned piece)
Definition: out_routines.c:59
void out_type_direction(unsigned direction)
Definition: out_routines.c:160
void out_ln(void)
Definition: out_routines.c:260
void out_ligature_command(unsigned command)
Definition: out_routines.c:75
void print_xerox_face(int face)
Definition: out_routines.c:92
void out_named_parameter(unsigned parameter)
Definition: out_routines.c:107
void out_named_mathsy_parameter(unsigned parameter)
Definition: out_routines.c:124
void out_num(unsigned val)
Definition: out_routines.c:293
void out_move_direction(unsigned direction)
Definition: out_routines.c:189
void out_fix(fix fval)
Definition: out_routines.c:324
void out_character_measure(unsigned measure)
Definition: out_routines.c:44
void out_named_mathex_parameter(unsigned parameter)
Definition: out_routines.c:142
void out_int(unsigned val, unsigned base)
Definition: out_routines.c:302
void print_ligature_command(unsigned command, unsigned val1, unsigned val2)
void print_label_command(unsigned val)
void print_special_hex(unsigned char *special, int k)
void print_character(unsigned val)
void print_face(void)
void print_font_dir(unsigned val)
void print_seven_bit_safe_flag(void)
void print_var_character(void)
void print_set_char(unsigned val)
void print_kerning_command(unsigned val, fix fval)
void print_boundary_char(unsigned val)
void print_ofm_level(unsigned val)
void print_font_name(string sval)
void print_map_font(unsigned val)
void print_font_area(string sval)
void print_push(void)
void print_special(string sval)
void print_coding_scheme(void)
void print_pop(void)
void print_check_sum(void)
void print_font_design_size(fix fval)
void print_put_rule(fix fval1, fix fval2)
void print_put_char(unsigned val)
void print_skip_command(unsigned val)
void print_set_rule(fix fval1, fix fval2)
void print_family(void)
void print_ligature_table(void)
void print_font_dimension(void)
void print_stop_command(void)
void print_character_measure(unsigned measure, fix fval)
void print_character_repeat(unsigned val1, unsigned val2)
void print_font_check_sum(unsigned val)
void print_move(unsigned direction, fix fval)
void print_select_font(unsigned val)
void print_map(void)
void print_next_larger(unsigned val)
void print_design_size(void)
void print_vtitle(string sval)
void print_extensible_piece(unsigned piece, unsigned val)
void print_font_at(fix fval)
void print_parameter(unsigned parameter, fix fval)
lft_cell * left
Definition: routines.h:73
#define direction(p, c)
Definition: sh12.c:109
Definition: strexpr.c:21
#define font_type(a)
Definition: texfont.h:287