Eric Blake <[EMAIL PROTECTED]> writes:
> My approach was to add a dependency on the c-ctype module to use c_isalpha
That seems a bit overkill here, since you can assume ASCII and DOS.
Why not use this instead?
#define c_isalpha(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' <= 'z' - 'a')
Or perhaps there's some DOS thingy you can use that does something similar.
> Second, cygwin currently normalizes all drive letters as absolute paths,
> which is different from djgpp
Sigh. This stuff will probably break a lot of code, not just dirname.
Do we really want to bother with it? Perhaps we should just tell
users not to mess with names like "c:foo". I assume they're pretty
rare. Will that simplify the code here and elsewhere?
> + {
> + if (prefix_len)
> + base = p;
> + else if (! DOUBLE_SLASH_IS_DISTINCT_ROOT || 2 < p - base)
> + base = p - 1;
> + }
This code doesn't seem to match the new comments for basename.
Furthermore, I don't see why the basename of "A:/" should be "/". or
the basename of "//" should be "//". The point of basename and
dirname is that if you concatenate them, with a slash between them,
then you get the same file. But I don't see how this rule generalizes
to DOS under the proposed code.
Many of the rest of the changes look pretty complicated, and I didn't
take the time to review them, since I want to know what dirname and
basename are supposed to do before worrying about the details.
_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib