texlive[45956] Build/source/texk/web2c: eptexdir, euptexdir: fix

commits+hironobu at tug.org commits+hironobu at tug.org
Thu Nov 30 23:04:45 CET 2017


Revision: 45956
          http://tug.org/svn/texlive?view=revision&revision=45956
Author:   hironobu
Date:     2017-11-30 23:04:44 +0100 (Thu, 30 Nov 2017)
Log Message:
-----------
eptexdir, euptexdir: fix \pdfprimitive (synchronized pdftex r784)

Revision Links:
--------------
    http://tug.org/svn/texlive?view=revision&revision=784

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/eptexdir/ChangeLog
    trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch
    trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
    trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex
    trunk/Build/source/texk/web2c/euptexdir/ChangeLog
    trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch
    trunk/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log

Modified: trunk/Build/source/texk/web2c/eptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2017-11-30 21:55:26 UTC (rev 45955)
+++ trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2017-11-30 22:04:44 UTC (rev 45956)
@@ -1,3 +1,10 @@
+2017-11-30  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* pdfutils.ch: \pdfprimitive gives no error if argument is not a
+	primitive, just do nothing. (Synchronized pdftex r784, tl r45936)
+	* tests/pdfprimitive-test.tex, tests/pdfprimitive-eptex.log:
+	Add more tests for \pdfprimitive.
+
 2017-10-06  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* pdfutils.ch: Merge prim_eqtb into eqtb, to avoid a bug in

Modified: trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch	2017-11-30 21:55:26 UTC (rev 45955)
+++ trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch	2017-11-30 22:04:44 UTC (rev 45956)
@@ -555,6 +555,23 @@
 table, since we can use the character code itself as a direct address.
 @z
 
+ at x print_cs: \pdfprimitive
+else  begin l:=text(p);
+ at y
+else  begin
+  if (p>=prim_eqtb_base)and(p<frozen_null_font) then
+    l:=prim_text(p-prim_eqtb_base)-1 else l:=text(p);
+ at z
+
+ at x
+else print_esc(text(p));
+ at y
+else if (p>=prim_eqtb_base)and(p<frozen_null_font) then
+    print_esc(prim_text(p-prim_eqtb_base)-1)
+else print_esc(text(p));
+ at z
+
+
 @x \[if]pdfprimitive
 @p @!init procedure primitive(@!s:str_number;@!c:quarterword;@!o:halfword);
 var k:pool_pointer; {index into |str_pool|}
@@ -666,12 +683,6 @@
     p:=get_avail; info(p):=cs_token_flag+frozen_primitive;
     link(p):=loc; loc:=p; start:=p;
     end;
-  end
-else begin
-  print_err("Missing primitive name");
-  help2("The control sequence marked <to be read again> does not")@/
-    ("represent any known primitive.");
-  back_error;
   end;
 end
 
@@ -685,11 +696,15 @@
 @<Reset |cur_tok| for unexpandable primitives, goto restart @>=
 begin
 get_token;
-cur_cs := prim_lookup(text(cur_cs));
+if cur_cs < hash_base then
+  cur_cs := prim_lookup(cur_cs-single_base)
+else
+  cur_cs  := prim_lookup(text(cur_cs));
 if cur_cs<>undefined_primitive then begin
   cur_cmd := prim_eq_type(cur_cs);
   cur_chr := prim_equiv(cur_cs);
