summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-10-06 13:02:37 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-10-06 13:02:37 +0000
commit4ce5b6c8c17558d27d17c0c36dd203dee10cabee (patch)
tree35b04f624c1d5cfc6203108167dacba1bdb4a2b5
parent120d42262fe4b86b81e5280697e531b4194e4dcc (diff)
eptexdir, euptexdir: more fix for \pdfprimitive (H. Kitagawa)
git-svn-id: svn://tug.org/texlive/trunk@45482 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/eptexdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/eptexdir/pdfutils.ch19
-rw-r--r--Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log25
-rw-r--r--Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex10
-rw-r--r--Build/source/texk/web2c/euptexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log25
6 files changed, 78 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog b/Build/source/texk/web2c/eptexdir/ChangeLog
index cfdb1e000a7..c0d11070f03 100644
--- a/Build/source/texk/web2c/eptexdir/ChangeLog
+++ b/Build/source/texk/web2c/eptexdir/ChangeLog
@@ -1,3 +1,10 @@
+2017-10-06 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * pdfutils.ch: Merge prim_eqtb into eqtb, to avoid a bug in
+ the use of \pdfprimitive inside vertical mode.
+ * tests/pdfprimitive-test.tex, tests/pdfprimitive-eptex.log:
+ Add more tests for \pdfprimitive.
+
2017-09-24 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* pdfutils.ch: Avoid overwriting prim_* entries by primitive().
diff --git a/Build/source/texk/web2c/eptexdir/pdfutils.ch b/Build/source/texk/web2c/eptexdir/pdfutils.ch
index e7ed21e2f2a..ead8cdb3ff9 100644
--- a/Build/source/texk/web2c/eptexdir/pdfutils.ch
+++ b/Build/source/texk/web2c/eptexdir/pdfutils.ch
@@ -410,7 +410,9 @@ end;
{permanent `\.{\\special}'}
@d frozen_primitive=frozen_control_sequence+11
{permanent `\.{\\pdfprimitive}'}
-@d frozen_null_font=frozen_control_sequence+12
+@d prim_eqtb_base=frozen_primitive+1
+@d prim_size=2100 {maximum number of primitives }
+@d frozen_null_font=prim_eqtb_base+prim_size+1
{permanent `\.{\\nullfont}'}
@z
@@ -445,7 +447,6 @@ pdf_page_height_code: print_esc("pdfpageheight");
@ Primitive support needs a few extra variables and definitions
-@d prim_size=2100 {maximum number of primitives }
@d prim_prime=1777 {about 85\pct! of |primitive_size|}
@d prim_base=1
@d prim_next(#) == prim[#].lh {link for coalesced lists}
@@ -454,16 +455,15 @@ pdf_page_height_code: print_esc("pdfpageheight");
@d prim_eq_level_field(#)==#.hh.b1
@d prim_eq_type_field(#)==#.hh.b0
@d prim_equiv_field(#)==#.hh.rh
-@d prim_eq_level(#)==prim_eq_level_field(prim_eqtb[#]) {level of definition}
-@d prim_eq_type(#)==prim_eq_type_field(prim_eqtb[#]) {command code for equivalent}
-@d prim_equiv(#)==prim_equiv_field(prim_eqtb[#]) {equivalent value}
+@d prim_eq_level(#)==prim_eq_level_field(eqtb[prim_eqtb_base+#]) {level of definition}
+@d prim_eq_type(#)==prim_eq_type_field(eqtb[prim_eqtb_base+#]) {command code for equivalent}
+@d prim_equiv(#)==prim_equiv_field(eqtb[prim_eqtb_base+#]) {equivalent value}
@d undefined_primitive=0
@d biggest_char=255 { 65535 in XeTeX }
@<Glob...@>=
@!prim: array [0..prim_size] of two_halves; {the primitives table}
@!prim_used:pointer; {allocation pointer for |prim|}
-@!prim_eqtb:array[0..prim_size] of memory_word;
@z
@x \[if]pdfprimitive
@@ -474,10 +474,6 @@ no_new_control_sequence:=true; {new identifiers are usually forbidden}
no_new_control_sequence:=true; {new identifiers are usually forbidden}
prim_next(0):=0; prim_text(0):=0;
for k:=1 to prim_size do prim[k]:=prim[0];
-prim_eq_level(0) := level_zero;
-prim_eq_type(0) := undefined_cs;
-prim_equiv(0) := null;
-for k:=1 to prim_size do prim_eqtb[k]:=prim_eqtb[0];
@z
@x \[if]pdfprimitive
@@ -1039,6 +1035,7 @@ any_mode(ignore_spaces): begin
if cur_cs<>undefined_primitive then begin
cur_cmd := prim_eq_type(cur_cs);
cur_chr := prim_equiv(cur_cs);
+ cur_tok := cs_token_flag+prim_eqtb_base+cur_cs;
goto reswitch;
end;
end;
@@ -1050,7 +1047,6 @@ any_mode(ignore_spaces): begin
@y
@<Dump the hash table@>=
for p:=0 to prim_size do dump_hh(prim[p]);
-for p:=0 to prim_size do dump_wd(prim_eqtb[p]);
@z
@x \[if]pdfprimitive: undump prim table
@@ -1058,7 +1054,6 @@ for p:=0 to prim_size do dump_wd(prim_eqtb[p]);
@y
@ @<Undump the hash table@>=
for p:=0 to prim_size do undump_hh(prim[p]);
-for p:=0 to prim_size do undump_wd(prim_eqtb[p]);
@z
@x
diff --git a/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log b/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
index 7efc32dcf03..898df1856c8 100644
--- a/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
+++ b/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-eptex.log
@@ -17,5 +17,30 @@ FUGA F T F F F
l.22 \show\pdfstrcmp
% ==> \pdfstrcmp
+T T
+! Undefined control sequence.
+l.29 \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
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+! Undefined control sequence.
+l.31 \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
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+
+Overfull \hbox (0.4pt too wide) in paragraph at lines 31--31
+[]|
+
+\hbox(0.0+0.0)x0.0 []
+
)
No pages of output.
diff --git a/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex b/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex
index 0270f911511..150354bd608 100644
--- a/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex
+++ b/Build/source/texk/web2c/eptexdir/tests/pdfprimitive-test.tex
@@ -20,4 +20,14 @@
\ifpdfprimitive\fuga\message{T}\else\message{F}\fi % ==> F (macro)
\show\pdfstrcmp % ==> \pdfstrcmp
+
+% fix for overwriting entries (170924)
+\ifpdfprimitive\ \message{T}\else\message{F}\fi % ==> T
+\ifpdfprimitive\vrule\message{T}\else\message{F}\fi % ==> T
+
+% fix for back_input in vertical mode (170924)
+\setbox0=\vbox{\pdfprimitive\ \undefined}
+% ==> ``! Undefined control sequence.'' error
+\setbox0=\vbox{\pdfprimitive\vrule\undefined}
+% ==> ``! Undefined control sequence.'' error
\end
diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog
index c3b51dd825b..ffe54da6bc5 100644
--- a/Build/source/texk/web2c/euptexdir/ChangeLog
+++ b/Build/source/texk/web2c/euptexdir/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-06 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * tests/pdfprimitive-euptex.log: Adapt to eptex update.
+
2017-09-09 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* euptex.defines: Add a new function setstdinenc().
diff --git a/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log b/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log
index 85f3745bbaa..ed737b9f805 100644
--- a/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log
+++ b/Build/source/texk/web2c/euptexdir/tests/pdfprimitive-euptex.log
@@ -17,5 +17,30 @@ FUGA F T F F F
l.22 \show\pdfstrcmp
% ==> \pdfstrcmp
+T T
+! Undefined control sequence.
+l.29 \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
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+! Undefined control sequence.
+l.31 \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
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+
+
+Overfull \hbox (0.4pt too wide) in paragraph at lines 31--31
+[]|
+
+\hbox(0.0+0.0)x0.0 []
+
)
No pages of output.