summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-09-21 21:34:10 (GMT)
committerhobbs <hobbs>2001-09-21 21:34:10 (GMT)
commit412b35142e73d8049d527706ee3da7c144699e53 (patch)
tree583cc81aad13aec41709aa168d6716a5ab8c4b0a /win
parent30d712282f4193c9a32da3dc31aef38bdca5ab22 (diff)
downloadtk-412b35142e73d8049d527706ee3da7c144699e53.zip
tk-412b35142e73d8049d527706ee3da7c144699e53.tar.gz
tk-412b35142e73d8049d527706ee3da7c144699e53.tar.bz2
minor cast fixes to prevent 64bit warnings
Diffstat (limited to 'win')
-rw-r--r--win/tkWinFont.c21
-rw-r--r--win/tkWinMenu.c8
2 files changed, 15 insertions, 14 deletions
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));
}
}