🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #542

fix for XON-handling

#542
From: Juha Sarlin
Date: Mon, 04 Sep 1989 15:11
34 lines
1750 bytes
Bash 1.03 tries to rebind xon_char (normally C-Q) to rl_restart_output, but
passes the arguments in wrong order. My fix is at the end of this message.

I don't really like this automatic rebinding. Perhaps it would be better to
wait for all output to drain before disabling XON/XOFF. It might be possible
to do this with ioctl(fd, TCSBRK, 1) on SYSV, but I don't know how to do it
on BSD; TIOCSETP isn't useful because it discards input.

Also, there is a variable called xoff_state, which presumably was meant to
be true if the tty is in xoff state. However, it never gets set. Probably
for the very good reason that it doesn't seem possible to find out if
terminal is in xoff state or not.

*** /tmp/,RCSt1a04103	Mon Sep  4 14:49:27 1989
--- readline.c	Mon Sep  4 14:44:12 1989
***************
*** 1651,1657 ****
  
      /* If there is an XON character, bind it to restart the output. */
      if (xon_char != -1)
!       rl_bind_key (rl_restart_output, xon_char);
  
      /* If there is an EOF char, bind eof_char to it. */
      if (temp.t_eofc != -1)
--- 1651,1657 ----
  
      /* If there is an XON character, bind it to restart the output. */
      if (xon_char != -1)
!       rl_bind_key (xon_char, rl_restart_output);
  
      /* If there is an EOF char, bind eof_char to it. */
      if (temp.t_eofc != -1)
--
Juha Sarlin	juha@tds.kth.se
Technical Details
Message-ID: <8909041311.AA04520@ttds.tds.kth.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!tds.kth.se!juha

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!tds.kth.se!juha
From: juha@tds.kth.se (Juha Sarlin)
Newsgroups: gnu.bash.bug
Subject: fix for XON-handling
Message-ID: <8909041311.AA04520@ttds.tds.kth.se>
Date: 4 Sep 89 15:11:52 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 34