Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137892250
D2842.id6249.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
950 B
Referenced Files
None
Subscribers
None
D2842.id6249.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D2842: Update style.9 to reflect consensus on developer's mailing list.
Attached
Detach File
Event Timeline
Log In to Comment