This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]