F
Flash Gordon
James Dow Allen wrote, On 14/08/08 08:22:
You say that but you are failing to spot some of the humour.
Some people are concerned about completely clean builds (no warnings at
all) and it was not obvious to me (at least) whether you were or not.
That would be me (unless someone else posted a similar comment) and I
even put a smiley on it just in case you did not realise it was intended
as a humorous comment.
The behaviour is not the same as gets if the buffer is larger than
1000000 bytes
Must resist bait... must resist bait...
<snip>
I've time to read very few Usenet groups these days.
Are many as totally devoid of humor as c.l.c?
You say that but you are failing to spot some of the humour.
Did anyone seriously think I was worried about the warning
message? (I *do* use a simple 'grep -v' to remove
one irrelevant gcc warning, but haven't bothered for
the friendly "dangerous" message.)
Some people are concerned about completely clean builds (no warnings at
all) and it was not obvious to me (at least) whether you were or not.
Another poster implied that a reason gets() is "dangerous"
is that it will disappear when the pedants take over
libc!
That would be me (unless someone else posted a similar comment) and I
even put a smiley on it just in case you did not realise it was intended
as a humorous comment.
Does anyone think any of us would have trouble
writing our own gets() when it goes missing from libc?
No.
(This would also be a trivial way to get rid of the
"dangerous" message.) In fact, at the risk of encouraging
the mob to Repeat_The_Obvious One_More_Time I'll put a
gets implementation in the public domain right now:
/* Not tested*/
char *gets(char *s)
{
s = fgets(s, 1000000, stdin);
The behaviour is not the same as gets if the buffer is larger than
1000000 bytes
Hmmm. Surprised that the pedants don't add a string length
count to index() to deal with unterminated strings.
![]()
![]()
![]()
![]()
Must resist bait... must resist bait...
<snip>