1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04: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.
This commit is contained in:
Kalle Olavi Niemitalo 2008-02-04 23:06:42 +02:00 committed by Kalle Olavi Niemitalo
parent cb1454918a
commit a3d093bd25
2 changed files with 16 additions and 7 deletions

2
NEWS
View File

@ -81,7 +81,7 @@ Miscellaneous:
* several accesskey fixes
* in Lua: don't write to the string returned by lua_tostring
* 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 972: preserve the background color and underlining in
spaces when justifying
* minor bug 284: render closing bracket for HTML element SUB in the

View File

@ -805,12 +805,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;