<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 9, 2014 at 1:36 AM, Akira Kakuto <span dir="ltr"><<a href="mailto:kakuto@fuk.kindai.ac.jp" target="_blank">kakuto@fuk.kindai.ac.jp</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

With the TL2014 pretest version of LuaTeX,<br>
<br>
    \csname\csname\endcsname<br>
<br>
leads to the error<br>
<br>
    ! Missing \endcsname inserted.<br>
    <to be read again><br>
    \^^@csnam\^^@endcsnam<br>
    l.1 \csname\csname\endcsname<br>
<br>
which looks like some form of 'out by one' issue.<br>
</blockquote>
<br>
I think that is related to the following, since<br>
it is already fixed in the LuaTeX trunk.<br>
<br>
%<br>
% s.tex<br>
%<br>
\def\use#1{#1}<br>
\use\fXabc<br>
\bye<br>
<br>
(./s.tex<br>
! Undefined control sequence.<br>
<argument> \fXabc       \use #1X-#1<br>
          l.2 \use\fXabc<br>
<br>
Best,<br>
Akira<br>
<br>
<br>
</blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">The problem is here in tex/printing.w</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div>luatex calls tprint_esc("csname")</div>
<div><br></div><div><div>   573 void tprint_esc(const char *s)</div><div>    574 {                               /* prints escape character, then |s| */</div><div>    575     int c;                      /* the escape character code */</div>
<div>    576     /* Set variable |c| to the current escape character */</div><div>    577     c = int_par(escape_char_code);</div><div>    578     if (c >= 0 && c < STRING_OFFSET)</div><div>    579         print(c);</div>
<div>    580     tprint(s);</div><div>    581 }</div></div><div><br></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"><div>At line 579 the '\' is stored into  the global trick_buf[0], </div>
<div>and tally is incremented, so that trick_buf[tally] is the location of the next char to be saved</div><div>Then luatex calls tprint("csname") </div></div><div class="gmail_extra"><div class="gmail_extra"></div>
</div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">    323 @ |char *| versions of the same procedures. |tprint| is</div><div class="gmail_extra">
    324 different because it uses buffering, which works well because</div><div class="gmail_extra">    325 most of the output actually comes through |tprint|.</div><div class="gmail_extra">    326 </div><div class="gmail_extra">
    327 @c</div><div class="gmail_extra">    328 void tprint(const char *sss)</div><div class="gmail_extra">    329 {</div><div class="gmail_extra">    330     char *buffer = NULL;</div><div class="gmail_extra">    331     int i = 0; /* buffer index */</div>
<div class="gmail_extra">    332     int newlinechar = int_par(new_line_char_code);</div><div class="gmail_extra">    333     int dolog = 0;</div><div class="gmail_extra">    334     int doterm = 0;</div><div class="gmail_extra">
    335     switch (selector) {</div><div class="gmail_extra">    336     case new_string:</div><div class="gmail_extra">    337         append_string((const unsigned char *)sss, (unsigned) strlen(sss));</div><div class="gmail_extra">
    338         return;</div><div class="gmail_extra">    339         break;</div><div class="gmail_extra">    340     case pseudo:</div><div class="gmail_extra">    341         while (*sss) {</div><div class="gmail_extra">
    342            if (tally++ < trick_count) {</div><div class="gmail_extra">    343                trick_buf[tally % error_line] = (packed_ASCII_code) *sss++;</div><div class="gmail_extra">    344            } else {</div>
<div class="gmail_extra">    345                return;</div><div class="gmail_extra">    346            }</div><div class="gmail_extra">    347         }</div><div><br></div><div>At line 342 the if statement increments tally again, so the first time  the 'c' of "csname" </div>
<div>is saved in (assuming error_line=79 as usual)<br>trick_buf[tally % error_line] = trick_buf[2] .</div><div>The  content of trick_buf[1] depends on the format.<br></div><div>The while loop at line 341 stops when it sees '\0' of csname , so this is the reason why we don't see the final character.</div>
<div><br><div><div>-- <br></div></div></div></div>luigi<br>
</div></div>