Re: Question regarding fgets and new lines
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Mon, 27 Nov 2006 22:28:02 -0500
Eric Sosman wrote:
.... snip ...
If I'd felt it desirable to return more information about
the failure modes, I'd probably have abandoned the approach of
overloading both success and all those failure modes onto a
single returned value. Instead, I'd have returned the "payload"
in one place and a "status" in another -- almost all (Open)VMS
facilities worked this way, and reasonably well. This approach
would also have allowed me to return the partial line payload
that preceded an error, instead of just discarding what had
been read, and that would have been a Good Thing. (Principle:
low-level routines shouldn't make higher-level decisions.) But
it didn't "feel" worth while to clutter the interface to preserve
information I really couldn't see myself making use of.
Precisely what ggets does.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
.
- References:
- Question regarding fgets and new lines
- From: mellyshum123
- Re: Question regarding fgets and new lines
- From: Eric Sosman
- Re: Question regarding fgets and new lines
- From: CBFalconer
- Re: Question regarding fgets and new lines
- From: Roland Pibinger
- Re: Question regarding fgets and new lines
- From: CBFalconer
- Re: Question regarding fgets and new lines
- From: Eric Sosman
- Re: Question regarding fgets and new lines
- From: CBFalconer
- Re: Question regarding fgets and new lines
- From: Keith Thompson
- Re: Question regarding fgets and new lines
- From: Eric Sosman
- Question regarding fgets and new lines
- Prev by Date: Re: screen clearing in ANSI C
- Next by Date: Re: I am studying c myself .Which books I should read?
- Previous by thread: Re: Question regarding fgets and new lines
- Next by thread: Re: Question regarding fgets and new lines
- Index(es):