Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K70bW-0008GE-Iw for mharc-grub-devel@gnu.org; Fri, 13 Jun 2008 00:09:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K70bV-0008G9-2I for grub-devel@gnu.org; Fri, 13 Jun 2008 00:09:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K70bU-0008Fx-KG for grub-devel@gnu.org; Fri, 13 Jun 2008 00:09:32 -0400 Received: from [199.232.76.173] (port=39386 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K70bU-0008Fu-Fr for grub-devel@gnu.org; Fri, 13 Jun 2008 00:09:32 -0400 Received: from gateway10.websitewelcome.com ([69.93.179.7]:46380) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1K70bU-0000A4-0Q for grub-devel@gnu.org; Fri, 13 Jun 2008 00:09:32 -0400 Received: (qmail 11227 invoked from network); 13 Jun 2008 04:13:16 -0000 Received: from gator297.hostgator.com (74.53.228.114) by gateway10.websitewelcome.com with SMTP; 13 Jun 2008 04:13:16 -0000 Received: from c-67-185-142-228.hsd1.wa.comcast.net ([67.185.142.228]:43147 helo=localhost) by gator297.hostgator.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1K70bP-0002at-05 for grub-devel@gnu.org; Thu, 12 Jun 2008 23:09:27 -0500 Date: Thu, 12 Jun 2008 21:09:10 -0700 From: Colin D Bennett To: grub-devel@gnu.org Message-ID: <20080612210910.62e2f411@gibibit.com> In-Reply-To: <1213318821.20744.12.camel@dv> References: <1213128551.1287.17.camel@localhost> <484EE2AD.5090602@nic.fi> <1213133486.1287.19.camel@localhost> <1213302675.6690.12.camel@dv> <1213310611.8288.18.camel@localhost> <20080612155828.3d1be792@gibibit.com> <1213318821.20744.12.camel@dv> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator297.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gibibit.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Drivemap module 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: Fri, 13 Jun 2008 04:09:33 -0000 On Thu, 12 Jun 2008 21:00:21 -0400 Pavel Roskin wrote: > On Thu, 2008-06-12 at 15:58 -0700, Colin D Bennett wrote: > > I highly recommend running > > > > indent --no-tabs > > Why no tabs? Tabs are heavily used in the code. GNU indent is > supposed to default to GNU Coding Standards, and it uses tabs. The video module code uses only spaces for indentation. Since I've been working mostly on the video module, so far, I was misled to believe that spaces are the preferred GRUB style. I checked all the C files in GRUB2 CVS and found that you are right, tabs are heavily used, except in the code that I have been focused on. The following C files do not contains any tabs: ./kern/i386/efi/init.c ./commands/videotest.c ./util/powerpc/ieee1275/misc.c ./util/i386/pc/misc.c ./util/i386/get_disk_name.c ./util/ieee1275/get_disk_name.c ./util/lvm.c ./video/video.c ./video/i386/pc/vbeutil.c ./video/i386/pc/vbefill.c ./video/i386/pc/vbeblit.c ./video/i386/pc/vbe.c ./video/readers/tga.c ./video/bitmap.c ./disk/ieee1275/nand.c > > on your source code, as long as it doesn't cause too many spurious > > changes to pre-existing code. > > It will. This depends on the file. Running format (with the same choice of tabs+spaces or spaces-only for indentation) on a GRUB source file usually results in minimal changes, in my experience. > > This should take care of most formatting > > inconsistencies and frees you a little but from concerning yourself > > with trivial details. > > We can use a script to re-indent everything. Then new patches could > be easily run through the same script. Otherwise, it's not going to > be simple. Interesting idea! Anyway, my point is not to get into the religious war of spaces vs. tabs in indentation, since I am comfortable with both, although I think that mixing spaces and tabs together (using TAB characters as a substitute for 8 spaces) negates the benefits of both approaches. But that's all I'll say on that. I will indent code that I work on with the same style that it already has, so that my patches are clean and contain, in general, only changes related to actual features that the patch adds. Colin