On Wed, 16 Aug 2006 01:26:28 +0000, pete wrote:
dc*****@connx.com wrote:
>>
"da404LewZer" <da*********@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegr oups.com...
i'm starting a programming wiki so we have a one stop place to find
source code for all languages.
if anyone would like to help check out
http://www.coderwiki.com/wiki
Someone beat you to it:
http://sourceforge.net/
What was your C question?
Oh come on, don't you even want to correct his mistakes?
Actually, these are not the OP's mistakes, but mine :-(
For C:memcmp
This next line is wrong:
Synopsis: int memcmp(const char *s1, const char *s2, size_t n)
It should be:
Synopsis: int memcmp(const void *s1, const void *s2, size_t n)
Thanks for telling about this error. I have fixed it now.
This next line is wrong:
Successful return: 0 if equal, negative if s1<s2, positive if s1>s2
This was a non-successfull attempt at a compact description. I have
changed it to a more verbose text, but am not yet happy with it.
It should be:
0 if *(unsigned char *)s1 == *(unsigned char*)s2,
negative if *(unsigned char *)s1 < *(unsigned char*)s2,
positive if *(unsigned char *)s1 *(unsigned char*)s2.
This is also wrong. memcmp() compares a range of characters, not only the
first (unless n==1).
There are probably lots of other similar errors in the C pages. Most of
them where made by copying from another page and changing the
parts where there are differences. I have probably overlooked some
important differences. I haven't had the time to check all of them yet.
This is a wiki, where anyone is allowed to edit, and all C articles needs
error checking, expansion and better examples. There is also an incomplete
list of missing pages on C:Todo.
So, if someone at comp.lang.c is tired of telling yet another newbie that
his post is off-topic, he/she can come to CoderWiki and write some
documentation.
--
Arild Hystad