modernc.org/knuth@v0.0.4/web/testdata/ctan.org/tex-archive/systems/knuth/dist/texware/dvitype.ch (about) 1 @x dvitype.web:116: 2 @d othercases == others: {default for cases not listed explicitly} 3 @y 4 @d othercases == else {default for cases not listed explicitly} 5 @z 6 7 @x dvitype.web:127: 8 @d print_ln(#)==write_ln(#) 9 @y 10 @d print_ln(#)==write_ln(#) 11 @d write_ln(#)==writeln(#) 12 @d read_ln(#)==readln(#) 13 @z 14 15 @x dvitype.web:129: 16 @p program DVI_type(@!dvi_file,@!output); 17 label @<Labels in the outer block@>@/ 18 const @<Constants in the outer block@>@/ 19 type @<Types in the outer block@>@/ 20 var @<Globals in the outer block@>@/ 21 procedure initialize; {this procedure gets things started properly} 22 var i:integer; {loop index for initializations} 23 begin print_ln(banner);@/ 24 @<Set initial values@>@/ 25 end; 26 27 @ If the program has to stop prematurely, it goes to the 28 `|final_end|'. Another label, |done|, is used when stopping normally. 29 30 @d final_end=9999 {label for the end of it all} 31 @d done=30 {go here when finished with a subtask} 32 33 @<Labels...@>=final_end,done; 34 @y 35 @p program DVI_type(@!dvi_file,@!output); 36 label @<Labels in the outer block@>@/ 37 const @<Constants in the outer block@>@/ 38 type @<Types in the outer block@>@/ 39 var @<Globals in the outer block@>@/ 40 procedure initialize; {this procedure gets things started properly} 41 var i:integer; {loop index for initializations} 42 begin print_ln(banner);@/ 43 @<Set initial values@>@/ 44 end; 45 46 @ If the program has to stop prematurely, it goes to the 47 `|final_end|'. Another label, |done|, is used when stopping normally. 48 49 @d final_end=9999 {label for the end of it all} 50 @d done=30 {go here when finished with a subtask} 51 52 @<Labels...@>=done; 53 @z 54 55 @x dvitype.web:177: 56 @d abort(#)==begin print(' ',#); jump_out; 57 end 58 @d bad_dvi(#)==abort('Bad DVI file: ',#,'!') 59 @.Bad DVI file@> 60 61 @p procedure jump_out; 62 begin goto final_end; 63 end; 64 @y 65 @d abort(#)==begin print(stderr,' ',#); jump_out; 66 end 67 @d bad_dvi(#)==abort('Bad DVI file: ',#,'!') 68 @.Bad DVI file@> 69 70 @p procedure jump_out; 71 begin 72 panic(final_end); 73 end; 74 @z 75 76 @x dvitype.web:1336: 77 @d update_terminal == break(term_out) {empty the terminal output buffer} 78 @y 79 @d update_terminal == {empty the terminal output buffer} 80 @z 81 82 @x dvitype.web:2166: 83 @p @t\4@>@<Declare the procedure called |scan_bop|@>@; 84 procedure skip_pages(@!bop_seen:boolean); 85 label 9999; {end of this subroutine} 86 var p:integer; {a parameter} 87 @!k:0..255; {command code} 88 @!down_the_drain:integer; {garbage} 89 begin showing:=false; 90 while true do 91 @y 92 @p @t\4@>@<Declare the procedure called |scan_bop|@>@; 93 procedure skip_pages(@!bop_seen:boolean); 94 label 9999; {end of this subroutine} 95 var p:integer; {a parameter} 96 @!k:0..255; {command code} 97 @!down_the_drain:integer; {garbage} 98 begin showing:=false; 99 p := down_the_drain; { Go: make down_the_drain used } 100 while true do 101 @z 102 103 @x dvitype.web:2421: 104 final_end:end. 105 @y 106 end. 107 @z