This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Question for removing trailing whitespaces (not vertical tab) from source
On 13 March 2007 15:06, Andrew Haley wrote:
> Dave Korn writes:
> > On 13 March 2007 14:02, Andrew Haley wrote:
> >
> > > Kai Tietz writes:
> > >
> > > > I want to remove some trailing whitespaces from gcc source as coding
> > > style > demands. Also I wrote, while doing a small tool for that, a
> > > feature to > replace horiz. tabs by spaces. But the question is by
> which > > width should > be used ?
> > >
> > > 8.
> >
> >
> > Can you explain that value? It's just that 1) I see vast acres and
> acres of > code where the tabstop size is two spaces 2) the coding
> standard doesn't seem > to /demand/ a specific tab size and 3) if we use
> 8-space TABs with the kind of > depths of nesting the gcc code often
> contains we're going to exceed the > 80-column line length limit just on
> the leading indentation alone pretty > often....
>
> That's not the question I answered, which was "when I come across a
> leading tab character in GNU souce code, how many spaces does that tab
> represent?" It says nothing about correct GNU indentation, which is
> two spaces.
Thanks for clarification, the false inference I was making was that a TAB
was (or could be) equivalent to an indent level. (Sometimes it is, of course
- I guess a lot of the mixed-formatting problems probably arise where a chunk
of code that used to be at one indent level that happened to be a multiple of
4 and hence could be aligned using TABs gets moved to a different context
where they would need to be converted to spaces and adjusted...)
cheers,
DaveK
--
Can't think of a witty .sigline today....