svn commit: r202572 - head/lib/libc/gen
Andrey Chernov
ache at nagual.pp.ru
Wed Jan 20 07:08:46 UTC 2010
On Wed, Jan 20, 2010 at 01:42:08AM +1100, Bruce Evans wrote:
> The comment was correct. It says that POSIX requires strcoll() for
> alphasort(), not for opendir(). Since opendir() is not alphasort(),
> and it wants plain ASCII sorting to support union file systems, it
> intentionally doesn't use either alphasort() or strcoll().
Yes, the comment _alone_ was correct, but its place - isn't. Along with
function name containing _alphasort part it makes impression that
opendir() uses this type of sort too.
BTW, we already have the same correct comment but in the proper place in
the scandir.c
> Was correct, but it could have been clearer by saying ", so opendir()
> uses this comparison function instead of alphasort()".
"So", what? The two mentioned things are unrelated and can't be
concatenated by "so".
> I forget what the old name was. Having alphasort in the name here was
> wrong 3 layers deep, since this is not alphasort(), and alphasort() is not
> an alpha sorting function -- it is a lexicographically-on-the-whole-
> character-set comparison function.
Yes.
> Correct modulo the name.
What name you suggest, opendir_compar()?
> New bug in a comment in scandir(): now has an extra blank line, due to
> partial removal.
Ok, will remove it a bit later.
--
http://ache.pp.ru/
More information about the svn-src-head
mailing list