diff options
author | Karl Berry <karl@freefriends.org> | 2020-07-19 15:42:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-07-19 15:42:51 +0000 |
commit | ef76eb4ac1bfe43d21a34b25e97d8fbc40088831 (patch) | |
tree | 90b9f6a123daf5262e2ce4c50883f3694c28ff2a /Build/source/texk/web2c/pdftexdir | |
parent | 4d745399c80cdfb4dd055c93ac9f063ede8087c1 (diff) |
\tracinglostchars>=3 now causes an error; missing character code always reported in hex
git-svn-id: svn://tug.org/texlive/trunk@55874 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/am/pdftex.am | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/change-files.txt | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch | 62 |
4 files changed, 82 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index d99bbc8826b..400996e8206 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,12 @@ +2020-07-19 Karl Berry <karl@freefriends.org> + + * char-warning-pdftex.ch: new file to implement new feature; + if \tracinglostchars>=3, missing characters cause an error and not + just a diagnostic message. Also, always report the hex code of the + missing character. From David Jones, tex-implements 30jun2020. + * am/pdftex.am (pdftex_ch_srcs): add it. + * change-files.txt: update. + 2020-07-17 Andreas Scherer <https://ascherer.github.io> * am/pdftex.am: Avoid changefile ambiguity. diff --git a/Build/source/texk/web2c/pdftexdir/am/pdftex.am b/Build/source/texk/web2c/pdftexdir/am/pdftex.am index 1eb82160dcc..3bd5280521a 100644 --- a/Build/source/texk/web2c/pdftexdir/am/pdftex.am +++ b/Build/source/texk/web2c/pdftexdir/am/pdftex.am @@ -1,6 +1,7 @@ +## $Id$ ## texk/web2c/pdftexdir/am/pdftex.am: Makefile fragment for pdfTeX. ## -## Copyright 2016-2019 Karl Berry <tex-live@tug.org> +## Copyright 2016-2020 Karl Berry <tex-live@tug.org> ## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. @@ -73,6 +74,7 @@ pdftex_ch_srcs = \ enctex.ch \ $(pdftex_ch_synctex) \ pdftexdir/pdftex.ch \ + pdftexdir/char-warning-pdftex.ch \ tex-binpool.ch # Convenience target for making the typeset output; not invoked automatically diff --git a/Build/source/texk/web2c/pdftexdir/change-files.txt b/Build/source/texk/web2c/pdftexdir/change-files.txt index c6a3387f41d..a435369d052 100644 --- a/Build/source/texk/web2c/pdftexdir/change-files.txt +++ b/Build/source/texk/web2c/pdftexdir/change-files.txt @@ -1,14 +1,20 @@ +$Id$ +Public domain. How change files are applied for pdftex/pdfetex? ============================= pdftex ============================= -2) pdftex.ch is generated from +2) pdftex.ch is essentially generated from (see pdftexdir/am/pdftex.am) ./tie -c pdftex.ch pdftex.web \ $(srcdir)/pdftexdir/tex.ch0 \ $(srcdir)/tex.ch \ $(srcdir)/pdftexdir/tex.ch1 \ $(srcdir)/pdftexdir/tex.pch +There are more feature-specific change files, for synctex, including the +pool in the binary, etc., many of which are shared between engines. They +don't alter the basic process described here. + Input: pdftex.web: pdftex without system-dependent changes @@ -31,5 +37,5 @@ Input: change the tex banner to pdftex banner (reverse tex.ch0) Output: - pdftex.ch (not pdftexdir/pdftex.ch): + pdftex.ch (in the build dir, not pdftexdir/pdftex.ch): additional & system-dependent changes diff --git a/Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch b/Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch new file mode 100644 index 00000000000..828ebfcc3cf --- /dev/null +++ b/Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch @@ -0,0 +1,62 @@ +% $Id$ +% Public domain (from David Jones, tex-implementors 30jun2020). +% Unfortunately this cannot be in pdftex.ch since the ordering +% of changes gets messed up. +% +% If \tracinglostchars >= 3, then making missing characters from a font +% be an error, not just a log message, and always report the character +% code in hex as well as a character. +% +% Simple example test: +% pdftex -ini +% \font\x=/usr/local/texlive/2020/texmf-dist/fonts/tfm/public/knuth-lib/logo10.tfm +% \tracinglostchars=3 \x \char99\end +% should get: +% ! Missing character: There is no c ("63) in font logo10. + +@x [30] If \tracinglostchars > 2, then promote full errors. +@p procedure char_warning(@!f:internal_font_number;@!c:eight_bits); +var old_setting: integer; {saved value of |tracing_online|} +begin if tracing_lost_chars>0 then + begin old_setting:=tracing_online; + if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1; + begin begin_diagnostic; + print_nl("Missing character: There is no "); +@.Missing character@> + print_ASCII(c); print(" in font "); + slow_print(font_name[f]); print_char("!"); end_diagnostic(false); + end; + tracing_online:=old_setting; + end; +end; +@y +@p procedure char_warning(@!f:internal_font_number;@!c:eight_bits); +var old_setting: integer; {saved value of |tracing_online|} +begin if tracing_lost_chars>0 then + begin old_setting:=tracing_online; + if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1; + if tracing_lost_chars > 2 then + print_err("Missing character: There is no ") + else begin + begin_diagnostic; + print_nl("Missing character: There is no ") + end; +@.Missing character@> + print_ASCII(c); + if tracing_lost_chars > 2 then begin + print(" ("); + print_hex(c); + print(")"); + end; + print(" in font "); + slow_print(font_name[f]); + if tracing_lost_chars < 3 then print_char("!"); + tracing_online:=old_setting; + if tracing_lost_chars > 2 then begin + help0; + error; + end else end_diagnostic(false); + end; {of |tracing_lost_chars>0|} +end; {of procedure} +@z + |