summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkPack.c14
-rw-r--r--generic/tkWindow.c4
-rw-r--r--unix/tkUnixScale.c6
-rw-r--r--win/tkWinFont.c21
-rw-r--r--win/tkWinMenu.c8
-rw-r--r--xlib/xcolors.c4
6 files changed, 29 insertions, 28 deletions
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 01ee852..eeb538a 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPack.c,v 1.10 2001/09/17 23:16:26 dgp Exp $
+ * RCS: @(#) $Id: tkPack.c,v 1.11 2001/09/21 21:34:10 hobbs Exp $
*/
#include "tkPort.h"
@@ -1214,19 +1214,19 @@ PackAfter(interp, prevPtr, masterPtr, objc, objv)
c = curOpt[0];
if ((c == 't')
- && (strncmp(curOpt, "top", length)) == 0) {
+ && (strncmp(curOpt, "top", (size_t) length)) == 0) {
packPtr->side = TOP;
} else if ((c == 'b')
- && (strncmp(curOpt, "bottom", length)) == 0) {
+ && (strncmp(curOpt, "bottom", (size_t) length)) == 0) {
packPtr->side = BOTTOM;
} else if ((c == 'l')
- && (strncmp(curOpt, "left", length)) == 0) {
+ && (strncmp(curOpt, "left", (size_t) length)) == 0) {
packPtr->side = LEFT;
} else if ((c == 'r')
- && (strncmp(curOpt, "right", length)) == 0) {
+ && (strncmp(curOpt, "right", (size_t) length)) == 0) {
packPtr->side = RIGHT;
} else if ((c == 'e')
- && (strncmp(curOpt, "expand", length)) == 0) {
+ && (strncmp(curOpt, "expand", (size_t) length)) == 0) {
packPtr->flags |= EXPAND;
} else if ((c == 'f')
&& (strcmp(curOpt, "fill")) == 0) {
@@ -1264,7 +1264,7 @@ PackAfter(interp, prevPtr, masterPtr, objc, objv)
packPtr->iPadY = 0;
index++;
} else if ((c == 'f') && (length > 1)
- && (strncmp(curOpt, "frame", length) == 0)) {
+ && (strncmp(curOpt, "frame", (size_t) length) == 0)) {
if (optionCount < (index+2)) {
Tcl_AppendResult(interp, "wrong # args: \"frame\" ",
"option must be followed by anchor point",
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 6869980..3a9f911 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.35 2001/08/21 20:21:36 pspjuth Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.36 2001/09/21 21:34:10 hobbs Exp $
*/
#include "tkPort.h"
@@ -1121,7 +1121,7 @@ Tk_CreateWindowFromPath(interp, tkwin, pathName, screenName)
"\"", (char *) NULL);
return NULL;
}
- numChars = p-pathName;
+ numChars = (int) (p-pathName);
if (numChars > FIXED_SPACE) {
p = (char *) ckalloc((unsigned) (numChars+1));
} else {
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c
index 8cda9cc..f8d3313 100644
--- a/unix/tkUnixScale.c
+++ b/unix/tkUnixScale.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixScale.c,v 1.7 2001/07/03 06:08:33 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixScale.c,v 1.8 2001/09/21 21:34:10 hobbs Exp $
*/
#include "tkScale.h"
@@ -271,7 +271,7 @@ DisplayVerticalValue(scalePtr, drawable, value, rightEdge)
Tk_GetFontMetrics(scalePtr->tkfont, &fm);
y = TkScaleValueToPixel(scalePtr, value) + fm.ascent/2;
sprintf(valueString, scalePtr->format, value);
- length = strlen(valueString);
+ length = (int) strlen(valueString);
width = Tk_TextWidth(scalePtr->tkfont, valueString, length);
/*
@@ -488,7 +488,7 @@ DisplayHorizontalValue(scalePtr, drawable, value, top)
Tk_GetFontMetrics(scalePtr->tkfont, &fm);
y = top + fm.ascent;
sprintf(valueString, scalePtr->format, value);
- length = strlen(valueString);
+ length = (int) strlen(valueString);
width = Tk_TextWidth(scalePtr->tkfont, valueString, length);
/*
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index b84c836..98a0545 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinFont.c,v 1.12 2000/08/29 21:00:13 ericm Exp $
+ * RCS: @(#) $Id: tkWinFont.c,v 1.13 2001/09/21 21:34:10 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -648,7 +648,7 @@ Tk_MeasureChars(
if (thisSubFontPtr != lastSubFontPtr) {
familyPtr = lastSubFontPtr->familyPtr;
Tcl_UtfToExternalDString(familyPtr->encoding, source,
- p - source, &runString);
+ (int) (p - source), &runString);
(*familyPtr->getTextExtentPoint32Proc)(hdc,
Tcl_DStringValue(&runString),
Tcl_DStringLength(&runString) >> familyPtr->isWideFont,
@@ -663,8 +663,8 @@ Tk_MeasureChars(
p = next;
}
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source,
- &runString);
+ Tcl_UtfToExternalDString(familyPtr->encoding, source,
+ (int) (p - source), &runString);
(*familyPtr->getTextExtentPoint32Proc)(hdc,
Tcl_DStringValue(&runString),
Tcl_DStringLength(&runString) >> familyPtr->isWideFont,
@@ -710,8 +710,9 @@ Tk_MeasureChars(
lastSubFontPtr = thisSubFontPtr;
}
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternal(NULL, familyPtr->encoding, p, next - p,
- 0, NULL, buf, sizeof(buf), NULL, &dstWrote, NULL);
+ Tcl_UtfToExternal(NULL, familyPtr->encoding, p,
+ (int) (next - p), 0, NULL, buf, sizeof(buf), NULL,
+ &dstWrote, NULL);
(*familyPtr->getTextExtentPoint32Proc)(hdc, buf,
dstWrote >> familyPtr->isWideFont, &size);
newX += size.cx;
@@ -767,7 +768,7 @@ Tk_MeasureChars(
}
curX = termX;
- curByte = term - source;
+ curByte = (int) (term - source);
}
SelectObject(hdc, oldFont);
@@ -950,7 +951,7 @@ MultiFontTextOut(
if (p > source) {
familyPtr = lastSubFontPtr->familyPtr;
Tcl_UtfToExternalDString(familyPtr->encoding, source,
- p - source, &runString);
+ (int) (p - source), &runString);
(*familyPtr->textOutProc)(hdc, x, y,
Tcl_DStringValue(&runString),
Tcl_DStringLength(&runString) >> familyPtr->isWideFont);
@@ -969,8 +970,8 @@ MultiFontTextOut(
}
if (p > source) {
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source,
- &runString);
+ Tcl_UtfToExternalDString(familyPtr->encoding, source,
+ (int) (p - source), &runString);
(*familyPtr->textOutProc)(hdc, x, y, Tcl_DStringValue(&runString),
Tcl_DStringLength(&runString) >> familyPtr->isWideFont);
Tcl_DStringFree(&runString);
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 05dc421..3108ccc 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinMenu.c,v 1.14 2001/04/04 18:37:18 hobbs Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.15 2001/09/21 21:34:10 hobbs Exp $
*/
#define OEMRESOURCE
@@ -481,7 +481,7 @@ GetEntryText(mePtr)
Tcl_DStringAppend(&itemString, "&", 1);
}
next = Tcl_UtfNext(p);
- Tcl_DStringAppend(&itemString, p, next - p);
+ Tcl_DStringAppend(&itemString, p, (int) (next - p));
}
if (mePtr->accelLength > 0) {
Tcl_DStringAppend(&itemString, "\t", 1);
@@ -490,7 +490,7 @@ GetEntryText(mePtr)
Tcl_DStringAppend(&itemString, "&", 1);
}
next = Tcl_UtfNext(p);
- Tcl_DStringAppend(&itemString, p, next - p);
+ Tcl_DStringAppend(&itemString, p, (int) (next - p));
}
}
@@ -1716,7 +1716,7 @@ DrawMenuUnderline(
Tk_UnderlineChars(menuPtr->display, d,
gc, tkfont, label, x + mePtr->indicatorSpace,
y + (height + fmPtr->ascent - fmPtr->descent) / 2,
- start - label, end - label);
+ (int) (start - label), (int) (end - label));
}
}
diff --git a/xlib/xcolors.c b/xlib/xcolors.c
index f345e08..628ae13 100644
--- a/xlib/xcolors.c
+++ b/xlib/xcolors.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: xcolors.c,v 1.3 2000/03/02 23:53:26 hobbs Exp $
+ * RCS: @(#) $Id: xcolors.c,v 1.4 2001/09/21 21:34:10 hobbs Exp $
*/
#include <tkInt.h>
@@ -887,7 +887,7 @@ XParseColor(display, map, spec, colorPtr)
char fmt[16];
int i, red, green, blue;
- if ((i = strlen(spec+1))%3) {
+ if ((i = (int) strlen(spec+1))%3) {
return 0;
}
i /= 3;