Ask HN: Good C codebases to read?
What is good but not super-complex C codebases that can be used to learn about proper practices used in modern complex projects?
Inspired by this thread: https://news.ycombinator.com/item?id=9896369
Inspired by this thread: https://news.ycombinator.com/item?id=9896369
To check out the FreeBSD source code, you can do:
svn co https://svn.freebsd.org/base/head
And if you want to know how 'cat' is implemented, go to bin/cat/.
Same for 'ls', 'find' etc..
Other than that, early source code of UNIX gurus is very good too. Check out the Plan 9 project from Bell Labs. It has a very clean code too:
For a beginner looking for idiomatic C code I wouldn't really recommend it as something to study.