I wanted to have a look at the implementation of different C/C++ functions (like strcpy, stcmp, strstr). This will help me in knowing good coding practices in c/c++. Could y
In general, I find the BSD libc much easier to read than the GNU one. There are less "gcc-isms", the core is much clearer in intent, etc... For example, the BSD code for malloc is quite readable compared to glibc
You could also have a look at the OpenBSD source tree. Specifically, you want the string subdirectory of libc.
If you use Visual Studio Professional or Team, you should be able to find the source here:
C:\Program Files\Microsoft Visual Studio 9.0\VC\crt\src
"The Standarc C Library" is a specification. You want the sources for an implementation of the specification. Your C compiler may or not provide such sources - one that does is GCC.
Here's the general strXXX C functions in NetBSD : http://cvsweb.netbsd.org/bsdweb.cgi/src/common/lib/libc/string/
Here's the NetBSD strXXX implementation for i386 processors http://cvsweb.netbsd.org/bsdweb.cgi/src/common/lib/libc/arch/i386/string/
standard c library