开发者

Where to find my system's implementation of standard C library functions?

for example, the strrev() function. i know that it's declared in string.h, and i wanna to figure out how it is implemented. so where could i the sourc开发者_如何学运维e code?

OS: Windows XP SP3

IDE: Pelles C 6.50 RC3


If you just want to see the source to an implementation of the standard C library (albeit one that is in wide use), the source to glibc is available. You can clone the git repository:

git clone git://sourceware.org/git/glibc.git

You can also examine the source in a browser. Here's the string library, for instance.

glibc does not include strrev(). However, if you Google for

strrev c

you'll get hits to various implementations. For example: http://www.cas.mcmaster.ca/~kahl/SE2S03/2006/C/strrev.c and ftp://ftp.ecs.vuw.ac.nz/pub/libs/libstrings/strrev.c.


It depends where your particular compiler puts it. Many compilers don't provide the library source code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