Page MenuHomeFreeBSD

D2842.id6249.diff
No OneTemporary

D2842.id6249.diff

Index: share/man/man9/style.9
===================================================================
--- share/man/man9/style.9
+++ share/man/man9/style.9
@@ -503,13 +503,14 @@
.Pp
Space after keywords
.Pq Ic if , while , for , return , switch .
-No braces
+Either braces
.Ql ( \&{
and
.Ql \&} )
-are
-used for control statements with zero or only a single statement unless that
-statement is more than a single line in which case they are permitted.
+are not
+used for control statements with only a single statement unless that
+statement is more than a single line, or braces are always used
+for single statements within a file.
Forever loops are done with
.Ic for Ns 's ,
not
@@ -565,6 +566,8 @@
Closing and opening braces go on the same line as the
.Ic else .
Braces that are not necessary may be left out.
+Braces that are not necessary may also be left in.
+The choice should be at the file level.
.Bd -literal
if (test)
stmt;

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 27, 11:02 PM (15 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26265486
Default Alt Text
D2842.id6249.diff (950 B)

Event Timeline