🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Juha Sarlin Mon, 04 Sep 1989 13:52
fix to stop rl_insert from loosing a character
#543
Author: Juha Sarlin
Date: Mon, 04 Sep 1989 13:52
30 lines
1157 bytes
rl_insert() in bash 1.03 has some code to insert many characters at once.
In the rare cases when this code is run it looses the original inargument.
Here is my fix:

*** /tmp/,RCSt1a04042	Mon Sep  4 13:40:57 1989
--- readline.c	Mon Sep  4 13:38:49 1989
***************
*** 2135,2143 ****
  
  	if (chars_avail)
  	  {
! 	    int slen, key = 0, i = 0;
  	    char *string = (char *)xmalloc (slen = 20);
  
  	    while (chars_avail--)
  	      {
  		key = rl_getc (in_stream);
--- 2135,2144 ----
  
  	if (chars_avail)
  	  {
! 	    int slen, key = 0, i = 1;
  	    char *string = (char *)xmalloc (slen = 20);
  
+ 	    string[0] = c;
  	    while (chars_avail--)
  	      {
  		key = rl_getc (in_stream);
--
Juha Sarlin	juha@tds.kth.se
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads