🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #77

Re: v07i001: ularn - ultra-larn, an enhancement of the larn adventure game, Part01/08

#77
From: Guy Harris
Date: Wed, 12 Jul 1989 17:55
26 lines
1474 bytes
>I could not compile this on my (SYSV) 3b1, because gcc could not find
>TCIFLUSH.  Neither could I.  What am I missing here.
>
>BTW, what's tcflush()?  It's the function being called with the above
>symbol, but I don't know anything else.

Wow.  Does this mean "ularn" is one of the first programs ever written
to the POSIX interface?  Unfortunately, since I don't know how many
systems have implemented that interface yet but think the answer is
"very few, if any", the author may be jumping the gun a bit....

Instead of having "ioctl()", POSIX introduced functions for various
"ioctl" functions; "tcflush()" is the function for the TCFLSH "ioctl". 
They also introduced defined constants instead of the small integers
used by those "ioctl"s; TCIFLUSH is "flush the input queue", i.e. 0.

So

	tcflush(fd, TCIFLUSH)

is equivalent to

	ioctl(fd, TCFLSH, 0)

and returns the same value (0 on success, -1 on error after setting
"errno"). 
Technical Details
Message-ID: <2228@auspex.auspex.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!auspex!guy
References: <4194@tekred.CNA.TEK.COM> <815@kosman.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!auspex!guy
From: guy@auspex.auspex.com (Guy Harris)
Newsgroups: comp.sources.bugs
Subject: Re: v07i001:  ularn - ultra-larn, an enhancement of the larn adventure game, Part01/08
Message-ID: <2228@auspex.auspex.com>
Date: 12 Jul 89 17:55:30 GMT
References: <4194@tekred.CNA.TEK.COM> <815@kosman.UUCP>
Reply-To: guy@auspex.auspex.com (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 26