Vodz, your tabstop is wrong.

Glenn L. McGrath bug1 at iinet.net.au
Mon Oct 17 09:27:37 UTC 2005


On Mon, 17 Oct 2005 11:34:33 +0400
"Vladimir N. Oleynik" <dzo at simtreas.ru> wrote:

> Rob,
> 
> > In busybox we use a tabstop of 4.  There are even special vi comments, ala:
> > /* vi: set sw=4 ts=4: */
> 
> Vi is not single editor and viewer in wordl.
> I have irritated of this:
> 
>   	HardLinkInfo *next;	/* Next entry in list */
> -	dev_t dev;		/* Device number */
> -	ino_t ino;		/* Inode number */
> +	dev_t dev;			/* Device number */
> +	ino_t ino;			/* Inode number */

I think tabs are good for the start of the line, prior to any text, but
spaces are usefull at the end of the line.

To be really pedantic, i like to put spaces after text to take it to
the column where the first post text tab is used.

e.g. ideally i would do

<tab>HardLinkInfo *next;<tab>/* Next entry in list */
<tab>dev_t dev;         <tab>/* Device number */
<tab>ino_t ino;         <tab>/* Inode number */

If you dont use the same number of tab's in each line comments probably
wont align unless everyone uses the same tab size.

The patch above is replacing whitespace containing 2 tabs prior to the
comment with whitespace containing 3 tabs. Both are trying to align
with the top line that only contains 1 tab. Neither are logical to me :)

We do standardise on tab size of 4, but in the end its just one of
those personal preferences that not everyone will be happy with
whatever its set at.


Peace

Glenn



More information about the busybox mailing list