All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin D Bennett <colin@gibibit.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Drivemap module
Date: Thu, 12 Jun 2008 21:09:10 -0700	[thread overview]
Message-ID: <20080612210910.62e2f411@gibibit.com> (raw)
In-Reply-To: <1213318821.20744.12.camel@dv>

On Thu, 12 Jun 2008 21:00:21 -0400
Pavel Roskin <proski@gnu.org> 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



  reply	other threads:[~2008-06-13  4:09 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 20:09 [PATCH] Drivemap module Javier Martín
2008-06-10 20:23 ` Vesa Jääskeläinen
2008-06-10 21:31   ` Javier Martín
2008-06-12 20:31     ` Pavel Roskin
2008-06-12 22:43       ` Javier Martín
2008-06-12 22:58         ` Colin D Bennett
2008-06-13  1:00           ` Pavel Roskin
2008-06-13  4:09             ` Colin D Bennett [this message]
2008-06-13  1:37         ` Pavel Roskin
2008-06-13  2:29           ` Javier Martín
2008-06-11 14:44 ` Marco Gerards
  -- strict thread matches above, loose matches on Subject: below --
2008-07-04  2:12 Javier Martín
2008-07-05 11:04 ` Marco Gerards
2008-07-16 15:39   ` Javier Martín
2008-07-20 19:40 ` Marco Gerards
2008-07-21  0:55   ` Javier Martín
2008-07-21 11:07     ` Javier Martín
2008-07-22 21:32     ` Robert Millan
2008-07-31 19:01     ` Marco Gerards
2008-08-03 23:29       ` Javier Martín
2008-08-04 20:51         ` Marco Gerards
2008-08-04 23:10           ` Javier Martín
2008-08-05  0:50             ` Isaac Dupree
2008-08-05  2:38               ` Javier Martín
2008-08-05 11:31                 ` Marco Gerards
2008-08-05 11:23             ` Marco Gerards
2008-08-05 17:18               ` Colin D Bennett
2008-08-05 11:28             ` Marco Gerards
2008-08-05 16:39               ` Javier Martín
2008-08-09 15:33                 ` Javier Martín
2008-08-13 10:13                   ` Marco Gerards
2008-08-13 12:16                     ` Javier Martín
2008-08-13 13:00                       ` Robert Millan
2008-08-13 14:28                         ` Javier Martín
2008-08-13 14:51                           ` Marco Gerards
2008-08-13 15:14                           ` Robert Millan
2008-08-13 15:57                             ` Marco Gerards
2008-08-13 22:38                               ` Javier Martín
2008-08-14 17:15                                 ` Marco Gerards
2008-08-14 22:17                                   ` Javier Martín
2008-08-13 13:01                       ` Robert Millan
2008-08-05 17:15             ` Colin D Bennett
2008-08-06 14:43 Viswesh S
2008-08-06 17:31 ` Javier Martín
2008-08-08 13:20   ` Felix Zielcke
2008-08-07 12:15 Viswesh S
2008-08-08 13:43 Viswesh S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080612210910.62e2f411@gibibit.com \
    --to=colin@gibibit.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.