texlive[61239] Build/source/texk/web2c: e[u]ptex: Add new primitives

commits+hironobu at tug.org commits+hironobu at tug.org
Tue Dec 7 15:32:01 CET 2021


Revision: 61239
          http://tug.org/svn/texlive?view=revision&revision=61239
Author:   hironobu
Date:     2021-12-07 15:32:01 +0100 (Tue, 07 Dec 2021)
Log Message:
-----------
e[u]ptex: Add new primitives for suppress errors

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/Makefile.in
    trunk/Build/source/texk/web2c/eptexdir/ChangeLog
    trunk/Build/source/texk/web2c/eptexdir/am/eptex.am
    trunk/Build/source/texk/web2c/eptexdir/eptex.ech
    trunk/Build/source/texk/web2c/eptexdir/eptex_version.h
    trunk/Build/source/texk/web2c/euptexdir/ChangeLog
    trunk/Build/source/texk/web2c/euptexdir/am/euptex.am

Added Paths:
-----------
    trunk/Build/source/texk/web2c/eptexdir/suppresserrors.ch
    trunk/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex

Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in	2021-12-07 00:49:04 UTC (rev 61238)
+++ trunk/Build/source/texk/web2c/Makefile.in	2021-12-07 14:32:01 UTC (rev 61239)
@@ -4447,6 +4447,7 @@
 	$(eptex_ch_synctex) \
 	eptexdir/fam256.ch \
 	eptexdir/pdfutils.ch \
+	eptexdir/suppresserrors.ch \
 	eptexdir/char-warning-eptex.ch \
 	tex-binpool.ch
 
@@ -4564,6 +4565,7 @@
 	euptexdir/pdfstrcmp-eup-pre.ch \
 	eptexdir/pdfutils.ch \
 	euptexdir/pdfstrcmp-eup-post.ch \
+	eptexdir/suppresserrors.ch \
 	eptexdir/char-warning-eptex.ch \
 	tex-binpool.ch
 

Modified: trunk/Build/source/texk/web2c/eptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2021-12-07 00:49:04 UTC (rev 61238)
+++ trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2021-12-07 14:32:01 UTC (rev 61239)
@@ -1,3 +1,11 @@
+2021-12-07  Hironori Kitagawa  <h_kitagawa2001 at 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 at yahoo.co.jp>
 
 	* eptex.ech: Fix a warning message from \epTeXinputencoding.

Modified: trunk/Build/source/texk/web2c/eptexdir/am/eptex.am
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/am/eptex.am	2021-12-07 00:49:04 UTC (rev 61238)
+++ trunk/Build/source/texk/web2c/eptexdir/am/eptex.am	2021-12-07 14:32:01 UTC (rev 61239)
@@ -72,6 +72,7 @@
 	$(eptex_ch_synctex) \
 	eptexdir/fam256.ch \
 	eptexdir/pdfutils.ch \
+	eptexdir/suppresserrors.ch \
 	eptexdir/char-warning-eptex.ch \
 	tex-binpool.ch
 

Modified: trunk/Build/source/texk/web2c/eptexdir/eptex.ech
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/eptex.ech	2021-12-07 00:49:04 UTC (rev 61238)
+++ trunk/Build/source/texk/web2c/eptexdir/eptex.ech	2021-12-07 14:32:01 UTC (rev 61239)
@@ -32,8 +32,8 @@
 @y
 @d eTeX_version_string=='-2.6' {current \eTeX\ version}
 @#
- at d epTeX_version_string=='-210701'
- at d epTeX_version_number==210701
+ at d epTeX_version_string=='-211207'
+ at d epTeX_version_number==211207
 @z
 
 @x e-pTeX: banner

Modified: trunk/Build/source/texk/web2c/eptexdir/eptex_version.h
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/eptex_version.h	2021-12-07 00:49:04 UTC (rev 61238)
+++ trunk/Build/source/texk/web2c/eptexdir/eptex_version.h	2021-12-07 14:32:01 UTC (rev 61239)
@@ -1 +1 @@
-#define EPTEX_VERSION "210701"
+#define EPTEX_VERSION "211207"

