diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-27 20:35:49 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-27 20:35:49 -0700 |
commit | 8a7b707f6f841655498c753701ee38f12ba630cf (patch) | |
tree | a639131e433fe2d21e52f944786198bb758a99b9 /utils.c | |
parent | e144ec9018cabd1d9904fb6d04382d2cf06ec3dc (diff) |
Replace uStrCaseCmp() with direct calls to strcasecmp()
strcasecmp is available in Unix98 and later, so part of the X.Org base
platform requirements.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 31 |
1 files changed, 0 insertions, 31 deletions
@@ -144,34 +144,3 @@ uInternalError(const char *s, ...) va_end(ap); return; } - -/***====================================================================***/ - -#ifndef HAVE_STRCASECMP -int -uStrCaseCmp(const char *str1, const char *str2) -{ - char buf1[512], buf2[512]; - char c, *s; - - register int n; - - for (n = 0, s = buf1; (c = *str1++); n++) { - if (isupper(c)) - c = tolower(c); - if (n > 510) - break; - *s++ = c; - } - *s = '\0'; - for (n = 0, s = buf2; (c = *str2++); n++) { - if (isupper(c)) - c = tolower(c); - if (n > 510) - break; - *s++ = c; - } - *s = '\0'; - return (strcmp(buf1, buf2)); -} -#endif |