Re: indentation of c code



Ysgrifennodd Dodji Seketeli:
> http://developer.gnome.org/doc/guides/programming-guidelines/code-style.html.

Does anyone have a good idea about modelines at the tops of files?  That 
page ought really to cover them, but it doesn't mention them.  We have a 
bug open about it (<http://bugzilla.gnome.org/show_bug.cgi?id=358866>) 
in Metacity.

If you're using an 8-char indent with GNU style, does that mean you go

 if (something)
 <--eight-->{
 <--eight--><--eight-->printf("I like cheese\n");

or is the indent four in that case?

I actually prefer an 8-character indent, but Metacity uses two 
throughout, and it's a bit late to change.  I wish source control worked 
on the basis of tokens rather than lines, as though we were still on 
punched cards, so it wouldn't matter if you reformatted a block.

Thomas

-- 
Thomas Thurman, tthurman at gnome, http://blogs.gnome.org/tthurman
Shell Room


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]