diff options
| author | Paul Eggert | 2012-11-04 14:33:00 -0800 |
|---|---|---|
| committer | Paul Eggert | 2012-11-04 14:33:00 -0800 |
| commit | 06b63c9b0c6fd87e699ba6ba3be959bfd150ef8a (patch) | |
| tree | c1182e76215f9f7f593461b7d1f47c8dd12909f3 | |
| parent | 76abf5e5a55899a0b3f8851fce7406858978e9a6 (diff) | |
| download | emacs-06b63c9b0c6fd87e699ba6ba3be959bfd150ef8a.tar.gz emacs-06b63c9b0c6fd87e699ba6ba3be959bfd150ef8a.zip | |
Remove EMACS_OUTQSIZE+sleep hack.
* dispnew.c (update_frame_1): Remove hack for terminals slower
than 2400 bps, which throttled Emacs by having it sleep. This
code hasn't worked since at least 2007, when the multi-tty stuff
was added, and anyway those old terminals are long dead.
* systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
without the dispnew.c change, as dispnew.c doesn't include systty.h.
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/dispnew.c | 16 | ||||
| -rw-r--r-- | src/systty.h | 11 |
3 files changed, 9 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3356c9874cc..75b70ee4752 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | 2012-11-04 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-11-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Remove EMACS_OUTQSIZE+sleep hack. | ||
| 4 | * dispnew.c (update_frame_1): Remove hack for terminals slower | ||
| 5 | than 2400 bps, which throttled Emacs by having it sleep. This | ||
| 6 | code hasn't worked since at least 2007, when the multi-tty stuff | ||
| 7 | was added, and anyway those old terminals are long dead. | ||
| 8 | * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even | ||
| 9 | without the dispnew.c change, as dispnew.c doesn't include systty.h. | ||
| 10 | |||
| 3 | Fix data-loss with --version (Bug#9574). | 11 | Fix data-loss with --version (Bug#9574). |
| 4 | * emacs.c (close_output_streams): Use strerror, not emacs_strerror, | 12 | * emacs.c (close_output_streams): Use strerror, not emacs_strerror, |
| 5 | as we can't assume that emacs_strerror is initialized, and strerror | 13 | as we can't assume that emacs_strerror is initialized, and strerror |
diff --git a/src/dispnew.c b/src/dispnew.c index e99387d2f6e..2ddd29139af 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -4650,21 +4650,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p) | |||
| 4650 | int outq = PENDING_OUTPUT_COUNT (display_output); | 4650 | int outq = PENDING_OUTPUT_COUNT (display_output); |
| 4651 | if (outq > 900 | 4651 | if (outq > 900 |
| 4652 | || (outq > 20 && ((i - 1) % preempt_count == 0))) | 4652 | || (outq > 20 && ((i - 1) % preempt_count == 0))) |
| 4653 | { | 4653 | fflush (display_output); |
| 4654 | fflush (display_output); | ||
| 4655 | if (preempt_count == 1) | ||
| 4656 | { | ||
| 4657 | #ifdef EMACS_OUTQSIZE | ||
| 4658 | if (EMACS_OUTQSIZE (0, &outq) < 0) | ||
| 4659 | /* Probably not a tty. Ignore the error and reset | ||
| 4660 | the outq count. */ | ||
| 4661 | outq = PENDING_OUTPUT_COUNT (FRAME_TTY (f->output)); | ||
| 4662 | #endif | ||
| 4663 | outq *= 10; | ||
| 4664 | if (baud_rate <= outq && baud_rate > 0) | ||
| 4665 | sleep (outq / baud_rate); | ||
| 4666 | } | ||
| 4667 | } | ||
| 4668 | } | 4654 | } |
| 4669 | } | 4655 | } |
| 4670 | 4656 | ||
diff --git a/src/systty.h b/src/systty.h index b7f36c6c259..0611511d901 100644 --- a/src/systty.h +++ b/src/systty.h | |||
| @@ -52,17 +52,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 52 | #endif /* not CDEL */ | 52 | #endif /* not CDEL */ |
| 53 | #endif /* not _POSIX_VDISABLE */ | 53 | #endif /* not _POSIX_VDISABLE */ |
| 54 | 54 | ||
| 55 | /* Get the number of characters queued for output. */ | ||
| 56 | |||
| 57 | /* EMACS_OUTQSIZE(FD, int *SIZE) stores the number of characters | ||
| 58 | queued for output to the terminal FD in *SIZE, if FD is a tty. | ||
| 59 | Returns -1 if there was an error (i.e. FD is not a tty), 0 | ||
| 60 | otherwise. */ | ||
| 61 | #ifdef TIOCOUTQ | ||
| 62 | #define EMACS_OUTQSIZE(fd, size) (ioctl ((fd), TIOCOUTQ, (size))) | ||
| 63 | #endif | ||
| 64 | |||
| 65 | |||
| 66 | /* Manipulate a terminal's current process group. */ | 55 | /* Manipulate a terminal's current process group. */ |
| 67 | 56 | ||
| 68 | /* EMACS_GETPGRP (arg) returns the process group of the process. */ | 57 | /* EMACS_GETPGRP (arg) returns the process group of the process. */ |