aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-11-04 17:59:00 -0800
committerPaul Eggert2012-11-04 17:59:00 -0800
commit8148369cfba2c982a87fb4eb72d024e26e193a03 (patch)
treee19d89cea76bbb91f5848e8382fc84c8feeb1ebb /src
parent06b63c9b0c6fd87e699ba6ba3be959bfd150ef8a (diff)
downloademacs-8148369cfba2c982a87fb4eb72d024e26e193a03.tar.gz
emacs-8148369cfba2c982a87fb4eb72d024e26e193a03.zip
Simplify by assuming __fpending.
Now that Emacs is using the gnulib fpending module, there's no need for Emacs to have a separate implementation. * configure.ac (stdio_ext.h, __fpending): Remove now-duplicate checks. (PENDING_OUTPUT_COUNT, DISPNEW_NEEDS_STDIO_EXT): Remove. * admin/CPP-DEFINES (PENDING_OUTPUT_COUNT): Remove. * src/dispnew.c: Include <fpending.h>, not <stdio_ext.h>. (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT. Do not assume that __fpending's result fits in int.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/dispnew.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 75b70ee4752..29efd9f181c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-11-05 Paul Eggert <eggert@cs.ucla.edu>
2
3 Simplify by assuming __fpending.
4 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
5 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
6 Do not assume that __fpending's result fits in int.
7
12012-11-04 Paul Eggert <eggert@cs.ucla.edu> 82012-11-04 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 Remove EMACS_OUTQSIZE+sleep hack. 10 Remove EMACS_OUTQSIZE+sleep hack.
diff --git a/src/dispnew.c b/src/dispnew.c
index 2ddd29139af..907259a3e94 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -53,9 +53,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
53#include "systime.h" 53#include "systime.h"
54#include <errno.h> 54#include <errno.h>
55 55
56#ifdef DISPNEW_NEEDS_STDIO_EXT 56#include <fpending.h>
57#include <stdio_ext.h>
58#endif
59 57
60#if defined (HAVE_TERM_H) && defined (GNU_LINUX) 58#if defined (HAVE_TERM_H) && defined (GNU_LINUX)
61#include <term.h> /* for tgetent */ 59#include <term.h> /* for tgetent */
@@ -4647,7 +4645,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
4647 FILE *display_output = FRAME_TTY (f)->output; 4645 FILE *display_output = FRAME_TTY (f)->output;
4648 if (display_output) 4646 if (display_output)
4649 { 4647 {
4650 int outq = PENDING_OUTPUT_COUNT (display_output); 4648 ptrdiff_t outq = __fpending (display_output);
4651 if (outq > 900 4649 if (outq > 900
4652 || (outq > 20 && ((i - 1) % preempt_count == 0))) 4650 || (outq > 20 && ((i - 1) % preempt_count == 0)))
4653 fflush (display_output); 4651 fflush (display_output);