[NTG-pdftex] [ pdftex-Patches-368 ] make \pdfstrcmp expandable (experimental patch)

noreply at sarovar.org noreply at sarovar.org
Mon Jun 20 16:33:05 CEST 2005


Patches item #368, was opened at 2005-06-18 00:29
You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=495&aid=368&group_id=106

Category: Primitives
Group: v1.30.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Hartmut Henkel (hhenkel)
Assigned to: Nobody (None)
Summary: make \pdfstrcmp expandable (experimental patch)

Initial Comment:
just moved \pdfstrcmp over to procedure conv_toks, so
that the result -1/0/1 is inserted into the input token
list. Does this make sense?

----------------------------------------------------------------------

>Comment By: Taco Hoekwater (taco)
Date: 2005-06-20 16:33

Message:
Logged In: YES 
user_id=1608

It makes sense, but it is not 100% safe as-is. In an
expanding context, lots of stuff can go one at the same
time. Esp., scan_toks touches some global variables, so
compare_strings should save the globals def_ref,
scanner_status and warning _index to prevent stack
corruption later on.

For instance, this crashes:

% process by initex
\input plain
\edef\alpha{\pdfstrcmp{alpha}{alph}}
\message{\meaning\alpha}
\end
%

I am attaching a change file that modifies compare_strings()
, cf. scan_general_text() in eTeX.


----------------------------------------------------------------------

You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=495&aid=368&group_id=106


More information about the ntg-pdftex mailing list