I just noticed that the comments for mbspcasecmp are wrong:
/* Compare the initial segment of the character string STRING consisting of
at most mbslen (PREFIX) characters with the character string PREFIX,
ignoring case, returning less than, equal to or greater than zero if
this
initial segment is lexicographically less than, equal to or greater than
PREFIX.
Note: This function may, in multibyte locales, return 0 if STRING is of
smaller length than PREFIX! */
char *
mbspcasecmp (const char *string, const char *prefix)
If I'm reading the code currectly, the actual result is NULL if no
match, or a pointer into string corresponding to the next byte after the
end of matched prefix.
--
Eric Blake ebl...@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org