diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-05-22 13:07:33 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-05-22 13:07:33 (GMT) |
commit | 0e1a083787efebde534b0323ba4cca840630fe71 (patch) | |
tree | 21c32e456ae1ff62b2dbb1b4861118c3330a60c3 /generic/tclCmdIL.c | |
parent | 6ede2e9a9c11a27ad6be06a3eceda2f98be8f8d5 (diff) | |
parent | a515427b5b0f2be828866a2073b4720681e10e0d (diff) | |
download | tcl-0e1a083787efebde534b0323ba4cca840630fe71.zip tcl-0e1a083787efebde534b0323ba4cca840630fe71.tar.gz tcl-0e1a083787efebde534b0323ba4cca840630fe71.tar.bz2 |
[3613609]: Replace strcasecmp() with UTF-8-aware version.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r-- | generic/tclCmdIL.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index c70ba23..ac317e0 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -3005,7 +3005,7 @@ Tcl_LsearchObjCmd( dataType = INTEGER; break; case LSEARCH_NOCASE: /* -nocase */ - strCmpFn = strcasecmp; + strCmpFn = TclUtfCasecmp; noCase = 1; break; case LSEARCH_NOT: /* -not */ @@ -3400,7 +3400,7 @@ Tcl_LsearchObjCmd( */ if (noCase) { - match = (strcasecmp(bytes, patternBytes) == 0); + match = (TclUtfCasecmp(bytes, patternBytes) == 0); } else { match = (memcmp(bytes, patternBytes, (size_t) length) == 0); @@ -3991,7 +3991,7 @@ Tcl_LsortObjCmd( goto done1; } elementArray[i].collationKey.intValue = a; - } else if (sortInfo.sortMode == SORTMODE_REAL) { + } else if (sortMode == SORTMODE_REAL) { double a; if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr, @@ -4088,7 +4088,7 @@ Tcl_LsortObjCmd( TclStackFree(interp, elementArray); done: - if (sortInfo.sortMode == SORTMODE_COMMAND) { + if (sortMode == SORTMODE_COMMAND) { TclDecrRefCount(sortInfo.compareCmdPtr); TclDecrRefCount(listObj); sortInfo.compareCmdPtr = NULL; @@ -4233,7 +4233,7 @@ SortCompare( order = strcmp(elemPtr1->collationKey.strValuePtr, elemPtr2->collationKey.strValuePtr); } else if (infoPtr->sortMode == SORTMODE_ASCII_NC) { - order = strcasecmp(elemPtr1->collationKey.strValuePtr, + order = TclUtfCasecmp(elemPtr1->collationKey.strValuePtr, elemPtr2->collationKey.strValuePtr); } else if (infoPtr->sortMode == SORTMODE_DICTIONARY) { order = DictionaryCompare(elemPtr1->collationKey.strValuePtr, |