Added: trunk/Build/source/texk/web2c/eptexdir/suppresserrors.ch
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/suppresserrors.ch	                        (rev 0)
+++ trunk/Build/source/texk/web2c/eptexdir/suppresserrors.ch	2021-12-07 14:32:01 UTC (rev 61239)
@@ -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
+
+ at x
+ at d eTeX_state_code=etex_int_base+10 {\eTeX\ state variables}
+ at y
+ at d suppress_long_error_code=etex_int_base+10
+ at d suppress_outer_error_code=etex_int_base+11
+ at d suppress_mathpar_error_code=etex_int_base+12
+ at d eTeX_state_code=etex_int_base+13 {\eTeX\ state variables}
+ at z
+
+ at x
+ at d read_papersize_special==int_par(read_papersize_special_code)
+ at y
+ at d read_papersize_special==int_par(read_papersize_special_code)
+ at d suppress_long_error==int_par(suppress_long_error_code)
+ at d suppress_outer_error==int_par(suppress_outer_error_code)
+ at d suppress_mathpar_error==int_par(suppress_mathpar_error_code)
+ at z
+
+ at x {Perhaps this change hunk is not needed}
+ at p procedure check_outer_validity;
+var p:pointer; {points to inserted token list}
+@!q:pointer; {auxiliary pointer}
+begin if scanner_status<>normal then
+ at y
+ at 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
+ at z
+
+ at x @<Finish line, emit a \.{\\par}@>
+if cur_cmd>=outer_call then check_outer_validity;
+ at y
+if (suppress_outer_error=0)and(cur_cmd>=outer_call) then check_outer_validity;
+ at z
+
+ at x @<Process an active-character...@>
+if cur_cmd>=outer_call then check_outer_validity;
+ at y
+if (suppress_outer_error=0)and(cur_cmd>=outer_call) then check_outer_validity;
+ at z
+
+ at x @<Scan a control...@>
+if cur_cmd>=outer_call then check_outer_validity;
+ at y
+if (suppress_outer_error=0)and(cur_cmd>=outer_call) then check_outer_validity;
+ at z
+
+ at x @<Input from token list, |goto restart|  ...@>
+      if cur_cmd=dont_expand then
+        @<Get the next token, suppressing expansion@>
+      else check_outer_validity;
+ at y
+      if cur_cmd=dont_expand then
+        @<Get the next token, suppressing expansion@>
+      else if suppress_outer_error=0 then check_outer_validity;
+ at z
+
+ at x @<Read next line of file into |buffer|, ...>
+  end_file_reading; {resume previous level}
+  check_outer_validity; goto restart;
+ at y
+  end_file_reading; {resume previous level}
+  if suppress_outer_error=0 then check_outer_validity; goto restart;
+ at z
+
+ at x
+if cur_tok=par_token then if long_state<>long_call then
+  @<Report a runaway argument and abort@>;
+ at 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@>;
+ at z
+
+ at x
+  if cur_tok=par_token then if long_state<>long_call then
+    @<Report a runaway argument and abort@>;
+ at 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@>;
+ at z
+
+ at x
+@<Math-only cases in non-math modes, or vice versa@>: insert_dollar_sign;
+ at 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;
+ at z
+
+ at x
+mmode+endv, mmode+par_end, mmode+stop, mmode+vskip, mmode+un_vbox,
+mmode+valign, mmode+hrule
+ at y
+mmode+endv, mmode+stop, mmode+vskip, mmode+un_vbox,
+mmode+valign, mmode+hrule
+ at z
+
+ at x after_math
+@<Check that another \.\$ follows@>=
+begin get_x_token;
+ at y
+@<Check that another \.\$ follows@>=
+begin repeat get_x_token;
+until (suppress_mathpar_error=0)or(cur_cmd<>par_end);
+ at z
+
+ at x
+primitive("readpapersizespecial",assign_int,int_base+read_papersize_special_code);@/
+@!@:read_papersize_special_}{\.{\\readpapersizespecial} primitive@>
+ at 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@>
+ at z
+
+ at x
+read_papersize_special_code:print_esc("readpapersizespecial");
+ at 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");
+ at z


Property changes on: trunk/Build/source/texk/web2c/eptexdir/suppresserrors.ch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex	                        (rev 0)
+++ trunk/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex	2021-12-07 14:32:01 UTC (rev 61239)
@@ -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
+


Property changes on: trunk/Build/source/texk/web2c/eptexdir/tests/suppress_errors.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/euptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/ChangeLog	2021-12-07 00:49:04 UTC (rev 61238)
+++ trunk/Build/source/texk/web2c/euptexdir/ChangeLog	2021-12-07 14:32:01 UTC (rev 61239)
@@ -1,3 +1,7 @@
+2021-12-07  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* am/euptex.am: Add suppresserrors.ch.
+
 2021-03-23  Karl Berry  <karl at tug.org>
 
 	* TL'21.

Modified: trunk/Build/source/texk/web2c/euptexdir/am/euptex.am
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/am/euptex.am	2021-12-07 00:49:04 UTC (rev 61238)
+++ trunk/Build/source/texk/web2c/euptexdir/am/euptex.am	2021-12-07 14:32:01 UTC (rev 61239)
@@ -72,6 +72,7 @@
 	euptexdir/pdfstrcmp-eup-pre.ch \
 	eptexdir/pdfutils.ch \
 	euptexdir/pdfstrcmp-eup-post.ch \
+	eptexdir/suppresserrors.ch \
 	eptexdir/char-warning-eptex.ch \
 	tex-binpool.ch
 



More information about the tex-live-commits mailing list.