On 7/8/25 3:17 PM, Torleif Skår wrote:
Hi,When upgrading from 8.2.013 -> 8.3.0 on Arch Linux x86_64 I noticed that one of the software that I use, NGSpice[1], that uses readline stopped working as expected.
I dropped a line from a fix in January, 2023. It's disappointing that
something like this made it through so many rounds of testing. I've
attached a patch.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
*** ../readline-8.3/input.c Fri May 2 09:29:05 2025
--- input.c Tue Jul 8 15:37:13 2025
***************
*** 262,266 ****
tty = fileno (rl_instream);
! /* Move this up here to give it first shot, but it can't set chars_avail */
/* XXX - need rl_chars_available_hook? */
if (rl_input_available_hook)
--- 262,267 ----
tty = fileno (rl_instream);
! /* Move this up here to give it first shot, but it can't set chars_avail,
! so we assume a single character is available. */
/* XXX - need rl_chars_available_hook? */
if (rl_input_available_hook)
***************
*** 269,272 ****
--- 270,275 ----
if (result == 0)
result = -1;
+ else
+ chars_avail = 1;
}
***************
*** 286,289 ****
--- 289,293 ----
if (result <= 0)
return 0; /* Nothing to read. */
+ result = -1; /* there is something, so check how many chars below */
}
#endif
OpenPGP_signature.asc
Description: OpenPGP digital signature
