From: Tony M. <to...@ki...> - 2004-02-22 04:40:44
|
We'd never get a standardized indentation style working. I personally have used four spaces (no tabs) for decades, along with the old structured-C style braces (braces on their own lines), and find the BSD style function header line of type\nname(args){\n utterly incomprehensible even though I do a lot of commercial work on BSD. The open-source world is full of opinions, but there's no way to enforce a standard when all the work is charity. So I would say do whatever you feel necessary for legibility and always use the -w parameter with cvs diff. (That ignores all whitespace differences.) Nathan Kurz wrote: >As I start to do things with the CVS repository, it's apparent that >Scott and Tom had different opinions on how indent C code. The >obvious difference is that Scott preferred 8 space indents, while the >rest of the code (presumably mostly Tom's) has 4 space indents. > >The current code is often hard to read, because the indentation might >change several times withing a given function. Personally, I prefer >GNU style with 2 space indents, but changing over to this would be >silly. So what is to be done? My impulse is to restandardize to >Tom's original 4 space indentation. > >The arguments against standardizing it now is that the CVS changes for >the indentation will mask the CVS changes that might give good clues >when one is searching for the cause of a recent bug. The argument for >standardizing now is that we are at a point we almost all the code in >there is suspect, so when would be better than the present. > >Thoughts appreciated, although practical suggestions would be >appreciated more than blind zealotry. Left to my own devices, I'll >probably just start re-indenting files before I start working on them, >checking them in, and then checking my changes in on top of that. > >--nate > > |