Eric Blake <[EMAIL PROTECTED]> writes:

>> Also, what's the point of DIRECTORY_SEPARATOR?  Can't we just use '/'?
>
> I kept it with DIRECTORY_SEPARATOR, in case the application sets
> DIRECTORY_SEPARATOR to '\\' in config.h; after all, systems with drive
> letters have users that are used to the backslash.  But I don't have any
> problem with hard-coding it to '/' if others agree.  Or should I change it
> to check ISSLASH (base[-1]), in which case use the existing spelling?  So
> for 'a/b:c', use './b:c', for 'a\b:c', use '.\b:c', and for 'a:b:c', use
> './b:c'?

I'd rather keep the code simpler, even if it causes the file names to
use '/' rather than '\'.  (That's why I prefer '/' to
DIRECTORY_SEPARATOR.)


> +                 ? (DOUBLE_SLASH_IS_DISTINCT_ROOT
> +                    && ISSLASH (file[1]) && ! ISSLASH (file[2])
> +                    ? 2 : 1)

A minor point: the if-part needs parenthesization, so that the '&&'
and the '?' do not have equal indentation (which is misleading).


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to