Mercurial > emacs
changeset 6963:67b16a9f7e5d
(read_avail_input): Write loop as a do-while.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 19 Apr 1994 05:52:58 +0000 |
parents | 8505df26e31d |
children | 5e9dfb3a11df |
files | src/keyboard.c |
diffstat | 1 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Tue Apr 19 04:40:29 1994 +0000 +++ b/src/keyboard.c Tue Apr 19 05:52:58 1994 +0000 @@ -3339,7 +3339,7 @@ /* Now read; for one reason or another, this will not block. NREAD is set to the number of chars read. */ - while (1) + do { #ifdef MSDOS cbuf[0] = dos_keyread(); @@ -3356,17 +3356,15 @@ kill (0, SIGHUP); #endif /* Retry the read if it was interrupted. */ - if (nread >= 0 - || ! (errno == EAGAIN + } + while (nread < 0 && (errno == EAGAIN #ifdef EFAULT - || errno == EFAULT + || errno == EFAULT #endif #ifdef EBADSLT - || errno == EBADSLT + || errno == EBADSLT #endif - )) - break; - } + )); #ifndef FIONREAD #if defined (USG) || defined (DGUX)