Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uwvax!umn-d-ub!umn-cs!bungia!orbit!pnet51!vemis From: vemis@pnet51.orb.mn.org (Jeff Mo) Newsgroups: comp.unix.xenix Subject: Re: getc help needed, using rdchk() Message-ID: <1166@orbit.UUCP> Date: 28 Sep 89 14:25:04 GMT Sender: root@orbit.UUCP Organization: People-Net [pnet51], Minneapolis, MN. Lines: 15 tmm33@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@nosc.mil INET: vemis@pnet51.cts.com