Path: utzoo!attcan!uunet!ginosko!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.sys.apple Subject: Re: console FST EOF Message-ID: <10751@smoke.BRL.MIL> Date: 16 Aug 89 04:58:51 GMT References: <10727@smoke.BRL.MIL> <3539@internal.Apple.COM> <10736@smoke.BRL.MIL> <3571@internal.Apple.COM> <10740@smoke.BRL.MIL>Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 22 In article wombat@claris.com (Scott Lindsey) writes: >...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. Thanks for the information, Scott. There are only two ways this could be implemented: either the APW C run-time support (stdio internals) maps a received 0 byte from the console keyboard into a simulated end-of-file, or the console driver (FST) itself returns "0 bytes read" when it detects some special condition, in this case typing of Ctrl-@. The latter is a true end- of-file-from-terminal implementation and the former is a kludge, albeit an essential one if real support is lacking in the OS. I suspect the kludge approach is actually used, because the console FST documentation mentioned nothing about this, and you would think it would have been worthy of note. Assuming the C run-time implementation provides this service, I sure hope it's also done in ByteWorks's Orca/C, which is a more pleasant programming environment than APW C.