From 83920a69d7129018fdee9ad290d4ee22640d3f91 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Mon, 24 Jun 2024 10:00:58 +0000 Subject: [WEB] Another test for 'fix-changefile-lines.py'. By forcing a full set of '@x [part.section] l.line' tag lines and by manually reducing to the simpler format(s), 'dvicopy.ch' can quite easily be amended with the 'l.line' information. 'f-c-l' (without option '--init') reproduces this change file as is. The author of a change file now has more discretion for commenting the change hunks. git-svn-id: svn://tug.org/texlive/trunk@71614 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/dvicopy.ch | 94 +++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'Build/source/texk') diff --git a/Build/source/texk/web2c/dvicopy.ch b/Build/source/texk/web2c/dvicopy.ch index 6e3a35fe694..5b4ebbc5438 100644 --- a/Build/source/texk/web2c/dvicopy.ch +++ b/Build/source/texk/web2c/dvicopy.ch @@ -8,40 +8,40 @@ % Mar 20 91 THD Updated to dvicopy 1.2 % (more recent changes in the ChangeLog) -@x [0] WEAVE: print changes only +@x [0] l.59 WEAVE: print changes only \pageno=\contentspagenumber \advance\pageno by 1 @y \pageno=\contentspagenumber \advance\pageno by 1 \let\maybe=\iffalse @z -@x [1] Define my_name +@x [1] l.97 Define my_name @d banner=='This is DVIcopy, Version 1.6' {printed when the program starts} @y @d my_name=='dvicopy' @d banner=='This is DVIcopy, Version 1.6' {printed when the program starts} @z -@x [2] No random reading on stdin, may be not seekable. +@x [2] l.123 No random reading on stdin, may be not seekable. @d random_reading==true {should we skip around in the file?} @y @= @!random_reading:boolean; {should we skip around in the file?} @z -@x [3] Purge non-local 'goto'. +@x [3] l.134 Purge non-local 'goto'. calls the `|jump_out|' procedure, which goes to the label |final_end|. @d final_end = 9999 {go here to wrap it up} @y calls the `|jump_out|' procedure. @z -@x [3] +@x [3] l.140 label final_end; @y @z -@x [3] Set up kpathsea. +@x [3] l.145 Set up kpathsea. procedure initialize; {this procedure gets things started properly} var @@/ begin print_ln(banner);@/ @@ -55,7 +55,7 @@ procedure initialize; {this procedure gets things started properly} print (banner); print_ln (version_string); @z -@x [5] Big enough arrays to convert the dvilj sample font document. +@x [5] l.177 Big enough arrays to convert the dvilj sample font document. @= @!max_fonts=100; {maximum number of distinct fonts} @!max_chars=10000; {maximum number of different characters among all fonts} @@ -85,7 +85,7 @@ procedure initialize; {this procedure gets things started properly} % [7] Rename the integer types, as they collide with names used by C99. % Rather than change the code all over the place, we use macros to do % the renaming. This could also be done at C preprocessor level. -@x [7] +@x l.244 @d int_32 == integer {signed 32~bit integers} @y @d int_32 == integer {signed 32~bit integers} @@ -103,7 +103,7 @@ procedure initialize; {this procedure gets things started properly} % [11] Redirect output, so it can go to either stdout or stderr, % depending on where the output dvi file is going. -@x [11] +@x l.310 @d print(#)==write(output,#) @d print_ln(#)==write_ln(output,#) @d new_line==write_ln(output) {start new line} @@ -113,7 +113,7 @@ procedure initialize; {this procedure gets things started properly} @d new_line==write_ln(term_out) {start new line} @z -@x [14] Permissive input. +@x [14] l.379 Permissive input. @!ASCII_code=" ".."~"; {a subrange of the integers} @y @!ASCII_code=0..255; {a subrange of the integers} @@ -122,7 +122,7 @@ procedure initialize; {this procedure gets things started properly} % [15] The text_char type is used as an array index into xord. The % default type `char' produces signed integers, which are bad array % indices in C. -@x [15] +@x l.399 @d text_char == char {the data type of characters in text files} @d first_text_char=0 {ordinal number of the smallest element of |text_char|} @d last_text_char=127 {ordinal number of the largest element of |text_char|} @@ -132,7 +132,7 @@ procedure initialize; {this procedure gets things started properly} @d last_text_char=255 {ordinal number of the largest element of |text_char|} @z -@x [23] Remove non-local goto, declare jump_out as noreturn +@x [23] l.572 Remove non-local goto, declare jump_out as noreturn so a procedure called |jump_out| has been introduced. This procedure, which transfers control to the label |final_end| at the end of the program, contains the only non-local |@!goto| statement in \.{\title}. @@ -143,7 +143,7 @@ by a call on some system procedure that quietly terminates the program. @y so a procedure called |jump_out| has been introduced. @z -@x [23] +@x [23] l.581 @d abort(#)==begin print_ln(' ',#,'.'); jump_out; end @@ -170,31 +170,31 @@ uexit(1); end; @z -@x [24] Declare confusion as noreturn +@x [24] l.596 Declare confusion as noreturn says |confusion(|indication of where we are|)|. @y says |confusion|(indication of where we are). @z -@x [24] +@x [24] l.599 procedure confusion(@!p:pckt_pointer); @y noreturn procedure confusion(@!p:pckt_pointer); @z -@x [25] Declare overflow as noreturn +@x [25] l.608 Declare overflow as noreturn procedure overflow(@!p:pckt_pointer;@!n:int_16u); @y noreturn procedure overflow(@!p:pckt_pointer;@!n:int_16u); @z -@x [62] cur_name is no longer a fixed-size array. +@x [62] l.1235 cur_name is no longer a fixed-size array. @!cur_name:packed array[1..name_length] of char; {external name, with no lower case letters} @y @!cur_name:^char; @z -@x [63] Ignore arguments to make_font_name. +@x [63] l.1240 Ignore arguments to make_font_name. @ For \.{TFM} and \.{VF} files we just append the appropriate extension to the file name packet; in addition a system dependent area part (usually different for \.{TFM} and \.{VF} files) is prepended if @@ -229,24 +229,24 @@ to |make_font_name|. % [67] No conversion of filenames in lower case, and initialize and % terminate for C strings. Eliminate now unused variable. -@x [67] +@x l.1310 @!c:char; {a character to be appended to |cur_name|} @y @z -@x [67] +@x [67] l.1312 cur_loc:=pckt_start[n]; cur_limit:=pckt_start[n+1]; @y cur_name := xmalloc_array (char, pckt_length (n) + pckt_length (e)); cur_loc:=pckt_start[n]; cur_limit:=pckt_start[n+1]; @z -@x [67] +@x [67] l.1317 if (b>="a")and(b<="z") then Decr(b)(("a"-"A")); {convert to upper case} @y @z -@x [67] +@x [67] l.1320 cur_loc:=pckt_start[e]; cur_limit:=pckt_start[e+1]; while cur_loc= TFM_default_area:=TFM_default_area_name; @y @ (No initialization to be done. Keep this module to preserve numbering.) @z -@x [94] Declare bad_tfm as noreturn +@x [94] l.1738 Declare bad_tfm as noreturn procedure bad_tfm; @y noreturn procedure bad_tfm; @z -@x [94] Declare bad_font as noreturn +@x [94] l.1745 Declare bad_font as noreturn procedure bad_font; @y noreturn procedure bad_font; @z -@x [95] Open TFM file +@x [95] l.1757 Open TFM file @= make_font_name(TFM_default_area_name_length)(TFM_default_area)(tfm_ext); reset(tfm_file,cur_name); @@ -318,7 +318,7 @@ if full_name then begin end else @z -@x [104] Compute alpha and beta. +@x [104] l.1990 Compute alpha and beta. alpha:=16; while z>=@'40000000 do @y @@ -327,20 +327,20 @@ if z>=@'1000000000 then abort('Character size is too large!'); while z>=@'40000000 do @z -@x [108] Declare full_name. +@x [108] l.2060 Declare full_name. @!dvi_loc:int_32; {where we are about to look, in |dvi_file|} @y @!dvi_loc:int_32; {where we are about to look, in |dvi_file|} @!full_name: ^char; @z -@x [109] Declare bad_dvi as noreturn +@x [109] l.2067 Declare bad_dvi as noreturn procedure bad_dvi; @y noreturn procedure bad_dvi; @z -@x [110] Fix up opening the binary files +@x [110] l.2076 Fix up opening the binary files @ To prepare |dvi_file| for input, we |reset| it. @= @@ -353,7 +353,7 @@ dvi_loc:=0; dvi_loc:=0; @z -@x [112] Make dvi_length() and dvi_move() work. +@x [112] l.2114 Make dvi_length() and dvi_move() work. @p function dvi_length:int_32; begin set_pos(dvi_file,-1); dvi_length:=cur_pos(dvi_file); end; @@ -374,13 +374,13 @@ dvi_loc:=n; end; @z -@x [135] Lower case file name extensions. +@x [135] l.2467 Lower case file name extensions. id3(".")("V")("F")(vf_ext); {file name extension for \.{VF} files} @y id3(".")("v")("f")(vf_ext); {file name extension for \.{VF} files} @z -@x [137] Set default directory name +@x [137] l.2481 Set default directory name @ If no font directory has been specified, \.{\title} is supposed to use the default \.{VF} directory, which is a system-dependent place where the \.{VF} files for standard fonts are kept. @@ -407,7 +407,7 @@ by setting the \.{VFFONTS} environment variable. @ (No initialization to be done. Keep this module to preserve numbering.) @z -@x [139] Open VF file +@x [139] l.2498 Open VF file @= make_font_name(VF_default_area_name_length)(VF_default_area)(vf_ext); reset(vf_file,cur_name); @@ -426,7 +426,7 @@ if full_name then begin end else @z -@x [163] copy elements of array piece by piece +@x [163] l.2937 copy elements of array piece by piece @ @= append_one(push); vf_move[vf_ptr]:=vf_move[vf_ptr-1]; @@ -444,19 +444,19 @@ append_one(push); vf_move_assign; @z -@x [170] and again... +@x [170] l.3033 and again... vf_move[vf_ptr]:=vf_move[vf_ptr-1]; @y vf_move_assign; @z -@x [176] break is fflush. +@x [176] l.3138 break is fflush. @d update_terminal == break(output) {empty the terminal output buffer} @y @d update_terminal == fflush(stdout) {empty the terminal output buffer} @z -@x [176] +@x [176] l.3148 procedure input_ln; {inputs a line from the terminal} var k:0..terminal_line_length; begin if n_opt=0 then @@ -484,42 +484,42 @@ while (k= rewrite(out_file); {prepares to write packed bytes to |out_file|} @y @= @z -@x [248] Use external routine to output bytes. +@x [248] l.4141 Use external routine to output bytes. @d out_byte(#) == write(out_file,#) {write next \.{DVI} byte} @y @d out_byte(#) == put_byte(#,out_file) {write next \.{DVI} byte} @z -@x [260] String declaration. +@x [260] l.4259 String declaration. @!comment:packed array[1..comm_length] of char; {preamble comment prefix} @y @!comment:const_c_string; {preamble comment prefix} @z -@x [261] Output the string from 0 to len-1, not 1 to len. +@x [261] l.4270 Output the string from 0 to len-1, not 1 to len. for k:=1 to comm_length do append_byte(xord[comment[k]]); @y for k:=0 to comm_length - 1 do append_byte(xord[ucharcast(comment[k])]); @z -@x [293] System-dependent changes. +@x [293] l.4480 System-dependent changes. This section should be replaced, if necessary, by changes to the program that are necessary to make \.{DVIcopy} work at a particular installation. It is usually best to design your change file so that all changes to -- cgit v1.2.3