Debian Codegraph @

texk/web2c/omegaware/odvitype.ch

raw
1 % odvitype.ch: web2c changes for file odvitype.web
2 %
3 % This file is part of the Omega project, which
4 % is based in the web2c distribution of TeX.
5 %
6 % Copyright (c) 1994--1998 John Plaice and Yannis Haralambous
7 % applies only to the changes to the original dvitype.ch.
8 %
9 % dvitype.ch for C compilation with web2c.
10 %
11 % 04/04/83 (PC) Merged with Pavel's change file and made to work with the
12 % version 1.0 of DVItype released with version 0.95 of TeX in
13 % February, 1983.
14 % 04/18/83 (PC) Added changes to module 47 so that it would work the same
15 % when input was a file (or pipe) as with a terminal.
16 % 06/29/83 (HWT) Brought up to version 1.1 as released with version 0.99 of
17 % TeX, with new change file format
18 % 07/28/83 (HWT) Brought up to version 2 as released with version 0.999.
19 % Only the banner changes.
20 % 11/21/83 (HWT) Brought up to version 2.2 as released with version 1.0.
21 % 02/19/84 (HWT) Made it use the TEXFONTS environment variable.
22 % 03/23/84 (HWT) Brought up to version 2.3.
23 % 07/11/84 (HWT) Brought up to version 2.6 as released with version 1.1.
24 % 11/07/84 (ETM) Brought up to version 2.7 as released with version 1.2.
25 % 03/09/88 (ETM) Brought up to version 2.9
26 % 03/16/88 (ETM) Converted for use with WEB to C.
27 % 11/30/89 (KB) To version 3.
28 % 01/16/90 (SR) To version 3.2.
29 % (more recent changes in the ChangeLog)
30
31 @x [0] WEAVE: print changes only.
32 \pageno=\contentspagenumber \advance\pageno by 1
33 @y
34 \pageno=\contentspagenumber \advance\pageno by 1
35 \let\maybe=\iffalse
36 \def\title{DVI$\,$\lowercase{type} changes for C}
37 @z
38
39 @x [1] Define my_name
40 @d banner=='This is ODVItype, Version 1.5' {printed when the program starts}
41 @y
42 @d my_name=='odvitype'
43 @d banner=='This is ODVItype, Version 1.5' {printed when the program starts}
44 @z
45
46 % [3] Specify the output file to simplify web2c, and don't print the
47 % banner until later.
48 @x
49 @d print(#)==write(#)
50 @d print_ln(#)==write_ln(#)
51 @y
52 @d print(#)==write(stdout, #)
53 @d print_ln(#)==write_ln(stdout, #)
54 @z
55
56 @x
57 procedure initialize; {this procedure gets things started properly}
58 var i:integer; {loop index for initializations}
59 begin print_ln(banner);@/
60 @y
61 @<Define |parse_arguments|@>
62 procedure initialize; {this procedure gets things started properly}
63 var i:integer; {loop index for initializations}
64 begin
65 kpse_set_program_name (argv[0], my_name);
66 parse_arguments;
67 print (banner);
68 print_ln (version_string);
69 @z
70
71 % There were no complaints that these values are too small, and adjusting
72 % them dynamically requires to resize a large number of arrays and is not
73 % worth the effort (if necessary one can recompile with larger values).
74 @x [5] Allow more fonts, more widths, no arbitrary filename length. No dialog.
75 @!max_fonts=100; {maximum number of distinct fonts per \.{DVI} file}
76 @!max_widths=100000; {maximum number of different characters among all fonts}
77 @y
78 @!max_fonts=500; {maximum number of distinct fonts per \.{DVI} file}
79 @!max_widths=100000; {maximum number of different characters among all fonts}
80 @z
81 @x
82 @!terminal_line_length=150; {maximum number of characters input in a single
83 line of input from the terminal}
84 @y
85 @z
86 @x
87 @!name_size=1000; {total length of all font file names}
88 @!name_length=50; {a file name shouldn't be longer than this}
89 @y
90 @!name_size=10000; {total length of all font file names}
91 @z
92
93 @x [7] Remove non-local goto.
94 @d abort(#)==begin print(' ',#); jump_out;
95 end
96 @d bad_dvi(#)==abort('Bad DVI file: ',#,'!')
97 @.Bad DVI file@>
98
99 @p procedure jump_out;
100 begin goto final_end;
101 end;
102 @y
103 @d jump_out==uexit(1)
104 @d abort(#)==begin write_ln(stderr,#); jump_out; end
105 @d bad_dvi(#)==abort('Bad DVI file: ',#,'!')
106 @.Bad DVI file@>
107 @z
108
109 @x [8] Permissive input.
110 @!ASCII_code=" ".."~"; {a subrange of the integers}
111 @y
112 @!ASCII_code=0..255; {a subrange of the integers}
113 @z
114
115 % [9] The text_char type is used as an array index into `xord'. The
116 % default type `char' produces signed integers, which are bad array
117 % indices in C.
118 @x
119 @d text_char == char {the data type of characters in text files}
120 @d first_text_char=0 {ordinal number of the smallest element of |text_char|}
121 @d last_text_char=127 {ordinal number of the largest element of |text_char|}
122 @y
123 @d text_char == ASCII_code {the data type of characters in text files}
124 @d first_text_char=0 {ordinal number of the smallest element of |text_char|}
125 @d last_text_char=255 {ordinal number of the largest element of |text_char|}
126 @z
127
128 @x [23] Fix up opening the files.
129 @p procedure open_dvi_file; {prepares to read packed bytes in |dvi_file|}
130 begin reset(dvi_file);
131 cur_loc:=0;
132 end;
133 @#
134 procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|}
135 begin reset(tfm_file,cur_name);
136 end;
137 @y
138 @p procedure open_dvi_file; {prepares to read packed bytes in |dvi_file|}
139 begin
140 resetbin (dvi_file, dvi_name);
141 cur_loc := 0;
142 end;
143 @#
144 procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|}
145 var full_name: ^char;
146 begin
147 full_name := kpse_find_tfm (cur_name);
148 if full_name then begin
149 tfm_file := fopen (full_name, FOPEN_RBIN_MODE);
150 end else begin
151 full_name := kpse_find_ofm (cur_name);
152 if full_name then begin
153 tfm_file := fopen (full_name, FOPEN_RBIN_MODE);
154 end else begin
155 tfm_file := nil;
156 end;
157 end;
158 end;
159 @z
160
161 @x [24] No arbitrary limit on filename length.
162 @!cur_name:packed array[1..name_length] of char; {external name,
163 with no lower case letters}
164 @y
165 @!cur_name:^char; {external name}
166 @z
167
168 @x [28] dvi_length and move_to_byte.
169 @p function dvi_length:integer;
170 begin set_pos(dvi_file,-1); dvi_length:=cur_pos(dvi_file);
171 end;
172 @#
173 procedure move_to_byte(n:integer);
174 begin set_pos(dvi_file,n); cur_loc:=n;
175 end;
176 @y
177 @p function dvi_length:integer;
178 begin
179 xfseek (dvi_file, 0, 2, dvi_name);
180 cur_loc := xftell(dvi_file, dvi_name);
181 dvi_length := cur_loc;
182 end;
183 @#
184 procedure move_to_byte(n:integer);
185 begin
186 xfseek (dvi_file, n, 0, dvi_name);
187 cur_loc:=n;
188 end;
189 @z
190
191 @x [35] Avoid compiler warnings
192 read_tfm_word;
193 @y
194 nco:=0; extra_words:=0;
195 read_tfm_word;
196 @z
197
198 @x [43] Initialize optional variables sooner.
199 @ @<Set init...@>=
200 out_mode:=the_works; max_pages:=1000000; start_vals:=0; start_there[0]:=false;
201 @y
202 @ Initializations are done sooner now.
203 @z
204
205 @x [45] No dialog.
206 @ The |input_ln| routine waits for the user to type a line at his or her
207 terminal; then it puts ASCII-code equivalents for the characters on that line
208 into the |buffer| array. The |term_in| file is used for terminal input,
209 and |term_out| for terminal output.
210 @^system dependencies@>
211
212 @<Glob...@>=
213 @!buffer:array[0..terminal_line_length] of ASCII_code;
214 @!term_in:text_file; {the terminal, considered as an input file}
215 @!term_out:text_file; {the terminal, considered as an output file}
216 @y
217 @ No dialog.
218 @z
219
220 @x [47] No input_ln.
221 @p procedure input_ln; {inputs a line from the terminal}
222 var k:0..terminal_line_length;
223 begin update_terminal; reset(term_in);
224 if eoln(term_in) then read_ln(term_in);
225 k:=0;
226 while (k<terminal_line_length)and not eoln(term_in) do
227 begin buffer[k]:=xord[term_in^]; incr(k); get(term_in);
228 end;
229 buffer[k]:=" ";
230 end;
231 @y
232 @z
233
234 @x [48] No dialog.
235 @ The global variable |buf_ptr| is used while scanning each line of input;
236 it points to the first unread character in |buffer|.
237
238 @<Glob...@>=
239 @!buf_ptr:0..terminal_line_length; {the number of characters read}
240 @y
241 @ No dialog.
242 @z
243
244 @x [49] No dialog.
245 @ Here is a routine that scans a (possibly signed) integer and computes
246 the decimal value. If no decimal integer starts at |buf_ptr|, the
247 value 0 is returned. The integer should be less than $2^{31}$ in
248 absolute value.
249
250 @p function get_integer:integer;
251 var x:integer; {accumulates the value}
252 @!negative:boolean; {should the value be negated?}
253 begin if buffer[buf_ptr]="-" then
254 begin negative:=true; incr(buf_ptr);
255 end
256 else negative:=false;
257 x:=0;
258 while (buffer[buf_ptr]>="0")and(buffer[buf_ptr]<="9") do
259 begin x:=10*x+buffer[buf_ptr]-"0"; incr(buf_ptr);
260 end;
261 if negative then get_integer:=-x @+ else get_integer:=x;
262 end;
263
264 @y
265 @ No dialog.
266 @z
267
268 @x [50-55] No dialog.
269 @ The selected options are put into global variables by the |dialog|
270 procedure, which is called just as \.{DVItype} begins.
271 @^system dependencies@>
272
273 @p procedure dialog;
274 label 1,2,3,4,5;
275 var k:integer; {loop variable}
276 begin rewrite(term_out); {prepare the terminal for output}
277 write_ln(term_out,banner);
278 @<Determine the desired |out_mode|@>;
279 @<Determine the desired |start_count| values@>;
280 @<Determine the desired |max_pages|@>;
281 @<Determine the desired |resolution|@>;
282 @<Determine the desired |new_mag|@>;
283 @<Print all the selected options@>;
284 end;
285
286 @ @<Determine the desired |out_mode|@>=
287 1: write(term_out,'Output level (default=4, ? for help): ');
288 out_mode:=the_works; input_ln;
289 if buffer[0]<>" " then
290 if (buffer[0]>="0")and(buffer[0]<="4") then out_mode:=buffer[0]-"0"
291 else begin write(term_out,'Type 4 for complete listing,');
292 write(term_out,' 0 for errors and fonts only,');
293 write_ln(term_out,' 1 or 2 or 3 for something in between.');
294 goto 1;
295 end
296
297 @ @<Determine the desired |start...@>=
298 2: write(term_out,'Starting page (default=*): ');
299 start_vals:=0; start_there[0]:=false;
300 input_ln; buf_ptr:=0; k:=0;
301 if buffer[0]<>" " then
302 repeat if buffer[buf_ptr]="*" then
303 begin start_there[k]:=false; incr(buf_ptr);
304 end
305 else begin start_there[k]:=true; start_count[k]:=get_integer;
306 end;
307 if (k<9)and(buffer[buf_ptr]=".") then
308 begin incr(k); incr(buf_ptr);
309 end
310 else if buffer[buf_ptr]=" " then start_vals:=k
311 else begin write(term_out,'Type, e.g., 1.*.-5 to specify the ');
312 write_ln(term_out,'first page with \count0=1, \count2=-5.');
313 goto 2;
314 end;
315 until start_vals=k
316
317 @ @<Determine the desired |max_pages|@>=
318 3: write(term_out,'Maximum number of pages (default=1000000): ');
319 max_pages:=1000000; input_ln; buf_ptr:=0;
320 if buffer[0]<>" " then
321 begin max_pages:=get_integer;
322 if max_pages<=0 then
323 begin write_ln(term_out,'Please type a positive number.');
324 goto 3;
325 end;
326 end
327
328 @ @<Determine the desired |resolution|@>=
329 4: write(term_out,'Assumed device resolution');
330 write(term_out,' in pixels per inch (default=300/1): ');
331 resolution:=300.0; input_ln; buf_ptr:=0;
332 if buffer[0]<>" " then
333 begin k:=get_integer;
334 if (k>0)and(buffer[buf_ptr]="/")and
335 (buffer[buf_ptr+1]>"0")and(buffer[buf_ptr+1]<="9") then
336 begin incr(buf_ptr); resolution:=k/get_integer;
337 end
338 else begin write(term_out,'Type a ratio of positive integers;');
339 write_ln(term_out,' (1 pixel per mm would be 254/10).');
340 goto 4;
341 end;
342 end
343
344 @ @<Determine the desired |new_mag|@>=
345 5: write(term_out,'New magnification (default=0 to keep the old one): ');
346 new_mag:=0; input_ln; buf_ptr:=0;
347 if buffer[0]<>" " then
348 if (buffer[0]>="0")and(buffer[0]<="9") then new_mag:=get_integer
349 else begin write(term_out,'Type a positive integer to override ');
350 write_ln(term_out,'the magnification in the DVI file.');
351 goto 5;
352 end
353 @y
354 @ No dialog (50).
355 @ No dialog (51).
356 @ No dialog (52).
357 @ No dialog (53).
358 @ No dialog (54).
359 @ No dialog (55).
360 @z
361
362 @x [56] Fix printing of floating point number.
363 print_ln(' Resolution = ',resolution:12:8,' pixels per inch');
364 if new_mag>0 then print_ln(' New magnification factor = ',new_mag/1000:8:3)
365 @y
366 print (' Resolution = ');
367 print_real (resolution, 12, 8);
368 print_ln (' pixels per inch');
369 if new_mag > 0
370 then begin
371 print (' New magnification factor = ');
372 print_real (new_mag / 1000.0, 8, 3);
373 print_ln('')
374 end
375 @z
376
377 @x [59] We use r for something else.
378 @!r:0..name_length; {index into |cur_name|}
379 @y
380 @!r:0..name_size; {current filename length}
381 @z
382
383 @x [62] <Load the new font...> close the file when we're done
384 if out_mode=errors_only then print_ln(' ');
385 @y
386 if out_mode=errors_only then print_ln(' ');
387 if tfm_file then
388 xfclose (tfm_file, cur_name); {should be the |kpse_find_tfm| result}
389 free (cur_name); {We |xmalloc|'d this before we got called.}
390 @z
391
392 @x [64] Don't set default_directory_name.
393 @d default_directory_name=='TeXfonts:' {change this to the correct name}
394 @d default_directory_name_length=9 {change this to the correct length}
395
396 @<Glob...@>=
397 @!default_directory:packed array[1..default_directory_name_length] of char;
398 @y
399 Under Unix, users have a path searched for fonts, there's no single
400 default directory.
401 @z
402
403 @x [65] Remove initialization of default_directory.
404 @ @<Set init...@>=
405 default_directory:=default_directory_name;
406 @y
407 @ (No initialization needs to be done. Keep this module to preserve
408 numbering.)
409 @z
410
411 @x [66] Don't append `.tfm' here, and keep lowercase.
412 @ The string |cur_name| is supposed to be set to the external name of the
413 \.{TFM} file for the current font. This usually means that we need to
414 prepend the name of the default directory, and
415 to append the suffix `\.{.TFM}'. Furthermore, we change lower case letters
416 to upper case, since |cur_name| is a \PASCAL\ string.
417 @^system dependencies@>
418
419 @<Move font name into the |cur_name| string@>=
420 for k:=1 to name_length do cur_name[k]:=' ';
421 if p=0 then
422 begin for k:=1 to default_directory_name_length do
423 cur_name[k]:=default_directory[k];
424 r:=default_directory_name_length;
425 end
426 else r:=0;
427 for k:=font_name[nf] to font_name[nf+1]-1 do
428 begin incr(r);
429 if r+4>name_length then
430 abort('ODVItype capacity exceeded (max font name length=',
431 name_length:1,')!');
432 @.ODVItype capacity exceeded...@>
433 if (names[k]>="a")and(names[k]<="z") then
434 cur_name[r]:=xchr[names[k]-@'40]
435 else cur_name[r]:=xchr[names[k]];
436 end;
437 cur_name[r+1]:='.'; cur_name[r+2]:='T'; cur_name[r+3]:='F'; cur_name[r+4]:='M'
438 @y
439 @ The string |cur_name| is supposed to be set to the external name of the
440 \.{TFM} file for the current font. We do not impose a maximum limit
441 here. It's too bad there is a limit on the total length of all
442 filenames, but it doesn't seem worth reprogramming all that.
443 @^system dependencies@>
444
445 @d name_start == font_name[nf]
446 @d name_end == font_name[nf+1]
447
448 @<Move font name into the |cur_name| string@>=
449 r := name_end - name_start;
450 cur_name := xmalloc_array (char, r);
451 {|strncpy| might be faster, but it's probably a good idea to keep the
452 |xchr| translation.}
453 for k := name_start to name_end do begin
454 cur_name[k - name_start] := xchr[names[k]];
455 end;
456 cur_name[r] := 0; {Append null byte for C.}
457 @z
458
459 @x [75] Diagnose impossible cases.
460 sixty_four_cases(fnt_num_0): first_par:=o-fnt_num_0;
461 end;
462 @y
463 sixty_four_cases(fnt_num_0): first_par:=o-fnt_num_0;
464 othercases abort('internal error');
465 endcases;
466 @z
467
468 @x [80] (major,minor) optionally show opcode
469 @d show(#)==begin flush_text; showing:=true; print(a:1,': ',#);
470 end
471 @d major(#)==if out_mode>errors_only then show(#)
472 @d minor(#)==if out_mode>terse then
473 begin showing:=true; print(a:1,': ',#);
474 @y
475 @d show(#)==begin flush_text; showing:=true; print(a:1,': ',#);
476 if show_opcodes and (o >= 128) then print (' {', o:1, '}');
477 end
478 @d major(#)==if out_mode>errors_only then show(#)
479 @d minor(#)==if out_mode>terse then
480 begin showing:=true; print(a:1,': ',#);
481 if show_opcodes and (o >= 128) then print (' {', o:1, '}');
482 @z
483
484 @x [107] (main) No dialog; remove unused label.
485 dialog; {set up all the options}
486 @y
487 @<Print all the selected options@>;
488 @z
489
490 @x
491 final_end:end.
492 @y
493 end.
494 @z
495
496 @x [110] Fix another floating point print.
497 print_ln('magnification=',mag:1,'; ',conv:16:8,' pixels per DVI unit')
498 @y
499 print ('magnification=', mag:1, '; ');
500 print_real (conv, 16, 8);
501 print_ln (' pixels per DVI unit')
502 @z
503
504 @x [112] System-dependent changes.
505 This section should be replaced, if necessary, by changes to the program
506 that are necessary to make \.{DVItype} work at a particular installation.
507 It is usually best to design your change file so that all changes to
508 previous sections preserve the section numbering; then everybody's version
509 will be consistent with the printed program. More extensive changes,
510 which introduce new sections, can be inserted here; then only the index
511 itself will get a new section number.
512 @^system dependencies@>
513 @y
514 Parse a Unix-style command line.
515
516 @d argument_is (#) == (strcmp (long_options[option_index].name, #) = 0)
517
518 @<Define |parse_arguments|@> =
519 procedure parse_arguments;
520 const n_options = 8; {Pascal won't count array lengths for us.}
521 var @!long_options: array[0..n_options] of getopt_struct;
522 @!getopt_return_val: integer;
523 @!option_index: c_int_type;
524 @!current_option: 0..n_options;
525 @!end_num:^char; {for \.{page-start}}
526 begin
527 @<Define the option table@>;
528 repeat
529 getopt_return_val := getopt_long_only (argc, argv, '', long_options,
530 address_of (option_index));
531 if getopt_return_val = -1 then begin
532 {End of arguments; we exit the loop below.} ;
533
534 end else if getopt_return_val = "?" then begin
535 usage (my_name);
536
537 end else if argument_is ('help') then begin
538 usage_help (ODVITYPE_HELP, nil);
539
540 end else if argument_is ('version') then begin
541 print_version_and_exit
542 (banner, nil, 'J. Plaice, Y. Haralambous, D.E. Knuth', nil);
543
544 end else if argument_is ('output-level') then begin
545 if (optarg[0] < '0') or (optarg[0] > '4') or (optarg[1] <> 0) then begin
546 write_ln (stderr, 'Value for --output-level must be >= 0 and <= 4.');
547 uexit (1);
548 end;
549 out_mode := optarg[0] - '0';
550
551 end else if argument_is ('page-start') then begin
552 @<Determine the desired |start_count| values from |optarg|@>;
553
554 end else if argument_is ('max-pages') then begin
555 max_pages := atou (optarg);
556
557 end else if argument_is ('dpi') then begin
558 resolution := atof (optarg);
559
560 end else if argument_is ('magnification') then begin
561 new_mag := atou (optarg);
562
563 end; {Else it was a flag; |getopt| has already done the assignment.}
564 until getopt_return_val = -1;
565
566 {Now |optind| is the index of first non-option on the command line.}
567 if (optind + 1 <> argc) then begin
568 write_ln (stderr, my_name, ': Need exactly one file argument.');
569 usage (my_name);
570 end;
571 dvi_name := extend_filename (cmdline (optind), 'dvi');
572 end;
573
574 @ Here are the options we allow. The first is one of the standard GNU options.
575 @.-help@>
576
577 @<Define the option...@> =
578 current_option := 0;
579 long_options[current_option].name := 'help';
580 long_options[current_option].has_arg := 0;
581 long_options[current_option].flag := 0;
582 long_options[current_option].val := 0;
583 incr (current_option);
584
585 @ Another of the standard options.
586 @.-version@>
587
588 @<Define the option...@> =
589 long_options[current_option].name := 'version';
590 long_options[current_option].has_arg := 0;
591 long_options[current_option].flag := 0;
592 long_options[current_option].val := 0;
593 incr (current_option);
594
595 @ How verbose to be.
596 @.-output-level@>
597
598 @<Define the option...@> =
599 long_options[current_option].name := 'output-level';
600 long_options[current_option].has_arg := 1;
601 long_options[current_option].flag := 0;
602 long_options[current_option].val := 0;
603 incr (current_option);
604 out_mode := the_works; {default}
605
606 @ What page to start at.
607 @.-page-start@>
608
609 @<Define the option...@> =
610 long_options[current_option].name := 'page-start';
611 long_options[current_option].has_arg := 1;
612 long_options[current_option].flag := 0;
613 long_options[current_option].val := 0;
614 incr (current_option);
615
616 @ Parsing the starting page specification is a bit complicated.
617
618 @<Determine the desired |start_count|...@> =
619 k := 0; {which \.{\\count} register we're on}
620 m := 0; {position in |optarg|}
621 while optarg[m] do begin
622 if optarg[m] = "*" then begin
623 start_there[k] := false;
624 incr (m);
625
626 end else if optarg[m] = "." then begin
627 incr (k);
628 if k >= 10 then begin
629 write_ln (stderr, my_name, ': More than ten count registers specified.');
630 uexit (1);
631 end;
632 incr (m);
633
634 end else begin
635 start_count[k] := strtol (optarg + m, address_of (end_num), 10);
636 if end_num = optarg + m then begin
637 write_ln (stderr, my_name, ': -page-start values must be numeric or *.');
638 uexit (1);
639 end;
640 start_there[k] := true;
641 m := m + end_num - (optarg + m);
642 end;
643 end;
644 start_vals := k;
645
646 @ How many pages to do.
647 @.-max-pages@>
648
649 @<Define the option...@> =
650 long_options[current_option].name := 'max-pages';
651 long_options[current_option].has_arg := 1;
652 long_options[current_option].flag := 0;
653 long_options[current_option].val := 0;
654 incr (current_option);
655 max_pages := 1000000; {default}
656
657 @ Resolution, in pixels per inch.
658 @.-dpi@>
659
660 @<Define the option...@> =
661 long_options[current_option].name := 'dpi';
662 long_options[current_option].has_arg := 1;
663 long_options[current_option].flag := 0;
664 long_options[current_option].val := 0;
665 incr (current_option);
666 resolution := 300.0; {default}
667
668 @ Magnification to apply.
669 @.-magnification@>
670
671 @<Define the option...@> =
672 long_options[current_option].name := 'magnification';
673 long_options[current_option].has_arg := 1;
674 long_options[current_option].flag := 0;
675 long_options[current_option].val := 0;
676 incr (current_option);
677 new_mag := 0; {default is to keep the old one}
678
679 @ Whether to show numeric opcodes.
680 @.-show-opcodes@>
681
682 @<Define the option...@> =
683 long_options[current_option].name := 'show-opcodes';
684 long_options[current_option].has_arg := 0;
685 long_options[current_option].flag := address_of (show_opcodes);
686 long_options[current_option].val := 1;
687 incr (current_option);
688 new_mag := 0; {default is to keep the old one}
689
690 @ @<Glob...@> =
691 @!show_opcodes: c_int_type;
692
693 @ An element with all zeros always ends the list.
694
695 @<Define the option...@> =
696 long_options[current_option].name := 0;
697 long_options[current_option].has_arg := 0;
698 long_options[current_option].flag := 0;
699 long_options[current_option].val := 0;
700
701 @ Global filenames.
702
703 @<Global...@> =
704 @!dvi_name:const_c_string;
705 @z