changeset 3357:d9523a958b3c

(update_frame): Make preempt_count positive. Defend against negative baud_rate.
author Richard M. Stallman <rms@gnu.org>
date Mon, 31 May 1993 19:04:20 +0000
parents 09759a9653c5
children b1b079944842
files src/dispnew.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Mon May 31 19:04:07 1993 +0000
+++ b/src/dispnew.c	Mon May 31 19:04:20 1993 +0000
@@ -955,6 +955,9 @@
   register int downto, leftmost;
 #endif
 
+  if (preempt_count <= 0)
+    preempt_count = 1;
+
   if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */
 
   detect_input_pending ();
@@ -1025,7 +1028,8 @@
 			outq = PENDING_OUTPUT_COUNT (stdout);
 #endif
 		      outq *= 10;
-		      sleep (outq / baud_rate);
+		      if (baud_rate > 0)
+			sleep (outq / baud_rate);
 		    }
 		}
 	      if ((i - 1) % preempt_count == 0)