Date: Wed, 20 Jan 2010 10:08:43 +0300 From: Andrey Chernov <ache@nagual.pp.ru> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r202572 - head/lib/libc/gen Message-ID: <20100120070843.GA45937@nagual.pp.ru> In-Reply-To: <20100120012639.B67517@delplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100120070843.GA45937>