Is there any source/database for basic C library functions (like strcmp, memset, etc)?
I want to implement basic C library functions but I can’t verify if I’m doing it right or not.
I found several source code databases but they are far more complicated than they should be (e.g the implementation of strcpy is more than 30 lines, half of it isn’t related to copying the strings, I think).
Check out the OpenBSD C library. E.g., here’s its basic
strcpy:Documentation for the functions is included in the form of manpages.
(It also carries optimized versions of common routines, usually in assembler, so the C versions should really be regarded as reference implementations.)