Am Do. 04.06.2026 um 13:14 schrieb luigi scarso:
On Thu, 4 Jun 2026 at 12:55, luigi scarso <[email protected]> wrote:
Yes, but the point is that the code says it explicitly:
source/texk/web2c/luatexdir/tex/filename.c:
309│ end_name();
310│ if (cur_ext == get_nullstr())
311│ cur_ext = maketexstring(e);
312│ if (str_length(cur_name) == 0)
313│ cur_name = saved_cur_name;
314│ return pack_file_name(cur_name, cur_area, cur_ext);
315│ }
(oops, missing the first lines..)
259│ char *prompt_file_name(const char *s, const char *e)
260├>{
261│ int k; /* index into |buffer| */
262│ str_number saved_cur_name; /* to catch empty terminal input */
It is there from 2009:
commit fa2ebe0c86a2a2c90ff854cd8e2a827ac165d665
Author: Taco Hoekwater <[email protected]>
Date: Thu Mar 19 15:45:47 2009 +0000
As a result of an attempt to fix bug #180 in the tracker, the
various filename functions have moved to a new C file
(tex/filename.c),
and read_font_info no longer takes an optional 'area' as argument.
--
luigi
I'm not a C programmer, but wouldn't it be easiest to make the last
if-statement (|312| if (str_length(cur_name) == 0)|) into a while-loop
around the entire input query? Should mimick the pdftex behavior, no?
BTW, is
https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blame/master/source/texk/web2c/luatexdir/tex/filename.c?ref_type=heads
the "official" source repo for luatex?
--
Patrick 'Lupino' Schulz
Software Engineer
GutsMuthsstr. 29, 04177 Leipzig, Germany
Phone: +49 177 6877789
[email protected],www.lupino.org