I’m surprised the less code base is so bad.
Is the original source code from a BSD tree? I’d imagine the GNU’s less is pretty well done, thanks to their coding standards. (Though using that code would be unlikely, due to licensing.)
I’m laughing quietly to my self about your expectation of GNU code quality.
The same less is used everywhere, doubly GPL and simplified BSD license: http://www.greenwoodsoftware.com/less/index.html
It might also be worth noting that less is not a GNU project.
But yeah, coding standards != quality.
I’m not; old c code had to do some pretty horrendous things in order to be compliant with all the varieties of platform and compiler out there. never had to deal with it myself, thankfully, but I’ve seen some pretty scary codebases.
You may find the comparison between different implementations of echo interesting. GNU’s implementation looks bizarre. I don’t know how much of this complexity is justified though.
Thought it’s about improving Less so it can compete with Sass. ;)