summaryrefslogtreecommitdiffstats
path: root/win/tkWinFont.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinFont.c')
-rw-r--r--win/tkWinFont.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 451dc68..b0013a0 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -299,8 +299,8 @@ TkpGetNativeFont(
}
tkwin = (Tk_Window) ((TkWindow *) tkwin)->mainPtr->winPtr;
- fontPtr = ckalloc(sizeof(WinFont));
- InitFont(tkwin, GetStockObject(object), 0, fontPtr);
+ fontPtr = (WinFont *)ckalloc(sizeof(WinFont));
+ InitFont(tkwin, (HFONT)GetStockObject(object), 0, fontPtr);
return (TkFont *) fontPtr;
}
@@ -557,7 +557,7 @@ TkpGetFontFromAttributes(
hFont = GetScreenFont(faPtr, faceName,
(int)(TkFontGetPixels(tkwin, faPtr->size) + 0.5), 0.0);
if (tkFontPtr == NULL) {
- fontPtr = ckalloc(sizeof(WinFont));
+ fontPtr = (WinFont *)ckalloc(sizeof(WinFont));
} else {
fontPtr = (WinFont *) tkFontPtr;
ReleaseFont(fontPtr);
@@ -660,6 +660,8 @@ WinFontFamilyEnumProc(
WCHAR *faceName = lfPtr->elfLogFont.lfFaceName;
Tcl_Obj *resultObj = (Tcl_Obj *) lParam;
Tcl_DString faceString;
+ (void)tmPtr;
+ (void)fontType;
Tcl_DStringInit(&faceString);
Tcl_WCharToUtfDString(faceName, wcslen(faceName), &faceString);
@@ -1079,6 +1081,7 @@ Tk_DrawChars(
HDC dc;
WinFont *fontPtr;
TkWinDCState state;
+ (void)tkfont;
fontPtr = (WinFont *) gc->font;
display->request++;
@@ -1227,6 +1230,7 @@ TkDrawAngledChars(
HDC dc;
WinFont *fontPtr;
TkWinDCState state;
+ (void)tkfont;
fontPtr = (WinFont *) gc->font;
display->request++;
@@ -1742,8 +1746,9 @@ AllocFontFamily(
Tcl_DString faceString;
Tcl_Encoding encoding;
WCHAR buf[LF_FACESIZE];
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ (void)base;
hFont = SelectObject(hdc, hFont);
GetTextFaceW(hdc, LF_FACESIZE, buf);
@@ -1761,7 +1766,7 @@ AllocFontFamily(
}
}
- familyPtr = ckalloc(sizeof(FontFamily));
+ familyPtr = (FontFamily *)ckalloc(sizeof(FontFamily));
memset(familyPtr, 0, sizeof(FontFamily));
familyPtr->nextPtr = tsdPtr->fontFamilyList;
tsdPtr->fontFamilyList = familyPtr;
@@ -2044,6 +2049,8 @@ WinFontCanUseProc(
SubFont *subFontPtr;
Tcl_DString faceString;
Tcl_DString *nameTriedPtr;
+ (void)tmPtr;
+ (void)fontType;
canUsePtr = (CanUse *) lParam;
ch = canUsePtr->ch;
@@ -2183,7 +2190,7 @@ FontMapLoadPage(
USHORT *startCount, *endCount;
char buf[16], src[4];
- subFontPtr->fontMap[row] = ckalloc(FONTMAP_BITSPERPAGE / 8);
+ subFontPtr->fontMap[row] = (char *)ckalloc(FONTMAP_BITSPERPAGE / 8);
memset(subFontPtr->fontMap[row], 0, FONTMAP_BITSPERPAGE / 8);
familyPtr = subFontPtr->familyPtr;
@@ -2414,7 +2421,7 @@ CanUseFallback(
if (fontPtr->numSubFonts >= SUBFONT_SPACE) {
SubFont *newPtr;
- newPtr = ckalloc(sizeof(SubFont) * (fontPtr->numSubFonts + 1));
+ newPtr = (SubFont *)ckalloc(sizeof(SubFont) * (fontPtr->numSubFonts + 1));
memcpy(newPtr, fontPtr->subFontArray,
fontPtr->numSubFonts * sizeof(SubFont));
if (fontPtr->subFontArray != fontPtr->staticSubFonts) {
@@ -2558,6 +2565,11 @@ WinFontExistProc(
int fontType, /* Type of font (not used). */
LPARAM lParam) /* EnumFontData to hold result. */
{
+ (void)lfPtr;
+ (void)tmPtr;
+ (void)fontType;
+ (void)lParam;
+
return 0;
}
@@ -2766,8 +2778,8 @@ LoadFontRanges(
segCount = subTable.segment.segCountX2 / 2;
cbData = segCount * sizeof(USHORT);
- startCount = ckalloc(cbData);
- endCount = ckalloc(cbData);
+ startCount = (USHORT *)ckalloc(cbData);
+ endCount = (USHORT *)ckalloc(cbData);
offset = encTable.offset + sizeof(subTable.segment);
GetFontData(hdc, cmapKey, (DWORD) offset, endCount, cbData);
@@ -2810,8 +2822,8 @@ LoadFontRanges(
segCount = 1;
cbData = segCount * sizeof(USHORT);
- startCount = ckalloc(cbData);
- endCount = ckalloc(cbData);
+ startCount = (USHORT *)ckalloc(cbData);
+ endCount = (USHORT *)ckalloc(cbData);
startCount[0] = 0x0000;
endCount[0] = 0x00ff;
}