comparison src/dispnew.c @ 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 55066d2375b6
children ad455da9b789
comparison
equal deleted inserted replaced
3356:09759a9653c5 3357:d9523a958b3c
953 extern input_pending; 953 extern input_pending;
954 #ifdef HAVE_X_WINDOWS 954 #ifdef HAVE_X_WINDOWS
955 register int downto, leftmost; 955 register int downto, leftmost;
956 #endif 956 #endif
957 957
958 if (preempt_count <= 0)
959 preempt_count = 1;
960
958 if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */ 961 if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */
959 962
960 detect_input_pending (); 963 detect_input_pending ();
961 if (input_pending && !force) 964 if (input_pending && !force)
962 { 965 {
1023 /* Probably not a tty. Ignore the error and reset 1026 /* Probably not a tty. Ignore the error and reset
1024 * the outq count. */ 1027 * the outq count. */
1025 outq = PENDING_OUTPUT_COUNT (stdout); 1028 outq = PENDING_OUTPUT_COUNT (stdout);
1026 #endif 1029 #endif
1027 outq *= 10; 1030 outq *= 10;
1028 sleep (outq / baud_rate); 1031 if (baud_rate > 0)
1032 sleep (outq / baud_rate);
1029 } 1033 }
1030 } 1034 }
1031 if ((i - 1) % preempt_count == 0) 1035 if ((i - 1) % preempt_count == 0)
1032 detect_input_pending (); 1036 detect_input_pending ();
1033 } 1037 }