Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 924DCC11B for ; Mon, 7 May 2012 00:06:28 +0000 (UTC) Received: (qmail 15137 invoked by uid 500); 7 May 2012 00:06:28 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 15085 invoked by uid 500); 7 May 2012 00:06:28 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 15078 invoked by uid 99); 7 May 2012 00:06:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2012 00:06:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2012 00:06:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 118AD2388962; Mon, 7 May 2012 00:06:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1334838 - /httpd/site/trunk/content/dev/styleguide.mdtext Date: Mon, 07 May 2012 00:06:04 -0000 To: cvs@httpd.apache.org From: joes@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120507000605.118AD2388962@eris.apache.org> Author: joes Date: Mon May 7 00:06:04 2012 New Revision: 1334838 URL: http://svn.apache.org/viewvc?rev=1334838&view=rev Log: various formatting issues 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=1334838&r1=1334837&r2=1334838&view=diff ============================================================================== --- httpd/site/trunk/content/dev/styleguide.mdtext (original) +++ httpd/site/trunk/content/dev/styleguide.mdtext Mon May 7 00:06:04 2012 @@ -95,12 +95,12 @@ atomic as possible, and place Boolean op Example: static const char *really_long_name(int i, int j, - const char *args, void *foo, - int k) + const char *args, void *foo, + int k) - if (cond1 && (item2 || item3) && (!item4) - && (item5 || item6) && item7) { - do_a_thing(); + if (cond1 && (item2 || item3) && (!item4) + && (item5 || item6) && item7) { + do_a_thing(); } @@ -123,12 +123,12 @@ Functions are laid out as follows: int main(int argc, char **argv) { - code; + code; } 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 -asvoid. No space between function name and opening bracket, +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 @@ -151,10 +151,10 @@ Flow-control statements laid out as in this example: if (expr) { - code; + code; } else { - code; + code; } There is a space between the keyword and the opening bracket. Opening brace @@ -179,9 +179,9 @@ Example: switch (x) { case a: - code; + code; case b: - code; + code; }