diff options
-rw-r--r-- | generic/tkSelect.c | 4 | ||||
-rw-r--r-- | generic/tkTextIndex.c | 4 | ||||
-rw-r--r-- | win/tkWinMenu.c | 7 |
3 files changed, 8 insertions, 7 deletions
diff --git a/generic/tkSelect.c b/generic/tkSelect.c index 449dc1d..a9064df 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -1399,12 +1399,12 @@ HandleTclCommand( cmdInfoPtr->charOffset += Tcl_NumUtfChars(string, -1); cmdInfoPtr->buffer[0] = '\0'; } else { - int ch; + Tcl_UniChar ch = 0; p = string; string += count; numChars = 0; while (p < string) { - p += TkUtfToUniChar(p, &ch); + p += Tcl_UtfToUniChar(p, &ch); numChars++; } cmdInfoPtr->charOffset += numChars; diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 7d55331..ade889b 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -480,7 +480,7 @@ TkTextMakeCharIndex( TkTextSegment *segPtr; char *p, *start, *end; int index, offset; - int ch; + Tcl_UniChar ch = 0; indexPtr->tree = tree; if (lineIndex < 0) { @@ -527,7 +527,7 @@ TkTextMakeCharIndex( return indexPtr; } charIndex--; - offset = TkUtfToUniChar(p, &ch); + offset = Tcl_UtfToUniChar(p, &ch); index += offset; } } else { diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 02daf16..24e64f1 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -511,7 +511,7 @@ GetEntryText( : Tcl_GetString(mePtr->accelPtr); const char *p, *next; Tcl_DString itemString; - int ch; + Tcl_UniChar ch = 0; /* * We have to construct the string with an ampersand preceeding the @@ -528,16 +528,17 @@ GetEntryText( if (*p == '&') { Tcl_DStringAppend(&itemString, "&", 1); } - next = p + TkUtfToUniChar(p, &ch); + next = p + Tcl_UtfToUniChar(p, &ch); Tcl_DStringAppend(&itemString, p, (int) (next - p)); } + ch = 0; if (mePtr->accelLength > 0) { Tcl_DStringAppend(&itemString, "\t", 1); for (p = accel, i = 0; *p != '\0'; i++, p = next) { if (*p == '&') { Tcl_DStringAppend(&itemString, "&", 1); } - next = p + TkUtfToUniChar(p, &ch); + next = p + Tcl_UtfToUniChar(p, &ch); Tcl_DStringAppend(&itemString, p, (int) (next - p)); } } |