SQLite probably has some of the cleanest and most elegant C you will ever see: http://www.sqlite.org/sqlite-src-3070602.zip
I won't argue about code quality of SQLite, because I know it's superb, but the coding style is just horrible. Take a look at anything in OpenBSD (ex: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/bgpd/bgpd... ) or nginx ( http://nginx.org/download/nginx-1.0.0.tar.gz ).
I had to go look. I agree; there are some things done consistently in the code that are high on my nitpick "don't do that" list. Ugh. I'd have to reformat to work on it, then format to whatever standard they use on checkin, I think.