Changed cncheckc() interface so that it is 8-bit clean - return -1

instead of 0 if there is no input.

pcvt_drv.c:
Partially fixed pccncheckc().  It returned a boolean value instead of
the character that it fetches from the input fifo (if any).  I think
it still discards characters after the first for multi-char input.
This commit is contained in:
Bruce Evans 1996-09-14 04:30:32 +00:00
parent daed6ffd24
commit 4fab2f9bc7

View File

@ -1204,7 +1204,7 @@ pccncheckc(Dev_t dev)
cp = sgetc(1);
kbd_polling = 0;
splx(x);
return (cp != 0); /* did someone press the "Any" key? */
return (cp == NULL ? -1 : *cp);
}
#endif /* PCVT_FREEBSD >= 200 */