-  cur_tok := (cur_cmd*@'400)+cur_chr;
+  cur_cs  := prim_eqtb_base+cur_cs;
+  cur_tok := cs_token_flag+cur_cs;
   end
 else begin
   cur_cmd := relax;

Modified: trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log	2017-11-30 21:55:26 UTC (rev 45955)
+++ trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log	2017-11-30 22:04:44 UTC (rev 45956)
@@ -3,23 +3,14 @@
  %&-line parsing enabled.
 **pdfprimitive-eptex
 (./pdfprimitive-eptex.tex
-RELAX macro:->\message {RELAX} FUGA
-! Missing primitive name.
-<to be read again> 
-                   \fuga 
-l.13 \pdfprimitive\fuga
-                        % ==> ``! Missing primitive name.'' error
-The control sequence marked <to be read again> does not
-represent any known primitive.
-
-FUGA F T F F F
+RELAX macro:->\message {RELAX} FUGA F T F F F
 > \pdfstrcmp=\pdfstrcmp.
-l.22 \show\pdfstrcmp
+l.28 \show\pdfstrcmp
                      % ==> \pdfstrcmp
 
 T T
 ! Undefined control sequence.
-l.29 \setbox0=\vbox{\pdfprimitive\ \undefined
+l.35 \setbox0=\vbox{\pdfprimitive\ \undefined
                                              }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -28,7 +19,7 @@
 and I'll forget about whatever was undefined.
 
 ! Undefined control sequence.
-l.31 \setbox0=\vbox{\pdfprimitive\vrule\undefined
+l.37 \setbox0=\vbox{\pdfprimitive\vrule\undefined
                                                  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -37,10 +28,30 @@
 and I'll forget about whatever was undefined.
 
 
-Overfull \hbox (0.4pt too wide) in paragraph at lines 31--31
+Overfull \hbox (0.4pt too wide) in paragraph at lines 37--37
 []|
 
 \hbox(0.0+0.0)x0.0 []
 
- )
+<1>
+! Missing number, treated as zero.
+<to be read again> 
+                   \- 
+l.43   \count42=\pdfprimitive\-
+                                2\A
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+<0>
+! Missing number, treated as zero.
+<to be read again> 
+                   \vrule 
+l.44   \count42=\pdfprimitive\vrule
+                                    3\A
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+<0> )
 No pages of output.

Modified: trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex	2017-11-30 21:55:26 UTC (rev 45955)
+++ trunk/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex	2017-11-30 22:04:44 UTC (rev 45956)
@@ -1,6 +1,12 @@
 %#!euptex pdfprimitive-test.tex
 \catcode`\{=1\catcode`\}=2
 \scrollmode
+\catcode`\Q=14
+\ifdefined\pdfprimitive\else\catcode`\Q=11 \fi
+
+Q\let\pdfprimitive\primitive\let\ifpdfprimitive\ifprimitive
+\catcode`\Q=11 
+
 \def\relax{\message{RELAX}}
 \def\fuga{\message{FUGA}}
 \let\input=\halign
@@ -30,4 +36,12 @@
 % ==> ``! Undefined control sequence.'' error
 \setbox0=\vbox{\pdfprimitive\vrule\undefined}
 % ==> ``! Undefined control sequence.'' error
+
+\setbox0=\hbox{%
+  \def\A{\message{<\the\count42>}\ignorespaces}
+  \count42=\pdfprimitive\X 1\A
+  \count42=\pdfprimitive\- 2\A
+  \count42=\pdfprimitive\vrule 3\A
+}
+
 \end

Modified: trunk/Build/source/texk/web2c/euptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/ChangeLog	2017-11-30 21:55:26 UTC (rev 45955)
+++ trunk/Build/source/texk/web2c/euptexdir/ChangeLog	2017-11-30 22:04:44 UTC (rev 45956)
@@ -1,3 +1,8 @@
+2017-11-30  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* pdfstrcmp-eup-post.ch, tests/pdfprimitive-euptex.log: Adapt
+	to eptex update.
+
 2017-10-06  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* tests/pdfprimitive-euptex.log: Adapt to eptex update.

Modified: trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch	2017-11-30 21:55:26 UTC (rev 45955)
+++ trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch	2017-11-30 22:04:44 UTC (rev 45956)
@@ -3,11 +3,6 @@
 @y
     cur_tok := (cur_cmd*max_char_val)+cur_chr;
 @z
- at x
-  cur_tok := (cur_cmd*@'400)+cur_chr;
- at y
-  cur_tok := (cur_cmd*max_char_val)+cur_chr;
- at z
 
 @x
 procedure print_kanji(@!s:integer); {prints a single character}

Modified: trunk/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log	2017-11-30 21:55:26 UTC (rev 45955)
+++ trunk/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log	2017-11-30 22:04:44 UTC (rev 45956)
@@ -3,23 +3,14 @@
  %&-line parsing enabled.
 **pdfprimitive-euptex
 (./pdfprimitive-euptex.tex
-RELAX macro:->\message {RELAX} FUGA
-! Missing primitive name.
-<to be read again> 
-                   \fuga 
-l.13 \pdfprimitive\fuga
-                        % ==> ``! Missing primitive name.'' error
-The control sequence marked <to be read again> does not
-represent any known primitive.
-
-FUGA F T F F F
+RELAX macro:->\message {RELAX} FUGA F T F F F
 > \pdfstrcmp=\pdfstrcmp.
-l.22 \show\pdfstrcmp
+l.28 \show\pdfstrcmp
                      % ==> \pdfstrcmp
 
 T T
 ! Undefined control sequence.
-l.29 \setbox0=\vbox{\pdfprimitive\ \undefined
+l.35 \setbox0=\vbox{\pdfprimitive\ \undefined
                                              }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -28,7 +19,7 @@
 and I'll forget about whatever was undefined.
 
 ! Undefined control sequence.
-l.31 \setbox0=\vbox{\pdfprimitive\vrule\undefined
+l.37 \setbox0=\vbox{\pdfprimitive\vrule\undefined
                                                  }
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
@@ -37,10 +28,30 @@
 and I'll forget about whatever was undefined.
 
 
-Overfull \hbox (0.4pt too wide) in paragraph at lines 31--31
+Overfull \hbox (0.4pt too wide) in paragraph at lines 37--37
 []|
 
 \hbox(0.0+0.0)x0.0 []
 
- )
+<1>
+! Missing number, treated as zero.
+<to be read again> 
+                   \- 
+l.43   \count42=\pdfprimitive\-
+                                2\A
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+<0>
+! Missing number, treated as zero.
+<to be read again> 
+                   \vrule 
+l.44   \count42=\pdfprimitive\vrule
+                                    3\A
+A number should have been here; I inserted `0'.
+(If you can't figure out why I needed to see a number,
+look up `weird error' in the index to The TeXbook.)
+
+<0> )
 No pages of output.



More information about the tex-live-commits mailing list