getc help needed, using rdchk()
Jeff Mo
vemis at pnet51.orb.mn.org
Fri Sep 29 00:25:04 AEST 1989
tmm33 at leah.Albany.Edu (Terry McCoy) writes:
>Does anyone known what would be needed to create a function similar to getc()
>that would return control to the calling function if the buffer was empty.
Under SCO Xenix 2.2.x and 2.3.x, a call to rdchk(file_descriptor)
will return a 1 if the process will not block on a read(),
or if it's at EOF. To use:
if (rdchk(file_des) > 0)
read(file_des, buffer, nbytes);
Jeff Mo, Vision-Ease MIS department, Optifacts division. St. Cloud, MN, USA
UUCP: {amdahl!bungia, uunet!rosevax, chinet, killer}!orbit!pnet51!vemis
ARPA: crash!orbit!pnet51!vemis at nosc.mil
INET: vemis at pnet51.cts.com
More information about the Comp.unix.xenix
mailing list