Coding style
Russ Allbery
rra at stanford.edu
Tue Sep 7 19:00:49 UTC 1999
brister <brister at vix.com> writes:
> I'm not a style-nazi (because I'm secure in the knowledge that my
> personal style (which isn't at all like INN's) is the best :-)
Yes, it's in innfeed. :) I like the lack of studly caps a lot; the other
sins are minor. *grin*
> If people submit patches, then I would prefer that the coding style
> follow the original file as much as possible.
The trick here with INN is that a lot of INN's files have several
conflicting styles. The style I was trying to lay out is actually pretty
close to a consistent compromise between all of them. (I personally use a
space before a paren on function calls, but I know everyone else in the
world other than GNU coding standards folks really hates that, so I won't
inflict it on INN. :))
> If someone submits an entirely new file, then I don't much care about
> indentation and brace placing. I do like to see lots of white space,
> both vertical and horizontal. The procmail package's source doesn't
> fit. e.g.
Oh, yeah, totally agreed.
> I guess the only thing in Russ's set of rules I'd argue against is:
>> if (p) free(p);
> vs.
>> if (p != NULL) free(p);
> I too am a Perl programmer, but I stay away from implicit conversions
> whe possible and I think the second conveys the real intent of the test
> better.
I'm cool with switching back to that style for INN if you want. I suppose
I'll have to be pedantic and point out that if NULL is defined as
(void *) 0 as it normally is, *both* of those expresions involve an
implicit conversion unless p is actually a void * pointer, but that's
really pedantic. :)
--
Russ Allbery (rra at stanford.edu) <URL:http://www.eyrie.org/~eagle/>
More information about the inn-workers
mailing list