Use built-in istr[n]cmp() instead of strcase[n]cmp()

This avoids the problem that MSVC does not provide strcasecmp() nor
strncasecmp(), and at the same time avoids potential problems due to
locale configuration by using istrcmp() and istrncmp() which are
already in the source tree and written to cover only ASCII.
master
Adrian Perez de Castro 2019-08-05 15:59:20 +03:00 committed by Ran Benita
parent 34122f9f06
commit a8acc2ff5c
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ xkb_keysym_from_name(const char *s, enum xkb_keysym_flags flags)
* no separating underscore, while some XF86* syms in the latter did.
* As a last ditch effort, try without. */
if (strncmp(s, "XF86_", 5) == 0 ||
(icase && strncasecmp(s, "XF86_", 5) == 0)) {
(icase && istrncmp(s, "XF86_", 5) == 0)) {
xkb_keysym_t ret;
tmp = strdup(s);
if (!tmp)