ptr_t

John Tytgat John.Tytgat at aaug.net
Thu Feb 7 16:17:00 PST 2002


In message <m3y9i5eg85.fsf at nick.ws.noc.dsvr.net>
          Nick Burrett <nick at dsvr.net> wrote:

> I'm not convinved that alphasort should use strcoll over strcmp since
> I don't think locales are relevant under RISC OS filesystems.

Unfortunately.  On page 2-10 of the PRM, we can read:

"FileSwitch makes no distinction between upper and lower case, although
filing systems can do so.  As a general rule, you should not use
top-bit-set characters in filenames, although some filing systems (such
as FileCore-based ones) support them."

IMHO making FileSwitch case*in*sensitive is a design mistake and
currently it uses the *current* (yeuh) Territory to do fileinfo caching
based on case*in*senstive filename lookups :-(.  And I don't
believe the "although filing systems can do so" bit as when the
FileSwitch caching is case*in*sensitive, how can a real FS sitting on
FileSwitch be casesensitive ? During the development of at least two
different FS I had (small) problems with this issue (think of : "check
'file.txt' exists -> no, but when 'File.txt' *does* exist, a subsequent
check for this will also result in "no" and the real FS never gets a
change to say "yes" for 'File.txt').

Anyway, enough ranting, I would indeed advocate the use of strcmp() instead
of strcoll() here. ;-)

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven



More information about the gcc mailing list