1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00

Bug 54: Don't disable XON/XOFF flow control.

Do not clear the IXON flag in termios.c_iflag.
Bug 54 did not actually ask for this flag to be kept,
but the cable I am using doesn't seem to have the handshake
lines connected right, so XON/XOFF is a must at 38400 bps,
at least until ELinks learns to send padding based on terminfo.

Any user who has bound actions to Ctrl+S or Ctrl+Q and finds that
they no longer work should just "stty -ixon" before running ELinks.
We don't have any default bindings for those keys, fortunately.

(cherry picked from commit a3d093bd25
 but moved the NEWS entry into the 0.11.4rc0 section)
This commit is contained in:
Kalle Olavi Niemitalo 2008-02-04 23:06:42 +02:00 committed by Kalle Olavi Niemitalo
parent 9c39f43d1b
commit bd67e69bcd
2 changed files with 16 additions and 7 deletions

2
NEWS
View File

@ -30,7 +30,7 @@ To be released as 0.11.4.
* fix active and passive FTP over IPv6
* bug 978: Python's webbrowser.open_new_tab(URL) works since now
* minor bug 54, Debian bug 338402: don't force the terminal to 8 bits
with no parity
with no parity, and don't disable XON/OFF flow control either
* minor bug 951 in user SMJS: garbage-collect SMJS objects on 'File ->
Flush all caches' to work around their holding cache entries busy
* minor bug 396: never show empty filename in the what-to-do dialog

View File

@ -745,12 +745,21 @@ unblock_stdin(void)
void
elinks_cfmakeraw(struct termios *t)
{
/* Bug 54: Do not alter the character-size and parity bits in
* t->c_cflag. If they have unusual values, the terminal
* probably requires those and won't work if ELinks changes
* the flags. The cfmakeraw function would set 8-bit characters
* and no parity, so don't use that. */
t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
/* This elinks_cfmakeraw() intentionally leaves the following
* settings unchanged, even though the standard cfmakeraw()
* would change some of them:
*
* - c_cflag & CSIZE: number of bits per character.
* Bug 54 asked ELinks not to change this.
* - c_cflag & (PARENB | PARODD): parity bit in characters.
* Bug 54 asked ELinks not to change this.
* - c_iflag & (IXON | IXOFF | IXANY): XON/XOFF flow control.
*
* The reasoning is, if the user has set up unusual values for
* those settings before starting ELinks, then the terminal
* probably expects those values and ELinks should not mess
* with them. */
t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL);
t->c_oflag &= ~OPOST;
t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
t->c_cc[VMIN] = 1;