From: Keir Fraser Subject: Re: [RFC] Coding style and standardisation Date: Mon, 04 Jun 2007 10:24:36 +0100 Message-ID: References: <200706040603.45326.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200706040603.45326.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 4/6/07 06:03, "Mark Williamson" wrote: > Attached is a little extra documentation - my quick stab at summing up the Xen > coding style. I think the main points of difference from the Linux coding > style are summarised here, but if anybody has anything else they think should > be included (or anything they disagree with in my summary) it would be handy > to know. White space: only put spaces inside outermost brackets of if/while/for. For example, "if ( (wibble & wombat) == 42 )". Comments: /* * Multi-line comments are formatted like this. * No trailing white space, even at the end of the first line. */ Top-of-file comments: see e.g., common/page_alloc.c for preferred style. Emacs style: it's okay to put an Emacs style block at the end of files, e.g., as in common/page_alloc.c. -- Keir