Skip to content

Commit

Permalink
[CWEB] Handle deletion of last line in 'master' file.
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@67178 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
Andreas Scherer committed May 21, 2023
1 parent 963b6cb commit d7a21c1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions texk/web2c/ctiedir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-05-21 Andreas Scherer <https://ascherer.github.io>

* ctie-k.ch: Handle deletion of last line in 'master' file.

2021-04-06 Andreas Scherer <https://ascherer.github.io>

* ctie-k.ch: Use 'putc' for single newline character.
Expand Down
10 changes: 10 additions & 0 deletions texk/web2c/ctiedir/ctie-k.ch
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,16 @@ static boolean
e_of_ch_preamble (file_index i)
@z

@x l.1079
if (out_mode==post) /* last line has been changed */
fprintf(out_file, "@@z\n");
@y
if (out_mode==post) /* last line has been changed */
fprintf(out_file, "@@z\n");
else if (out_mode==pre) /* last line has been deleted */
fprintf(out_file, "@@y\n@@z\n");
@z

@x l.1106
void usage_error()
{
Expand Down
4 changes: 4 additions & 0 deletions texk/web2c/tiedir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-05-21 Andreas Scherer <https://ascherer.github.io>

* tie-w2c.ch: Handle deletion of last line in 'master' file.

2021-04-04 Andreas Scherer <https://ascherer.github.io>

* tie-w2c.ch: Delete dot in banner line.
Expand Down
20 changes: 20 additions & 0 deletions texk/web2c/tiedir/tie-w2c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,26 @@ if (prod_chf==chf)
else
@z
Section 53.
@x l.1133
if (out_mode==post) { /* last line has been changed */
fputc(map_xchr(@'@@'),out_file); fputc(map_xchr(@'z'),out_file);
new_line(out_file);
}
@y
if (out_mode==post) { /* last line has been changed */
fputc(map_xchr(@'@@'),out_file); fputc(map_xchr(@'z'),out_file);
new_line(out_file);
}
else if (out_mode==pre) { /* last line has been deleted */
fputc(map_xchr(@'@@'),out_file); fputc(map_xchr(@'y'),out_file);
new_line(out_file);
fputc(map_xchr(@'@@'),out_file); fputc(map_xchr(@'z'),out_file);
new_line(out_file);
}
@z
Section 55
@x l.1158
Expand Down

0 comments on commit d7a21c1

Please sign in to comment.