Newsgroups: comp.lang.c
From: CBFalconer <cbfalco...@yahoo.com>
Date: Wed, 26 Jun 2002 01:36:42 GMT
Local: Tues, Jun 25 2002 9:36 pm
Subject: Re: A good gets()
Pat Foley wrote: There is no such thing. Idiots can always find a way :-) > CBFalconer <cbfalco...@yahoo.com> writes: ... snip ... > See, I dunno -- you're trying to devise a library function that's > [snip] > > /* FILE longline.c */ > > int main(void) > > ln = ggets(); > > On my machine this spat out 127. First there was much beeping and > Dude, tell me this is not how you've tested this?! It makes me wonder respond to you. The first level of testing is the design. After that - well you can see what I ran if you download the package - see my website in the sig, download section. I am planning to change the interface slightly - see Doug Gwynns int fggets(char* *line, FILE *f); with a normal 0 returned, otherwise EOF or positive error ... snip ... > If your argument is that there's almost always a newline at some have been handled. There is no such thing as a big enough gets buffer. Any machinery is finite and will fail at some point - the point is how will it fail and what will it take with it. ... snip ... > I've compiled it & tested it a little, but don't have time at the > (I'll also test on input bigger than available memory, so we can -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||