summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/Makefile.in2
-rw-r--r--Build/source/texk/web2c/eptexdir/ChangeLog8
-rw-r--r--Build/source/texk/web2c/eptexdir/am/eptex.am1
-rw-r--r--Build/source/texk/web2c/eptexdir/eptex.ech4
-rw-r--r--Build/source/texk/web2c/eptexdir/eptex_version.h2
-rw-r--r--Build/source/texk/web2c/eptexdir/suppresserrors.ch138
-rw-r--r--Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex76
-rw-r--r--Build/source/texk/web2c/euptexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/euptexdir/am/euptex.am1
9 files changed, 233 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 3c970b7d440..c7d96797665 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -4447,6 +4447,7 @@ eptex_ch_srcs = \
$(eptex_ch_synctex) \
eptexdir/fam256.ch \
eptexdir/pdfutils.ch \
+ eptexdir/suppresserrors.ch \
eptexdir/char-warning-eptex.ch \
tex-binpool.ch
@@ -4564,6 +4565,7 @@ euptex_ch_srcs = \
euptexdir/pdfstrcmp-eup-pre.ch \
eptexdir/pdfutils.ch \
euptexdir/pdfstrcmp-eup-post.ch \
+ eptexdir/suppresserrors.ch \
eptexdir/char-warning-eptex.ch \
tex-binpool.ch
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog b/Build/source/texk/web2c/eptexdir/ChangeLog
index 898c7a5a083..11b59fe970e 100644
--- a/Build/source/texk/web2c/eptexdir/ChangeLog
+++ b/Build/source/texk/web2c/eptexdir/ChangeLog
@@ -1,3 +1,11 @@
+2021-12-07 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * suppresserrors.ch, tests/suppress_errors.tex: New files
+ to support \suppresslongerror, \suppressoutererror and
+ \suppressmathparerror.
+ * am/eptex.am: Add suppresserrors.ch.
+ * eptex.ech, eptex_version.h: Version 20211207.
+
2021-07-15 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* eptex.ech: Fix a warning message from \epTeXinputencoding.
diff --git a/Build/source/texk/web2c/eptexdir/am/eptex.am b/Build/source/texk/web2c/eptexdir/am/eptex.am
index 31af85a6dea..e0f7ad6c98a 100644
--- a/Build/source/texk/web2c/eptexdir/am/eptex.am
+++ b/Build/source/texk/web2c/eptexdir/am/eptex.am
@@ -72,6 +72,7 @@ eptex_ch_srcs = \
$(eptex_ch_synctex) \
eptexdir/fam256.ch \
eptexdir/pdfutils.ch \
+ eptexdir/suppresserrors.ch \
eptexdir/char-warning-eptex.ch \
tex-binpool.ch
diff --git a/Build/source/texk/web2c/eptexdir/eptex.ech b/Build/source/texk/web2c/eptexdir/eptex.ech
index d60a0f714f7..516fecf682c 100644
--- a/Build/source/texk/web2c/eptexdir/eptex.ech
+++ b/Build/source/texk/web2c/eptexdir/eptex.ech
@@ -32,8 +32,8 @@
@y
@d eTeX_version_string=='-2.6' {current \eTeX\ version}
@#
-@d epTeX_version_string=='-210701'
-@d epTeX_version_number==210701
+@d epTeX_version_string=='-211207'
+@d epTeX_version_number==211207
@z
@x e-pTeX: banner
diff --git a/Build/source/texk/web2c/eptexdir/eptex_version.h b/Build/source/texk/web2c/eptexdir/eptex_version.h
index 76fb09486f3..81528213ffc 100644
--- a/Build/source/texk/web2c/eptexdir/eptex_version.h
+++ b/Build/source/texk/web2c/eptexdir/eptex_version.h
@@ -1 +1 @@
-#define EPTEX_VERSION "210701"
+#define EPTEX_VERSION "211207"
diff --git a/Build/source/texk/web2c/eptexdir/suppresserrors.ch b/Build/source/texk/web2c/eptexdir/suppresserrors.ch
new file mode 100644
index 00000000000..07049dd3533
--- /dev/null
+++ b/Build/source/texk/web2c/eptexdir/suppresserrors.ch
@@ -0,0 +1,138 @@
+%% suppresserrors.ch: support ``suppressing errors'' primitives in LuaTeX
+%%
+%% \suppresslongerror done
+%% \suppressoutererror done
+%% \suppressmathparerror done
+%% The followings are not implemented to e-(u)pTeX:
+%% % \suppressifcsnameerror
+%% % \suppressfontnotfounderror -> we have an error from mktextfm etc. anyway
+%% % \suppressprimitiveerror -> e-(u)pTeX does not produce errors in \pdfprimitive
+
+@x
+@d eTeX_state_code=etex_int_base+10 {\eTeX\ state variables}
+@y
+@d suppress_long_error_code=etex_int_base+10
+@d suppress_outer_error_code=etex_int_base+11
+@d suppress_mathpar_error_code=etex_int_base+12
+@d eTeX_state_code=etex_int_base+13 {\eTeX\ state variables}
+@z
+
+@x
+@d read_papersize_special==int_par(read_papersize_special_code)
+@y
+@d read_papersize_special==int_par(read_papersize_special_code)
+@d suppress_long_error==int_par(suppress_long_error_code)
+@d suppress_outer_error==int_par(suppress_outer_error_code)
+@d suppress_mathpar_error==int_par(suppress_mathpar_error_code)
+@z
+
+@x {Perhaps this change hunk is not needed}
+@p procedure check_outer_validity;
+var p:pointer; {points to inserted token list}
+@!q:pointer; {auxiliary pointer}
+begin if scanner_status<>normal then
+@y
+@p procedure check_outer_validity;
+var p:pointer; {points to inserted token list}
+@!q:pointer; {auxiliary pointer}
+begin if suppress_outer_error=0 then if scanner_status<>normal then
+@z
+
+@x @<Finish line, emit a \.{\\par}@>
+if cur_cmd>=outer_call then check_outer_validity;
+@y
+if (suppress_outer_error=0)and(cur_cmd>=outer_call) then check_outer_validity;
+@z
+
+@x @<Process an active-character...@>
+if cur_cmd>=outer_call then check_outer_validity;
+@y
+if (suppress_outer_error=0)and(cur_cmd>=outer_call) then check_outer_validity;
+@z
+
+@x @<Scan a control...@>
+if cur_cmd>=outer_call then check_outer_validity;
+@y
+if (suppress_outer_error=0)and(cur_cmd>=outer_call) then check_outer_validity;
+@z
+
+@x @<Input from token list, |goto restart| ...@>
+ if cur_cmd=dont_expand then
+ @<Get the next token, suppressing expansion@>
+ else check_outer_validity;
+@y
+ if cur_cmd=dont_expand then
+ @<Get the next token, suppressing expansion@>
+ else if suppress_outer_error=0 then check_outer_validity;
+@z
+
+@x @<Read next line of file into |buffer|, ...>
+ end_file_reading; {resume previous level}
+ check_outer_validity; goto restart;
+@y
+ end_file_reading; {resume previous level}
+ if suppress_outer_error=0 then check_outer_validity; goto restart;
+@z
+
+@x
+if cur_tok=par_token then if long_state<>long_call then
+ @<Report a runaway argument and abort@>;
+@y
+if cur_tok=par_token then if long_state<>long_call then
+ if suppress_long_error=0 then @<Report a runaway argument and abort@>;
+@z
+
+@x
+ if cur_tok=par_token then if long_state<>long_call then
+ @<Report a runaway argument and abort@>;
+@y
+ if cur_tok=par_token then if long_state<>long_call then
+ if suppress_long_error=0 then @<Report a runaway argument and abort@>;
+@z
+
+@x
+@<Math-only cases in non-math modes, or vice versa@>: insert_dollar_sign;
+@y
+@<Math-only cases in non-math modes, or vice versa@>: insert_dollar_sign;
+mmode+par_end: if suppress_mathpar_error=0 then insert_dollar_sign;
+@z
+
+@x
+mmode+endv, mmode+par_end, mmode+stop, mmode+vskip, mmode+un_vbox,
+mmode+valign, mmode+hrule
+@y
+mmode+endv, mmode+stop, mmode+vskip, mmode+un_vbox,
+mmode+valign, mmode+hrule
+@z
+
+@x after_math
+@<Check that another \.\$ follows@>=
+begin get_x_token;
+@y
+@<Check that another \.\$ follows@>=
+begin repeat get_x_token;
+until (suppress_mathpar_error=0)or(cur_cmd<>par_end);
+@z
+
+@x
+primitive("readpapersizespecial",assign_int,int_base+read_papersize_special_code);@/
+@!@:read_papersize_special_}{\.{\\readpapersizespecial} primitive@>
+@y
+primitive("readpapersizespecial",assign_int,int_base+read_papersize_special_code);@/
+@!@:read_papersize_special_}{\.{\\readpapersizespecial} primitive@>
+primitive("suppresslongerror",assign_int,int_base+suppress_long_error_code);@/
+@!@:suppress_long_error_}{\.{\\suppresslongerror} primitive@>
+primitive("suppressoutererror",assign_int,int_base+suppress_outer_error_code);@/
+@!@:suppress_outer_error_}{\.{\\suppressoutererror} primitive@>
+primitive("suppressmathparerror",assign_int,int_base+suppress_mathpar_error_code);@/
+@!@:suppress_mathpar_error_}{\.{\\suppressmathparerror} primitive@>
+@z
+
+@x
+read_papersize_special_code:print_esc("readpapersizespecial");
+@y
+read_papersize_special_code:print_esc("readpapersizespecial");
+suppress_long_error_code: print_esc("suppresslongerror");
+suppress_outer_error_code: print_esc("suppressoutererror");
+suppress_mathpar_error_code: print_esc("suppressmathparerror");
+@z
diff --git a/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex b/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex
new file mode 100644
index 00000000000..6b116350fdf
--- /dev/null
+++ b/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex
@@ -0,0 +1,76 @@
+\batchmode
+\long\def\typeout#1{\immediate\write-1{#1}}
+\def\ { }%
+\output{\deadcycles0\setbox0\box255}
+\def\E#1{}
+\typeout{*** \string\par\ in non-\string\long\ cmd.}
+\E{a
+
+b}
+\E{c\par d}
+
+\outer\def\F{hoge}
+\typeout{*** \string\outer\ cmd in \string\message\ and \string\write.}
+\immediate\write-1{\F}
+\message{\F}
+
+\typeout{*** \string\outer\ cmd in conditionals.}
+\iftrue a\F
+\else b\F
+\fi
+
+\typeout{*** \string\outer\ cmd in alignment preambles.}
+\halign{#\F&#\cr a&d\cr}
+
+\typeout{*** \string\par\ in math mode.}
+$ x+1 =
+
+a\par b$
+
+$$\eqno{a}\par$$
+
+$$ aaa\par$$
+
+\typeout{*** \string\pdfprimitive\ and non-primitive.}
+\ifdefined\primitive
+ \primitive\batchmode
+ \primitive\hoge
+\else
+ \pdfprimitive\batchmode
+ \pdfprimitive\hoge
+\fi
+
+\typeout{===============}
+\suppresslongerror=1
+\suppressoutererror=1
+\suppressmathparerror=1
+
+\typeout{*** \string\par\ in non-\string\long\ cmd.}
+\E{a
+
+b}
+\E{c\par d}
+
+\typeout{*** \string\outer\ cmd in \string\message\ and \string\write.}
+\immediate\write-1{\F}
+\message{\F}
+
+\typeout{*** \string\outer\ cmd in conditionals.}
+\iftrue a\F
+\else b\F
+\fi
+
+\typeout{*** \string\outer\ cmd in alignment preambles.}
+\halign{#\F&#\cr a&d\cr}
+
+\typeout{*** \string\par\ in math mode.}
+$ x+1 =
+
+a\par b$
+
+$$\eqno{a}\par$$
+
+$$ aaa\par$$
+
+\bye
+
diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog
index d168fe73756..7d93185e1f4 100644
--- a/Build/source/texk/web2c/euptexdir/ChangeLog
+++ b/Build/source/texk/web2c/euptexdir/ChangeLog
@@ -1,3 +1,7 @@
+2021-12-07 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * am/euptex.am: Add suppresserrors.ch.
+
2021-03-23 Karl Berry <karl@tug.org>
* TL'21.
diff --git a/Build/source/texk/web2c/euptexdir/am/euptex.am b/Build/source/texk/web2c/euptexdir/am/euptex.am
index e795882859f..2db36b29f72 100644
--- a/Build/source/texk/web2c/euptexdir/am/euptex.am
+++ b/Build/source/texk/web2c/euptexdir/am/euptex.am
@@ -72,6 +72,7 @@ euptex_ch_srcs = \
euptexdir/pdfstrcmp-eup-pre.ch \
eptexdir/pdfutils.ch \
euptexdir/pdfstrcmp-eup-post.ch \
+ eptexdir/suppresserrors.ch \
eptexdir/char-warning-eptex.ch \
tex-binpool.ch