Re: [RFA/libiberty] Fix documentation issues in filename_cmp.c

Joel Brobecker
2007-04-06T06:10:53Z

Eli,

> > 2007-04-05 Joel Brobecker <brobecker@adacore.com>
> >
> > * filename_cmp.c (filename_cmp): Improve documentation.
>
> Thanks, I am happy, as far as the documentation goes.

Am I to understand that you are not happy with the code?

You made two comments about the code:

1. Fold multiple consecutive slash/backslash characters into
single slash/backslash;

To do that without modifying the source filenames, we need to
allocate some memory locally to manipulate a copy of that filename.
My take on this is that the file names we have seen, at least in
the debugging information, have been consistent; and thus this
enhancement would end up having no actual effect. I would wait
until we come across a case where this is a problem before
going that way. This is my opinion, and you may disagree...

Note that this new function does pave the way for this sort
of enhancement though, and I promise I will not object to a patch
that implements your suggestion ;-).

2. The possible introduction of a bug with certain locales because
the function used in place of strcasecmp uses tolower.

For this one, as I said, I don't know, and I'm not sure where
to start looking for the answer. I'll be happy to modify the
function body to do it any other way, if someone tells me how.

--
Joel