Move DONT_REOPEN_PTY from src/s to configure
[bpt/emacs.git] / src / dispnew.c
index 5c6ea01..c149bae 100644 (file)
@@ -65,28 +65,29 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Get number of chars of output now in the buffer of a stdio stream.
    This ought to be built in stdio, but it isn't.  Some s- files
    override this because their stdio internals differ.  */
-
 #ifdef __GNU_LIBRARY__
 
 /* The s- file might have overridden the definition with one that
    works for the system's C library.  But we are using the GNU C
    library, so this is the right definition for every system.  */
-
 #ifdef GNU_LIBRARY_PENDING_OUTPUT_COUNT
 #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT
 #else
 #undef PENDING_OUTPUT_COUNT
 #define        PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)
 #endif
-#else /* not __GNU_LIBRARY__ */
-#if !defined (PENDING_OUTPUT_COUNT) && HAVE_STDIO_EXT_H && HAVE___FPENDING
+
+/* not __GNU_LIBRARY__ and no PENDING_OUTPUT_COUNT defined  */
+#elif !defined (PENDING_OUTPUT_COUNT)
+
+#if HAVE_STDIO_EXT_H && HAVE___FPENDING
 #include <stdio_ext.h>
 #define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE)
-#endif
-#ifndef PENDING_OUTPUT_COUNT
+#else
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
 #endif
-#endif /* not __GNU_LIBRARY__ */
+
+#endif /* not __GNU_LIBRARY__ and no PENDING_OUTPUT_COUNT defined */
 
 #if defined (HAVE_TERM_H) && defined (GNU_LINUX)
 #include <term.h>              /* for tgetent */
@@ -3190,7 +3191,6 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
     force_p = 1;
   else if (!force_p && NUMBERP (Vredisplay_preemption_period))
     {
-      EMACS_TIME tm;
       double p = XFLOATINT (Vredisplay_preemption_period);
 
       if (detect_input_pending_ignore_squeezables ())
@@ -3199,9 +3199,9 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
          goto do_pause;
        }
 
-      EMACS_GET_TIME (tm);
       preemption_period = EMACS_TIME_FROM_DOUBLE (p);
-      EMACS_ADD_TIME (preemption_next_check, tm, preemption_period);
+      preemption_next_check = add_emacs_time (current_emacs_time (),
+                                             preemption_period);
     }
 
   if (FRAME_WINDOW_P (f))
@@ -3343,12 +3343,10 @@ update_single_window (struct window *w, int force_p)
        force_p = 1;
       else if (!force_p && NUMBERP (Vredisplay_preemption_period))
        {
-         EMACS_TIME tm;
          double p = XFLOATINT (Vredisplay_preemption_period);
-
-         EMACS_GET_TIME (tm);
          preemption_period = EMACS_TIME_FROM_DOUBLE (p);
-         EMACS_ADD_TIME (preemption_next_check, tm, preemption_period);
+         preemption_next_check = add_emacs_time (current_emacs_time (),
+                                                 preemption_period);
        }
 
       /* Update W.  */
@@ -3595,11 +3593,11 @@ update_window (struct window *w, int force_p)
 #if PERIODIC_PREEMPTION_CHECKING
            if (!force_p)
              {
-               EMACS_TIME tm;
-               EMACS_GET_TIME (tm);
+               EMACS_TIME tm = current_emacs_time ();
                if (EMACS_TIME_LT (preemption_next_check, tm))
                  {
-                   EMACS_ADD_TIME (preemption_next_check, tm, preemption_period);
+                   preemption_next_check = add_emacs_time (tm,
+                                                           preemption_period);
                    if (detect_input_pending_ignore_squeezables ())
                      break;
                  }
@@ -4700,11 +4698,10 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
 #if PERIODIC_PREEMPTION_CHECKING
          if (!force_p)
            {
-             EMACS_TIME tm;
-             EMACS_GET_TIME (tm);
+             EMACS_TIME tm = current_emacs_time ();
              if (EMACS_TIME_LT (preemption_next_check, tm))
                {
-                 EMACS_ADD_TIME (preemption_next_check, tm, preemption_period);
+                 preemption_next_check = add_emacs_time (tm, preemption_period);
                  if (detect_input_pending_ignore_squeezables ())
                    break;
                }