diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2007-11-17 23:07:45 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2007-11-17 23:07:45 (GMT) |
commit | 564fb4d84402fcf9765bc3e2319aa11e4cdd8030 (patch) | |
tree | 23a7a36869acb014ae54c3af70058f4134ecac67 /generic/tkEntry.c | |
parent | cd3db4fab4487f93d083f8de89bfe41a4556b090 (diff) | |
download | tk-564fb4d84402fcf9765bc3e2319aa11e4cdd8030.zip tk-564fb4d84402fcf9765bc3e2319aa11e4cdd8030.tar.gz tk-564fb4d84402fcf9765bc3e2319aa11e4cdd8030.tar.bz2 |
Tidy up some variable types.
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index ae0500c..30b525b 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEntry.c,v 1.45 2007/05/24 14:46:24 dkf Exp $ + * RCS: @(#) $Id: tkEntry.c,v 1.46 2007/11/17 23:07:45 patthoyts Exp $ */ #include "tkInt.h" @@ -2008,7 +2008,9 @@ InsertChars( char *value) /* New characters to add (NULL-terminated * string). */ { - int byteIndex, byteCount, oldChars, charsAdded, newByteCount; + ptrdiff_t byteIndex; + size_t byteCount, newByteCount; + int oldChars, charsAdded; CONST char *string; char *newStr; @@ -2021,7 +2023,7 @@ InsertChars( newByteCount = entryPtr->numBytes + byteCount + 1; newStr = (char *) ckalloc((unsigned) newByteCount); - memcpy(newStr, string, (size_t) byteIndex); + memcpy(newStr, string, byteIndex); strcpy(newStr + byteIndex, value); strcpy(newStr + byteIndex + byteCount, string + byteIndex); |