Re: [AD] SF.net SVN: alleg:[11050] allegro/branches/4.9/src |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-10-11, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> On 11 Oct 2008, at 15:27, Peter Hull wrote:
> > Sounds like a good idea if you can figure out how to do it!
>
> Should be as simple as checking whether it exists or not, or even
> fall back to it if stricmp is not found. I think one could even do
> #define stricmp strcasecmp.
> The manpage says strcasecmp is POSIX, so maybe it's more portable
> than stricmp?
Yes.
strcasecmp() is also locale-dependent. Internally, we only ever care
about ignoring case in [A-Za-z] and any locale should be fine for that.
But it might be cleaner to have a dedicated _al_stricmp_ascii() and use
that, rather than having potentially different behaviour depending on
whether we're using strcasecmp [in some locale], our "emulation" of
stricmp [locale independent], stricmp [who knows?].
Peter