Lord Voldermort <> writes:
> Ben Bacarisse writes:
>> Lord Voldermort <> writes: <snip>
>>> Thx for the info Keiht, sorry about breech of protocol - didnt see a
>>> way to tell how many ppl are in this room so didnt know whether it was
>>> empty or ppl just missed my post.
>>
>> Have a read of this: http://en.wikipedia.org/wiki/Usenet to get an
>> overview.
>
> Didnt have time to read all that, but just flicking through I didnt see
> anything about listing other people currently in this room/browsing the
> forum/whatever you want to call it.
There is no such feature. Don't think of this as a "room". A closer
metaphor might be distributed broadcast e-mail that anyone can read and
write.
I read your article on my own computer; there is no central server
that would know that. Your article was downloaded by the news
server I use (which happens to be news.eternal-september.org), but
that's just one of a number of news servers that share information
with each other. News servers transmit articles back and forth;
they don't track users. There is no central authority.
Usenet is older than the World Wide Web; early versions of it
didn't even use the Internet. (Modern implementations use the
NNTP protocol over TCP/IP.)
Hang around for a while; you'll get the hang of it.
>>> So is there any translation program then to take code for the previous
>>> standard and upgrade it to work with C11 (replace gets by fgets etc)?
>>
>> In a way, yes. Your compiler can help if you if you ask for conformance
>> to a specific standard. That is likely to flag up problems, but it
>> won't fix them, of course. Some, like calls to gets, can't be fixed
>> automatically because the problem is that the function just does not
>> have enough information to do a safe job. Each call needs to be looked
>> at by someone who understands the code.
>>
>> If the code is very old (pre-C90, often called K&R C) you'd have to have
>> a good reason to update it because the move to prototypes alters the way
>> a function is called in subtle ways. If in doubt, ask about that
>> specifically.
>
> Are you sure about this? Industry best practise is -- if possible, be
> backwards compatable; if that can't be done, provide an automatic
> updater. This has always been the case eg with Visual Basic.
>
> It seems quite wreckless to update C while breaking existing programs and
> leaving people to re-code manually!
The gets() function in particular is inherently unsafe. It should not
have been in the language in the first place, and programmers should
never have used it. That's why it was removed from C11. The only
programs that removing gets() might break were broken already, and those
programs *cannot* be fixed other than by manual recoding.
In any case, removing it from the standard doesn't magically remove it
from implementations. Implementers are still free to provide it as an
extension, or simply because they haven't yet fully implemented C11
(most C compilers haven't fully implemented C99 yet).
Note that some implementations already issue warnings for calls to
gets() (this particular warning is from the GNU linker):
c.c

.text+0x52): warning: the `gets' function is dangerous and should not be used.
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"