diff options
| author | Jan Djärv | 2010-08-02 09:03:12 +0200 |
|---|---|---|
| committer | Jan Djärv | 2010-08-02 09:03:12 +0200 |
| commit | 9a747ba6507e64e26f87c5173d25428c99b70adb (patch) | |
| tree | 669a1a2e141c2593e69efe01cda7c36f668b3df5 /src | |
| parent | 7b0815ba49c91b047bc04744884a5c699183b8a8 (diff) | |
| download | emacs-9a747ba6507e64e26f87c5173d25428c99b70adb.tar.gz emacs-9a747ba6507e64e26f87c5173d25428c99b70adb.zip | |
Enable ICANON (Bug#6771). Any long line problem must be solved differently.
There is AFAIK no bug report or test case for the long line problem.
* sysdep.c (child_setup_tty): Enable ICANON in lflags and set VEOF
to Control-D (Bug#6771).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/sysdep.c | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0309fe1641f..60b881b3784 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-08-02 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * sysdep.c (child_setup_tty): Enable ICANON in lflags and set VEOF | ||
| 4 | to Control-D (Bug#6771). | ||
| 5 | |||
| 1 | 2010-08-02 Juanma Barranquero <lekktu@gmail.com> | 6 | 2010-08-02 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * editfns.c (Fregion_beginning, Fregion_end): Doc fixes (bug#6493). | 8 | * editfns.c (Fregion_beginning, Fregion_end): Doc fixes (bug#6493). |
diff --git a/src/sysdep.c b/src/sysdep.c index c5b0cb361db..43c71ef5ea0 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -511,7 +511,16 @@ child_setup_tty (int out) | |||
| 511 | process.c:send_process, and instead we disable ICANON by default, | 511 | process.c:send_process, and instead we disable ICANON by default, |
| 512 | so if a subsprocess sets up ICANON, it's his problem (or the Elisp | 512 | so if a subsprocess sets up ICANON, it's his problem (or the Elisp |
| 513 | package that talks to it) to deal with lines that are too long. */ | 513 | package that talks to it) to deal with lines that are too long. */ |
| 514 | s.main.c_lflag &= ~ICANON; /* Disable line editing and eof processing */ | 514 | /* There is no more "send eof to flush" going on (which is wrong and |
| 515 | unportable in itself), and disabling ICANON breaks a lot of stuff | ||
| 516 | and shows literal ^D in many cases. The correct way to handle too | ||
| 517 | much output is to buffer what could not be written and then write it | ||
| 518 | again when select returns ok for writing. This has it own set of | ||
| 519 | problems. Write is now asynchronous, is that a problem? | ||
| 520 | How much do we buffer, and what do we do when that limit is reached? */ | ||
| 521 | |||
| 522 | s.main.c_lflag |= ICANON; /* Enable line editing and eof processing */ | ||
| 523 | s.main.c_cc[VEOF] = 'D'&037; /* Control-D */ | ||
| 515 | s.main.c_cc[VMIN] = 1; | 524 | s.main.c_cc[VMIN] = 1; |
| 516 | s.main.c_cc[VTIME] = 0; | 525 | s.main.c_cc[VTIME] = 0; |
| 517 | 526 | ||