Debian Codegraph @

texk/web2c/euptexdir/char-warning-eptex.ch

raw
1 % $Id: char-warning-eptex.ch 72600 2024-10-20 06:53:25Z takuji $
2 % Public domain. See ../pdftexdir/char-warning-pdftex.ch for info.
3
4 @x [30] If \tracinglostchars > 2, then promote full errors.
5 @p procedure char_warning(@!f:internal_font_number;@!c:sixteen_bits);
6 var @!l:0..255; {small indices or counters}
7 old_setting: integer; {saved value of |tracing_online|}
8 begin if tracing_lost_chars>0 then
9 begin old_setting:=tracing_online;
10 if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1;
11 begin begin_diagnostic;
12 print_nl("Missing character: There is no ");
13 @.Missing character@>
14 if (c<" ")or(c>"~") then begin
15 print_char("^"); print_char("^");
16 if c<64 then print_char(c+64)
17 else if c<128 then print_char(c-64)
18 else if c<256 then begin
19 print_lc_hex(c div 16); print_lc_hex(c mod 16); end
20 else begin print_char("^"); print_char("^");
21 print_lc_hex(c div 4096); print_lc_hex((c mod 4096) div 256);
22 print_lc_hex((c mod 256) div 16); print_lc_hex(c mod 16); end
23 end
24 else print_ASCII(c);
25 print(" in font ");
26 slow_print(font_name[f]); print_char("!"); end_diagnostic(false);
27 end;
28 tracing_online:=old_setting;
29 end;
30 end;
31 @y
32 @p procedure char_warning(@!f:internal_font_number;@!c:sixteen_bits);
33 var @!l:0..255; {small indices or counters}
34 old_setting: integer; {saved value of |tracing_online|}
35 begin if tracing_lost_chars>0 then
36 begin old_setting:=tracing_online;
37 if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1;
38 if tracing_lost_chars > 2 then
39 print_err("Missing character: There is no ")
40 else begin
41 begin_diagnostic;
42 print_nl("Missing character: There is no ")
43 end;
44 @.Missing character@>
45 if (c<" ")or(c>"~") then begin
46 print_char("^"); print_char("^");
47 if c<64 then print_char(c+64)
48 else if c<128 then print_char(c-64)
49 else if c<256 then begin
50 print_lc_hex(c div 16); print_lc_hex(c mod 16); end
51 else begin print_char("^"); print_char("^");
52 print_lc_hex(c div 4096); print_lc_hex((c mod 4096) div 256);
53 print_lc_hex((c mod 256) div 16); print_lc_hex(c mod 16); end
54 end
55 else print_ASCII(c);
56 if tracing_lost_chars > 2 then begin
57 print(" (");
58 print_hex(c);
59 print(")");
60 end;
61 print(" in font ");
62 slow_print(font_name[f]);
63 if tracing_lost_chars < 3 then print_char("!");
64 tracing_online:=old_setting;
65 if tracing_lost_chars > 2 then begin
66 help0;
67 error;
68 end else end_diagnostic(false);
69 end; {of |tracing_lost_chars>0|}
70 end; {of procedure}
71 @z
72
73 @x [30] Another warning for (u)pTeX.
74 @p procedure char_warning_jis(@!f:internal_font_number;@!jc:KANJI_code);
75 begin if tracing_lost_chars>0 then
76 begin begin_diagnostic;
77 print_nl("Character "); print_kanji(jc); print(" (");
78 print_hex(jc); print(") cannot be typeset in JIS-encoded JFM ");
79 slow_print(font_name[f]);
80 print_char(","); print_nl("so I use .notdef glyph instead.");
81 end_diagnostic(false);
82 end;
83 end;
84 @y
85 @p procedure char_warning_jis(@!f:internal_font_number;@!jc:KANJI_code);
86 var old_setting: integer; {saved value of |tracing_online|}
87 begin if tracing_lost_chars>0 then
88 begin old_setting:=tracing_online;
89 if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1;
90 if tracing_lost_chars > 2 then
91 print_err("Character ")
92 else begin
93 begin_diagnostic;
94 print_nl("Character ")
95 end;
96 print_kanji(jc); print(" (");
97 print_hex(jc); print(") cannot be typeset in JIS-encoded JFM ");
98 slow_print(font_name[f]);
99 print_char(",");
100 if tracing_lost_chars > 2 then
101 begin print_nl(" so I use .notdef glyph instead");
102 help0; error; end
103 else
104 begin print_nl("so I use .notdef glyph instead.");
105 end_diagnostic(false); end;
106 tracing_online:=old_setting;
107 end; {of |tracing_lost_chars>0|}
108 end; {of procedure}
109 @z