Refer: http://www.lainoox.com/tag/glibc-source-code/

Through my travels on the world wide web, aka intertubes I have come across a few websites that are excellent for referencing and viewing source code on the web. There have also been a few great sites that I frequent regularly if I cannot seem to find the manual page on my system. Here is a list of some websites that I have found useful when looking for source code referencing or some great examples of how to structure my code.

 

View Linux Kernel Source at lxr.linux.no

A Norwegian site hosts the last 100 or so kernel versions in their entirety in ‘readable’ form online. You select the kernel version in which you want to search for a function definition or structure and it spits out the code for you. Another great feature of this site is that essentially every function is a link to the structure definition, function, macro etcetera. You may also browse through the site traversing the directories.

Link: http://lxr.linux.no/linux/

Use Google Code Search

The google code search has been handy many a time. It allows you to specify specific fields if you know what you are looking for, including Package, Language, File, Class, Function, and the type of license it is developed under. There is also just a blank search option if you last looked at the code with beer goggles on. The results provide the code in a text format so it is easily viewable within your browser and downloadable as well.

Link: http://www.google.com/codesearch

Refer To GNU C Library

While this is not simply a code reference, it is the bible on GNU C and everything related to it. This page includes viewing glibc in its entirety as a webpage, PDF, HTML per page. The format is somewhat irrelevant, what is important is the wealth of knowledge that this site has to offer. It includes function definitions, explanations and a large set of examples that is rivaled by any other site I have come across.

Link: http://www.gnu.org/software/libc/manual/

Download Glibc And Look

If you are doing anything C related then sometimes you just have to look at the code in vi. The glibc library has many samples of excellent code in which to base your code off of. Some of this is developed from the original C developers and exists from the early Unix days. Who better to mimic than those guys!

Link: ftp://ftp.gnu.org/gnu/glibc/

PHP Functions And Examples At PHP.net

While I mostly write about C code and examples, I have written a fair amount of PHP in my day. I am actually a huge fan of PHP and love not having to deal with types on occasion. For an interpreted language it is fairly fast and with the syntax being quite similar to C I feel at home. I frequent php.net for its useful storage of function definitions and user added PHP examples. While some examples are useful others are not as useful, so parse at your own peril. Just use the search function to get started.

Link: http://www.php.net

Linux Man Pages At Die.net

When I am unable to find a manual page for a certain function, or an obscure function in the kernel I usually google it. For the most part die.net comes up as the first results so I now just head there almost exclusively when looking for a man page. A great part of this is the “other suggested functions” are links, which saves me from opening another terminal tab to look those up.

Link: http://linux.die.net/man/

 

Advertisements