Hey, HN,<p>I hardly ever read other people's code, but I'd like to start dedicating a few hours each week to studying idiomatic C. The ultimate goal is to improve my own code.<p>What are some codebases that are worth studying? Bonus points for open-source projects that are looking for new contributors.
Since it was just posted, the xv6 ANSI C Unix source is nice and fairly compact. They even provide a nice PDF for you to take it with you:<p><a href="http://pdos.csail.mit.edu/6.828/2011/xv6/xv6-rev6.pdf" rel="nofollow">http://pdos.csail.mit.edu/6.828/2011/xv6/xv6-rev6.pdf</a><p>Also the low-level GLib core library is good:<p><a href="http://git.gnome.org/browse/glib/tree/glib" rel="nofollow">http://git.gnome.org/browse/glib/tree/glib</a>
I'm certainly not the best C programmer out there but hey, might want to have a look at:<p>- <a href="https://github.com/visionmedia/luna" rel="nofollow">https://github.com/visionmedia/luna</a>
- <a href="https://github.com/visionmedia/libcss" rel="nofollow">https://github.com/visionmedia/libcss</a>
You might be interested in <a href="http://www.amazon.com/Beautiful-Code-Leading-Programmers-Practice/dp/0596510047" rel="nofollow">http://www.amazon.com/Beautiful-Code-Leading-Programmers-Pra...</a><p>I believe one of the examples they gave in C was the diff algorithm from Subversion.