bug-standards
[Top][All Lists]
Advanced

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

Re: indentation of structures/enums


From: Karl Berry
Subject: Re: indentation of structures/enums
Date: Sat, 7 Apr 2012 17:27:30 -0700

      For the body of the function, our recommended style looks like this:

      @example
    + struct quux
    + @{
    +   int a, b;
    + @};
    + 

Thanks.  I thought it would be nice to have a bit of text too, so I've
just installed this change:

--- standards.texi      11 Mar 2012 00:25:31 -0000      1.214
+++ standards.texi      8 Apr 2012 00:20:02 -0000
@@ -2432,2 +2432,14 @@ lots_of_args (int an_integer, long a_lon
 
+For @code{struct} and @code{enum} types, likewise put the braces in
+column one, unless the whole contents fits on one line:
+
address@hidden
+struct foo
address@hidden
+  int a, b;
address@hidden
address@hidden @r{or}
+struct foo @{ int a, b; @}
address@hidden example
+
 The rest of this section gives our recommendations for other aspects of



reply via email to

[Prev in Thread] Current Thread [Next in Thread]