[PATCH] Re-indent (almost) top.c

Eli Zaretskii eliz@delorie.com
Mon Apr 3 02:09:00 GMT 2000


> I've committed the attatched re-indent of top.c.
[snip]
> *************** cd_command (dir, from_tty)
> *** 3645,3657 ****
>   #endif
>   
>     len = strlen (dir);
> !   if (SLASH_P (dir[len-1]))
>       {
>         /* Remove the trailing slash unless this is a root directory
> ! 	 (including a drive letter on non-Unix systems).  */
> !       if (!(len == 1) /* "/" */
>   #if defined(_WIN32) || defined(__MSDOS__)
> ! 	  && !(!SLASH_P (*dir) && ROOTED_P (dir) && len <= 3) /* "d:/" */
>   #endif
>   	  )
>   	len--;
> --- 3644,3656 ----
>   #endif
>   
>     len = strlen (dir);
> !   if (SLASH_P (dir[len - 1]))
>       {
>         /* Remove the trailing slash unless this is a root directory
> !          (including a drive letter on non-Unix systems).  */
> !       if (!(len == 1)		/* "/" */
>   #if defined(_WIN32) || defined(__MSDOS__)
> ! 	  && !(!SLASH_P (*dir) && ROOTED_P (dir) && len <= 3)	/* "d:/" */
>   #endif
>   	  )
>   	len--;

The above hunk (and a few more like it) worries me: it replaces TABs
with spaces.  Is that a requirement of the GDB sources?  That would
mean we are working against the default GNU indentation style, which
I'd really hate to do.  I understand that the indent program is not
the reason for these changes.  If so, then why do we need them?


More information about the Gdb-patches mailing list