Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!claris!wombat
From: wombat@claris.com (Scott Lindsey)
Newsgroups: comp.sys.apple
Subject: Re: console FST EOF
Message-ID: 
Date: 15 Aug 89 21:55:53 GMT
References: <10727@smoke.BRL.MIL> <3539@internal.Apple.COM>
	<10736@smoke.BRL.MIL> <3571@internal.Apple.COM> <10740@smoke.BRL.MIL>
Sender: wombat@claris.com
Organization: Claris Corporation, Santa Clara, CA
Lines: 29
In-reply-to: gwyn@smoke.BRL.MIL's message of 15 Aug 89 07:26:33 GMT

In article <10740@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes:


   A more reliable source claims that NUL will do the trick.  I haven't had
   a chance to try it yet, although I could have sworn it was one of the things
   I had already tried.

Actually, I'm not certain about this: the question may simply be ill-phrased.
I'm not sure what if anything the console driver, going through the CHAR.FST,
uses for EOF.  However, using APW C 1.0 with APW 1.0, the following code uses
NUL as end of file (this is not the same thing as the value EOF returned by
getchar(), which is pre-defined as -1).

#include 
main()
{
	while (getchar() != EOF)
		;
}

...and I finally found the reference.  On page 3-7 of the APW C 1.0 manual
from APDA, under the section 'Running your program' an example shows 
"Control-@" as terminating stdin.  As far as I know, this is the only place
it's documented.

Scott Lindsey     |"Cold and misty morning. I heard a warning borne in the air
Claris Corp.      |    About an age of power when no one had an hour to spare"
ames!claris!wombat| DISCLAIMER: These are not the opinions of Claris, Apple,
wombat@claris.com |    StyleWare, the author, or anyone else living or dead.