Re: [Dev-luatex] Assignments in runtoks
On Mon, Sep 02, 2019 at 07:13:36PM +0200, luigi scarso wrote:
On Mon, Sep 2, 2019 at 10:59 AM Hans Hagen
wrote: (I will send the patches to Luigi later today.)
------------------------------------------------------------------------ r7188 | luigi.scarso@gmail.com | 2019-09-02 19:12:22 +0200 (Mon, 02 Sep 2019) | 1 line
some cleanup + extra features runtoks (HH) ------------------------------------------------------------------------
This introduced a bug when `tex.runtoks` is called with a function: In ltexlib.c, runtoks function branch, token_info(r) is set twice and token_info(r) is never set. Also the first assignment to `token_info(t)` sets it to `token_val(end_local_code,0);`, but `end_local_code` is not a command code, so this becomes a space token. Also the supplied function is never called because the local call token is no longer inserted. -- Marcel
On 9/4/2019 2:34 PM, Marcel Fabian Krüger wrote:
On Mon, Sep 02, 2019 at 07:13:36PM +0200, luigi scarso wrote:
On Mon, Sep 2, 2019 at 10:59 AM Hans Hagen
wrote: (I will send the patches to Luigi later today.)
------------------------------------------------------------------------ r7188 | luigi.scarso@gmail.com | 2019-09-02 19:12:22 +0200 (Mon, 02 Sep 2019) | 1 line
some cleanup + extra features runtoks (HH) ------------------------------------------------------------------------
This introduced a bug when `tex.runtoks` is called with a function: In ltexlib.c, runtoks function branch, token_info(r) is set twice and token_info(r) is never set. Also the first assignment to `token_info(t)` sets it to `token_val(end_local_code,0);`, but `end_local_code` is not a command code, so this becomes a space token. Also the supplied function is never called because the local call token is no longer inserted. ah, a mix up with luametatex (from which i copied some code) .. thanks for noticing
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
This introduced a bug when `tex.runtoks` is called with a function: In ltexlib.c, runtoks function branch, token_info(r) is set twice and token_info(r) is never set. Also the first assignment to `token_info(t)` sets it to `token_val(end_local_code,0);`, but `end_local_code` is not a command code, so this becomes a space token. Also the supplied function is never called because the local call token is no longer inserted. ah, a mix up with luametatex (from which i copied some code) .. thanks for noticing
The new version works great, thank you. Marcel
participants (2)
-
Hans Hagen
-
Marcel Fabian Krüger