]> code.delx.au - gnu-emacs/blobdiff - src/dispnew.c
(Fgarbage_collect): Update call to truncate_undo_list.
[gnu-emacs] / src / dispnew.c
index 0d2ce118e0f767b7dd80824bdf75183418263a16..78ca0e3910997ac97f2ec34d70c3a517e46b638d 100644 (file)
@@ -579,7 +579,7 @@ margin_glyphs_to_reserve (w, total_glyphs, margin)
       int width = XFASTINT (w->total_cols);
       double d = max (0, XFLOATINT (margin));
       d = min (width / 2 - 1, d);
-      n = (int) ((double) total_glyphs / width * d) * w->ncols_scale_factor;
+      n = (int) ((double) total_glyphs / width * d);
     }
   else
     n = 0;
@@ -5994,6 +5994,9 @@ window_change_signal (signalnum) /* If we don't have an argument, */
 #endif
   int old_errno = errno;
 
+  signal (SIGWINCH, window_change_signal);
+  SIGNAL_THREAD_CHECK (signalnum);
+
   get_frame_size (&width, &height);
 
   /* The frame size change obviously applies to a termcap-controlled
@@ -6016,7 +6019,6 @@ window_change_signal (signalnum) /* If we don't have an argument, */
       }
   }
 
-  signal (SIGWINCH, window_change_signal);
   errno = old_errno;
 }
 #endif /* SIGWINCH */
@@ -6331,47 +6333,13 @@ Emacs was built without floating point support.
   if (sec < 0 || (sec == 0 && usec == 0))
     return Qnil;
 
-  wait_reading_process_input (sec, usec, 0, 0, Qnil, NULL, 0);
-
-  /* We should always have wait_reading_process_input; we have a dummy
-     implementation for systems which don't support subprocesses.  */
-#if 0
-  /* No wait_reading_process_input */
-  immediate_quit = 1;
-  QUIT;
-
-#ifdef VMS
-  sys_sleep (sec);
-#else /* not VMS */
-/* The reason this is done this way
-    (rather than defined (H_S) && defined (H_T))
-   is because the VMS preprocessor doesn't grok `defined'.  */
-#ifdef HAVE_SELECT
-  EMACS_GET_TIME (end_time);
-  EMACS_SET_SECS_USECS (timeout, sec, usec);
-  EMACS_ADD_TIME (end_time, end_time, timeout);
-
-  while (1)
-    {
-      EMACS_GET_TIME (timeout);
-      EMACS_SUB_TIME (timeout, end_time, timeout);
-      if (EMACS_TIME_NEG_P (timeout)
-         || !select (1, 0, 0, 0, &timeout))
-       break;
-    }
-#else /* not HAVE_SELECT */
-  sleep (sec);
-#endif /* HAVE_SELECT */
-#endif /* not VMS */
-
-  immediate_quit = 0;
-#endif /* no subprocesses */
+  wait_reading_process_output (sec, usec, 0, 0, Qnil, NULL, 0);
 
   return Qnil;
 }
 
 
-/* This is just like wait_reading_process_input, except that
+/* This is just like wait_reading_process_output, except that
    it does the redisplay.
 
    It's also much like Fsit_for, except that it can be used for
@@ -6396,8 +6364,8 @@ sit_for (sec, usec, reading, display, initial_display)
   gobble_input (0);
 #endif
 
-  wait_reading_process_input (sec, usec, reading ? -1 : 1, display,
-                             Qnil, NULL, 0);
+  wait_reading_process_output (sec, usec, reading ? -1 : 1, display,
+                              Qnil, NULL, 0);
 
   return detect_input_pending () ? Qnil : Qt;
 }