Coding style
brister at vix.com
brister at vix.com
Tue Sep 7 18:43:18 UTC 1999
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 :-) If people submit
patches, then I would prefer that the coding style follow the original file as
much as possible. 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.
if(e)
{ r->opc=OPC_CLASS;r->next=Ceps e;Cc(r,pos1.st_)=Cc(r,pos2.st_)=0;
i=maxindex(rAc);
do rAc[i]=j?~0:0; /* preset the bit field */
while(i--);
}
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.
James
--
James Brister brister at vix.com
Internet Software Consortium
More information about the inn-workers
mailing list