[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Drivemap module

From: Colin D Bennett
Subject: Re: [PATCH] Drivemap module
Date: Thu, 12 Jun 2008 21:09:10 -0700

On Thu, 12 Jun 2008 21:00:21 -0400
Pavel Roskin <address@hidden> 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:


> > 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]