From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Jre2j-0000gq-Fy for mharc-grub-devel@gnu.org; Thu, 01 May 2008 15:02:09 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jre2h-0000gl-J4 for grub-devel@gnu.org; Thu, 01 May 2008 15:02:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jre2f-0000gY-6C for grub-devel@gnu.org; Thu, 01 May 2008 15:02:06 -0400 Received: from [199.232.76.173] (port=50241 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jre2e-0000gV-WE for grub-devel@gnu.org; Thu, 01 May 2008 15:02:05 -0400 Received: from mta-out.inet.fi ([195.156.147.13] helo=jenni1.rokki.sonera.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jre2e-0002o3-6w for grub-devel@gnu.org; Thu, 01 May 2008 15:02:04 -0400 Received: from [127.0.0.1] (88.193.32.97) by jenni1.rokki.sonera.fi (8.0.013.9) id 4817B803001EF6DF for grub-devel@gnu.org; Thu, 1 May 2008 22:01:58 +0300 Message-ID: <481A13AA.1030405@nic.fi> Date: Thu, 01 May 2008 22:02:02 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: The development of GRUB 2 References: <20080429122218.3b2f66b7@gibibit.com> In-Reply-To: <20080429122218.3b2f66b7@gibibit.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: Coding style / indent options X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2008 19:02:07 -0000 Colin D Bennett wrote: > Does anyone have a set of GNU indent (or astyle) options that correspon= d > to the proper format for GRUB source code? I want to make sure I'm usin= g > the correct style so that I don't produce spurious changes when files > I'm editing are reformatted. >=20 > I tried using GNU indent (with the default GNU style) on a few GRUB 2 > source files to see what differences resulted, and I observed the > following differences: >=20 > GRUB GNU=20 > =3D=3D=3D=3D =3D=3D=3D > (1) Space after unary '!' operator Yes No=20 > (2) Space between macro name and open paren No Yes > (3) Max line length >=3D80 <80 > (4) Space between __attribute__ and parens No Yes > (5) Keep indenting spaces on blank lines Yes No >=20 > I did notice, however, that in some places (e.g., > normal/functions.c lines 84-87) the space/TAB usage is inconsistent). I > assume that replacing 8 spaces with TAB characters is the desired > usage (as GNU style suggests). >=20 > I just want to keep the code I modify and produce as clean and uniform > as possible, and produce clean patches. Hi Colin, As you noted it is not too strict :). So best bet is to follow what you see elsewhere in GRUB 2 code base and=20 follow that. Of course one could argue should conventions be followed=20 more closely. Just make it look clean and try to follow most of the rules. We will=20 spot them for you if we see the reason :) It is usually a good idea to review contents of patches beforehand and=20 try to keep changes as minimal as possible. Thanks, Vesa J=E4=E4skel=E4inen