Choose a coding style
Created by: escondida
Frotz has had a lot of contributors over the years, and there's never been any standard for what the code should actually look like. It's understandable; it's an old project. However, this can get distracting when indents within even a single function use spaces and tabs (dogs and cats living together, mass hysteria!) at random, have inconsistent bracing, and so forth.
Fortunately, indent(1) and find(1) exist! I propose that we choose a code formatting standard and stick with it, starting by running indent over the project.
Personally, I vote for K&R style, since Kernighan & Ritchie were pretty good at C. Pie-in-the-sky I'd modify that to one-true-brace style, but as far as I can tell neither GNU nor BSD indent supports that.
The magic invocation I've tested is this: indent -kr -bad -c1 -cd1 -cp1 -nlp -ts4
The switches beyond -kr are to make the output a bit more like that of the book, rather than GNU's baffling choices (indenting comments halfway across the screen, etc.). -ts4 means that indent will use tab stops of 4 spaces for its work; this should have no effect on how the code actually appears in your editor.
I'm happy to do the work myself, too, though I should note that I'm not really comfortable with suddenly appearing to take credit for every single line of code in the project...