Hi,

Here's a small problem with luatex from trunk (notice the missing 'hello' in the
first line):

! \csname\endcsname.
l.2 \errmessage{hello \csname\endcsname}

More generally, print_cs() screws things up when printing null_cs while selector
is new_string, by indirectly calling make_string(). I think the attached patch
solves the problem.

Manuel.

PS: Btw, I wonder about two points in tokenlist_to_cstring()
- why did you comment out printing of \csname\endcsname?
- why is there two times Print_uchar(e) in the definition of Print_esc?

diff --git a/source/texk/web2c/luatexdir/tex/printing.c b/source/texk/web2c/luatexdir/tex/printing.c
index 641f52e..43d6b29 100644
--- a/source/texk/web2c/luatexdir/tex/printing.c
+++ b/source/texk/web2c/luatexdir/tex/printing.c
@@ -574,7 +574,7 @@ they may be unprintable.
 
 void print_cs(integer p)
 {                               /* prints a purported control sequence */
-    str_number t = zget_cs_text(p);
+    str_number t;
     if (p < hash_base) {        /* nullcs */
         if (p == null_cs) {
             tprint_esc("csname");
@@ -585,9 +585,10 @@ void print_cs(integer p)
     } else if ((p >= undefined_control_sequence) &&
                ((p <= eqtb_size) || p > eqtb_size + hash_extra)) {
         tprint_esc("IMPOSSIBLE.");
-    } else if (t >= str_ptr) {
+    } else if (text(p) >= str_ptr) {
         tprint_esc("NONEXISTENT.");
     } else {
+        t = zget_cs_text(p);
         if (is_active_cs(t)) {
             print(active_cs_value(t));
         } else {
_______________________________________________
dev-luatex mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to