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

svn commit: r843435 - in /websites/staging/httpd/trunk/content: ./ dev/styleguide.html

Author: buildbot
Date: Sat Dec 22 00:12:18 2012
New Revision: 843435

Log:
Staging update by buildbot for httpd

Modified:
    websites/staging/httpd/trunk/content/   (props changed)
    websites/staging/httpd/trunk/content/dev/styleguide.html

Propchange: websites/staging/httpd/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Dec 22 00:12:18 2012
@@ -1 +1 @@
-1404016
+1425208

Modified: websites/staging/httpd/trunk/content/dev/styleguide.html
==============================================================================
--- websites/staging/httpd/trunk/content/dev/styleguide.html (original)
+++ websites/staging/httpd/trunk/content/dev/styleguide.html Sat Dec 22 00:12:18 2012
@@ -92,33 +92,24 @@ broken if necessary to achieve a clearer
 <ul>
 <li>Opening braces are given on the same lines as statements, or on the
 following line at the start of a function definition.</li>
-<li>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.</li>
-<li>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.</li>
-<li>Functions are declared with ANSI-style
-arguments.</li>
-<li>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.</li>
-<li>Inside a <code>switch()</code> statement,
-the <code>case</code> keywords are indented to the same level as
-the <code>switch</code> line.</li>
-<li>Operators in expressions should be
-surrounded by a single space before and after, except for unary increment
-(++), decrement (--), and negation (!) operators.</li>
-<li>There is no
-whitespace between a cast and the item modified (<EM>e.g.</EM>,
+<li>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.</li>
+<li>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.</li>
+<li>Functions are declared with ANSI-style arguments.</li>
+<li>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.</li>
+<li>Inside a <code>switch()</code> statement, the <code>case</code> keywords are indented to the same
+level as the <code>switch</code> line.</li>
+<li>Operators in expressions should be surrounded by a single space before and
+after, except for unary increment (++), decrement (--), and negation (!) operators.</li>
+<li>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>").</li>
-<li>If a cast is
-to a pointer type, there is a space between the type and
-the <code>*</code> character (<em>e.g.</em>, "<code>(char *)i</code>" instead
-of "<code>(char*)i</code>")</li>
+<li>If a cast is to a pointer type, there is a space between the type and
+the <code>*</code> character (<em>e.g.</em>, "<code>(char *)i</code>" instead of "<code>(char*)i</code>")</li>
 </ul>
 <h1 id="details-and-examples">Details and Examples</h1>
 <h2 id="indentation-general-style"><strong>Indentation, General Style</strong></h2>
@@ -137,7 +128,7 @@ control-flow keywords are given below.</
 </pre></div>
 
 
-<p><A NAME="long-exps">If an expression</A>(or a routine declaration or
+<p><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
@@ -179,14 +170,13 @@ of code.</p>
 
 
 <p>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 <code>void</code>. 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. <strong>Also see the
-section on indenting<A HREF="#long-exps">long declarations and
-invocations</A>.</strong> </p>
+any) are given in ANSI style. If no arguments, declare function as <code>void</code>.
+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. <strong>Also see the section on
+indenting <A HREF="#long-exps">long declarations and invocations</A>.</strong> </p>
 <h2 id="function-calls"><strong>Function Calls</strong></h2>
 <p>Space after commas in function calls. No space between function name and
 opening bracket.</p>
@@ -195,12 +185,10 @@ opening bracket.</p>
 </pre></div>
 
 
-<p><strong>Also see the section on indenting<A HREF="#long-exps">long declarations
+<p><strong>Also see the section on indenting <A HREF="#long-exps">long declarations
 and invocations</A>.</strong> </p>
 <h2 id="flow-control-layout"><strong>Flow-Control Layout</strong></h2>
-<p>Flow-control statements
-(<code>if</code>, <code>while</code>, <code>for</code>, <em>etc.</em>) are
-laid out as in this</p>
+<p>Flow-control statements (<code>if</code>, <code>while</code>, <code>for</code>, <em>etc.</em>) are laid out as in this</p>
 <p>Example:</p>
 <div class="codehilite"><pre><span class="k">if</span> <span class="p">(</span><span class="n">expr</span><span class="p">)</span> <span class="p">{</span>
     <span class="n">code</span><span class="p">;</span>
@@ -212,12 +200,12 @@ laid out as in this</p>
 
 
 <p>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 <code>else</code> clause is used, the <code>else</code> keyword is
-placed on the line following the closing brace and is indented to line up
-with the corresponding <code>if</code>. <strong>Also see the section on
-indenting<A HREF="#long-exps">long expressions</A>.</strong> </p>
+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 <code>else</code> clause is used, the <code>else</code> keyword is placed on the line following
+the closing brace and is indented to line up with the corresponding <code>if</code>.
+<strong>Also see the section on indenting <A HREF="#long-exps">long
+expressions</A>.</strong> </p>
 <h2 id="for-layout"><strong><code>for</code> Layout</strong></h2>
 <p>Space after the semi-colons.</p>
 <p>Example:</p>
@@ -226,9 +214,9 @@ indenting<A HREF="#long-exps">long expre
 
 
 <h2 id="switch-layout"><strong><code>switch</code> Layout</strong></h2>
-<p><code>case</code> lines within a <code>switch()</code> 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.</p>
+<p><code>case</code> lines within a <code>switch()</code> 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.</p>
 <p>Example:</p>
 <div class="codehilite"><pre><span class="n">switch</span> <span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="p">{</span>
 <span class="k">case</span> <span class="n">a:</span>