You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2012/12/22 01:12:13 UTC

svn commit: r1425208 - /httpd/site/trunk/content/dev/styleguide.mdtext

Author: sf
Date: Sat Dec 22 00:12:13 2012
New Revision: 1425208

URL: http://svn.apache.org/viewvc?rev=1425208&view=rev
Log:
Reflow paragraphs to make source more readable. Add missing spaces before
links.  No other change.

Modified:
    httpd/site/trunk/content/dev/styleguide.mdtext

Modified: httpd/site/trunk/content/dev/styleguide.mdtext
URL: http://svn.apache.org/viewvc/httpd/site/trunk/content/dev/styleguide.mdtext?rev=1425208&r1=1425207&r2=1425208&view=diff
==============================================================================
--- httpd/site/trunk/content/dev/styleguide.mdtext (original)
+++ httpd/site/trunk/content/dev/styleguide.mdtext Sat Dec 22 00:12:13 2012
@@ -38,33 +38,24 @@ This style can be generated with the fol
 
 - Opening braces are given on the same lines as statements, or on the
 following line at the start of a function definition.
-- Code inside a
-block (whether surrounded by braces or not) is indented by four space
-characters. Tab characters are not used. Comments are indented to the same
-level as the surrounding code.
-- Closing braces are always on a
-separate line from surrounding code, and are indented to line up with the
-start of the text on the line containing the corresponding opening
-brace.
-- Functions are declared with ANSI-style
-arguments.
-- There is no space between the function name and the
-opening bracket of the arguments to the function. There is a single space
-following commas in argument lists and the semi-colons in for
-statements.
-- Inside a `switch()` statement,
-the `case` keywords are indented to the same level as
-the `switch` line.
-- Operators in expressions should be
-surrounded by a single space before and after, except for unary increment
-(++), decrement (--), and negation (!) operators.
-- There is no
-whitespace between a cast and the item modified (<EM>e.g.</EM>,
+- Code inside a block (whether surrounded by braces or not) is indented by
+four space characters. Tab characters are not used. Comments are indented to
+the same level as the surrounding code.
+- Closing braces are always on a separate line from surrounding code, and are
+indented to line up with the start of the text on the line containing the
+corresponding opening brace.
+- Functions are declared with ANSI-style arguments.
+- There is no space between the function name and the opening bracket of the
+arguments to the function. There is a single space following commas in
+argument lists and the semi-colons in for statements.
+- Inside a `switch()` statement, the `case` keywords are indented to the same
+level as the `switch` line.
+- Operators in expressions should be surrounded by a single space before and
+after, except for unary increment (++), decrement (--), and negation (!) operators.
+- There is no whitespace between a cast and the item modified (<EM>e.g.</EM>,
 "<samp>(int)j</samp>" and not "<samp>(int) j</samp>").
-- If a cast is
-to a pointer type, there is a space between the type and
-the `*` character (*e.g.*, "`(char *)i`" instead
-of "`(char*)i`")
+- If a cast is to a pointer type, there is a space between the type and
+the `*` character (*e.g.*, "`(char *)i`" instead of "`(char*)i`")
 
 # Details and Examples #
 
@@ -85,7 +76,7 @@ Example:
 	exit(0);
     }
 
-<A NAME="long-exps">If an expression</A>(or a routine declaration or
+<A NAME="long-exps">If an expression</A> (or a routine declaration or
 invocation) would extend past column 80, the terms or arguments are wrapped
 at a convenient spot and the wrapped portion is indented under the first
 term in the expression (or the first argument to the function). Conditional
@@ -132,14 +123,13 @@ Example:
     }
 
 The return type is placed on the same line as the function. Arguments (if
-any) are given in ANSI style. If no arguments, declare function
-as `void`. No space between function name and opening bracket,
-single space after comma separating each argument. The opening brace is
-placed on the line after the definition, indented to line up with the start
-of the return type text. The code is indented with four spaces, and the
-closing brace is indented to line up with the opening brace. **Also see the
-section on indenting<A HREF="#long-exps">long declarations and
-invocations</A>.** 
+any) are given in ANSI style. If no arguments, declare function as `void`.
+No space between function name and opening bracket, single space after
+comma separating each argument. The opening brace is placed on the line
+after the definition, indented to line up with the start of the return type
+text. The code is indented with four spaces, and the closing brace is
+indented to line up with the opening brace. **Also see the section on
+indenting <A HREF="#long-exps">long declarations and invocations</A>.** 
 
 ## **Function Calls** 
 
@@ -150,14 +140,12 @@ Example:
 
     f(a, b);
 
-**Also see the section on indenting<A HREF="#long-exps">long declarations
+**Also see the section on indenting <A HREF="#long-exps">long declarations
 and invocations</A>.** 
 
 ## **Flow-Control Layout** 
 
-Flow-control statements
-(`if`, `while`, `for`, *etc.*) are
-laid out as in this
+Flow-control statements (`if`, `while`, `for`, *etc.*) are laid out as in this
 
 Example:
 
@@ -169,12 +157,12 @@ Example:
     }
 
 There is a space between the keyword and the opening bracket. Opening brace
-placed on same line as the flow keyword. The code itself is indented by
-four spaces. The closing brace is indented to line up with the opening
-brace. If an `else` clause is used, the `else` keyword is
-placed on the line following the closing brace and is indented to line up
-with the corresponding `if`. **Also see the section on
-indenting<A HREF="#long-exps">long expressions</A>.** 
+placed on same line as the flow keyword. The code itself is indented by four
+spaces. The closing brace is indented to line up with the opening brace. If
+an `else` clause is used, the `else` keyword is placed on the line following
+the closing brace and is indented to line up with the corresponding `if`.
+**Also see the section on indenting <A HREF="#long-exps">long
+expressions</A>.** 
 
 ## **`for` Layout** 
 
@@ -187,9 +175,9 @@ Example:
 
 ## **`switch` Layout**
 
-`case` lines within a `switch()` are indented to same
-level as the switch statement itself. The code for each case is indented by
-four spaces. Braces are laid out as for other control-flow keywords.
+`case` lines within a `switch()` are indented to same level as the switch
+statement itself. The code for each case is indented by four spaces.
+Braces are laid out as for other control-flow keywords.
 
 Example: