Re: Question regarding fgets and new lines
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Fri, 24 Nov 2006 08:42:32 -0500
Roland Pibinger wrote:
On Fri, 24 Nov 2006 02:22:25 -0500, CBFalconer wrote:
Or simply download and use the public domain ggets, at:
<http://cbfalconer.home.att.net/download/>
"The storage has been allocated within fggets ... Freeing of
assigned storage is the callers responsibility".
This programming style is not used by the Standard C library (and
other well-known libraries). I'd be reluctant to use it in my
programs.
Why not? If you malloc something, you know you need to free it
when no longer needed. If you use ggets, you know you need to free
the line when no longer needed. This is not a massive memory
leap. Meanwhile you don't have to worry about buffer sizes, etc.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
.
- Follow-Ups:
- Re: Question regarding fgets and new lines
- From: Eric Sosman
- Re: Question regarding fgets and new lines
- From: Roland Pibinger
- Re: Question regarding fgets and new lines
- From: Keith Thompson
- Re: Question regarding fgets and new lines
- 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
- Question regarding fgets and new lines
- Prev by Date: Re: parsing fortran
- Next by Date: Re: TWISTER 2: Read on....
- Previous by thread: Re: Question regarding fgets and new lines
- Next by thread: Re: Question regarding fgets and new lines
- Index(es):
Relevant Pages
|
|