From 29b4b40ff684009d0ba93634366fa68b5fe1844d Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Sun, 21 May 2023 15:59:10 +0000 Subject: [CWEB] Handle deletion of last line in 'master' file. git-svn-id: svn://tug.org/texlive/trunk@67178 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ctiedir/ChangeLog | 4 ++++ Build/source/texk/web2c/ctiedir/ctie-k.ch | 10 ++++++++++ Build/source/texk/web2c/tiedir/ChangeLog | 4 ++++ Build/source/texk/web2c/tiedir/tie-w2c.ch | 20 ++++++++++++++++++++ 4 files changed, 38 insertions(+) (limited to 'Build/source') diff --git a/Build/source/texk/web2c/ctiedir/ChangeLog b/Build/source/texk/web2c/ctiedir/ChangeLog index 5af1c85e12f..adb0c689914 100644 --- a/Build/source/texk/web2c/ctiedir/ChangeLog +++ b/Build/source/texk/web2c/ctiedir/ChangeLog @@ -1,3 +1,7 @@ +2023-05-21 Andreas Scherer + + * ctie-k.ch: Handle deletion of last line in 'master' file. + 2021-04-06 Andreas Scherer * ctie-k.ch: Use 'putc' for single newline character. diff --git a/Build/source/texk/web2c/ctiedir/ctie-k.ch b/Build/source/texk/web2c/ctiedir/ctie-k.ch index 978737bf762..55539f2fd09 100644 --- a/Build/source/texk/web2c/ctiedir/ctie-k.ch +++ b/Build/source/texk/web2c/ctiedir/ctie-k.ch @@ -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() { diff --git a/Build/source/texk/web2c/tiedir/ChangeLog b/Build/source/texk/web2c/tiedir/ChangeLog index c83da87123b..7c39a2506f9 100644 --- a/Build/source/texk/web2c/tiedir/ChangeLog +++ b/Build/source/texk/web2c/tiedir/ChangeLog @@ -1,3 +1,7 @@ +2023-05-21 Andreas Scherer + + * tie-w2c.ch: Handle deletion of last line in 'master' file. + 2021-04-04 Andreas Scherer * tie-w2c.ch: Delete dot in banner line. diff --git a/Build/source/texk/web2c/tiedir/tie-w2c.ch b/Build/source/texk/web2c/tiedir/tie-w2c.ch index 639d2008312..e4597e0fc38 100644 --- a/Build/source/texk/web2c/tiedir/tie-w2c.ch +++ b/Build/source/texk/web2c/tiedir/tie-w2c.ch @@ -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 -- cgit v1.2.3