From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3EB9E853.7040405@null.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit References: <3EB87BDC.30305@null.net>, Subject: Re: [9fans] same functions everywhere Date: Thu, 8 May 2003 09:08:02 +0000 Topicbox-Message-UUID: a366339e-eacb-11e9-9e20-41e7f4b1d025 rog@vitanuova.com wrote: > (BTW, getc doesn't use in-band signalling, and even if it did, > tuples are a much cleaner solution than exceptions, IMHO). In C, it certainly does. EOF is returned instead of data when end-of-file is detected. An alternative to using an exception would be to separate the return into two kinds of information instad of just one; since C doesn't have tuples, and returning a struct makes for awkward usage, we could use something like io_status new_getc(unsigned char *where);