summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-01-11 15:35:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-01-11 15:35:39 (GMT)
commita7b45de808c4bca805fab7b4eb90aa6e6f09e2ac (patch)
tree9afda096b9165b4f20fb70975876d2bf0c1c2c29 /generic/ttk
parenta46a8df372318c40d2d0c346578eef7412a7b257 (diff)
downloadtk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.zip
tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.gz
tk-a7b45de808c4bca805fab7b4eb90aa6e6f09e2ac.tar.bz2
Many minute fixes to reduce number of minor warnings from GCC.
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttkClamTheme.c59
-rw-r--r--generic/ttk/ttkDefaultTheme.c11
-rw-r--r--generic/ttk/ttkElements.c7
-rw-r--r--generic/ttk/ttkEntry.c25
-rw-r--r--generic/ttk/ttkLabel.c8
-rw-r--r--generic/ttk/ttkLayout.c4
-rw-r--r--generic/ttk/ttkManager.c18
-rw-r--r--generic/ttk/ttkNotebook.c13
-rw-r--r--generic/ttk/ttkTagSet.c6
-rw-r--r--generic/ttk/ttkTheme.c4
-rw-r--r--generic/ttk/ttkTreeview.c6
11 files changed, 86 insertions, 75 deletions
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index 188e8a0..0638e52 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkClamTheme.c,v 1.3 2006/12/13 17:06:32 jenglish Exp $
+ * $Id: ttkClamTheme.c,v 1.4 2007/01/11 15:35:39 dkf Exp $
*
* Copyright (C) 2004 Joe English
*
@@ -324,16 +324,22 @@ RadioIndicatorElementDraw(
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &padding);
b = Ttk_PadBox(b, padding);
- XFillArc(Tk_Display(tkwin),d,gcb, b.x,b.y,b.width,b.height, 0,360*64);
- XDrawArc(Tk_Display(tkwin),d,gcl, b.x,b.y,b.width,b.height, 225*64,180*64);
- XDrawArc(Tk_Display(tkwin),d,gcu, b.x,b.y,b.width,b.height, 45*64,180*64);
+ XFillArc(Tk_Display(tkwin),d,gcb,
+ b.x,b.y,(unsigned)b.width,(unsigned)b.height, 0,360*64);
+ XDrawArc(Tk_Display(tkwin),d,gcl,
+ b.x,b.y,(unsigned)b.width,(unsigned)b.height, 225*64,180*64);
+ XDrawArc(Tk_Display(tkwin),d,gcu,
+ b.x,b.y,(unsigned)b.width,(unsigned)b.height, 45*64,180*64);
if (state & TTK_STATE_SELECTED) {
b = Ttk_PadBox(b,Ttk_UniformPadding(3));
- XFillArc(Tk_Display(tkwin),d,gcf, b.x,b.y,b.width,b.height, 0,360*64);
- XDrawArc(Tk_Display(tkwin),d,gcf, b.x,b.y,b.width,b.height, 0,360*64);
+ XFillArc(Tk_Display(tkwin),d,gcf,
+ b.x,b.y,(unsigned)b.width,(unsigned)b.height, 0,360*64);
+ XDrawArc(Tk_Display(tkwin),d,gcf,
+ b.x,b.y,(unsigned)b.width,(unsigned)b.height, 0,360*64);
#if WIN32_XDRAWLINE_HACK
- XDrawArc(Tk_Display(tkwin),d,gcf, b.x,b.y,b.width,b.height, 300*64,360*64);
+ XDrawArc(Tk_Display(tkwin),d,gcf,
+ b.x,b.y,(unsigned)b.width,(unsigned)b.height, 300*64,360*64);
#endif
}
}
@@ -355,9 +361,10 @@ CheckIndicatorElementDraw(
Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &padding);
b = Ttk_PadBox(b, padding);
- XFillRectangle(display,d,gcb, b.x,b.y,b.width,b.height);
- XDrawLine(display,d,gcl,b.x,b.y+b.height,b.x+b.width+w,b.y+b.height);/*S*/
- XDrawLine(display,d,gcl,b.x+b.width,b.y,b.x+b.width,b.y+b.height+w); /*E*/
+ XFillRectangle(display,d,gcb, b.x,b.y,
+ (unsigned)b.width,(unsigned)b.height);
+ XDrawLine(display,d,gcl, b.x,b.y+b.height,b.x+b.width+w,b.y+b.height);/*S*/
+ XDrawLine(display,d,gcl, b.x+b.width,b.y,b.x+b.width,b.y+b.height+w); /*E*/
XDrawLine(display,d,gcu,b.x,b.y, b.x,b.y+b.height+w); /*W*/
XDrawLine(display,d,gcu,b.x,b.y, b.x+b.width+w,b.y); /*N*/
@@ -586,8 +593,10 @@ static void TroughElementDraw(
ScrollbarElement *sb = elementRecord;
GC gcb = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
GC gct = Ttk_GCForColor(tkwin,sb->troughColorObj,d);
- XFillRectangle(Tk_Display(tkwin), d, gct, b.x, b.y, b.width-1, b.height-1);
- XDrawRectangle(Tk_Display(tkwin), d, gcb, b.x, b.y, b.width-1, b.height-1);
+ XFillRectangle(Tk_Display(tkwin), d, gct, b.x, b.y,
+ (unsigned)b.width-1, (unsigned)b.height-1);
+ XDrawRectangle(Tk_Display(tkwin), d, gcb, b.x, b.y,
+ (unsigned)b.width-1, (unsigned)b.height-1);
}
static Ttk_ElementSpec TroughElementSpec = {
@@ -619,10 +628,10 @@ static void ThumbElementDraw(
const int w = WIN32_XDRAWLINE_HACK;
DrawSmoothBorder(tkwin, d, b,
- sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
- XFillRectangle(
- Tk_Display(tkwin), d, BackgroundGC(tkwin, sb->backgroundObj),
- b.x+2, b.y+2, b.width-4, b.height-4);
+ sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
+ XFillRectangle(Tk_Display(tkwin), d,
+ BackgroundGC(tkwin, sb->backgroundObj), b.x+2, b.y+2,
+ (unsigned)b.width-4, (unsigned)b.height-4);
/*
* Draw grip:
@@ -631,7 +640,7 @@ static void ThumbElementDraw(
Tcl_GetIntFromObj(NULL, sb->gripCountObj, &gripCount);
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
-
+
if (orient == TTK_ORIENT_HORIZONTAL) {
dx = 1; dy = 0;
x1 = x2 = b.x + b.width / 2 - gripCount;
@@ -709,14 +718,14 @@ static void PbarElementDraw(
Drawable d, Ttk_Box b, unsigned state)
{
ScrollbarElement *sb = elementRecord;
-
+
b = Ttk_PadBox(b, Ttk_UniformPadding(2));
if (b.width > 4 && b.height > 4) {
DrawSmoothBorder(tkwin, d, b,
- sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
- XFillRectangle(Tk_Display(tkwin), d,
- BackgroundGC(tkwin, sb->backgroundObj),
- b.x+2, b.y+2, b.width-4, b.height-4);
+ sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
+ XFillRectangle(Tk_Display(tkwin), d,
+ BackgroundGC(tkwin, sb->backgroundObj),
+ b.x+2, b.y+2, (unsigned)b.width-4, (unsigned)b.height-4);
}
}
@@ -754,11 +763,11 @@ static void ArrowElementDraw(
int h, cx, cy;
DrawSmoothBorder(tkwin, d, b,
- sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
+ sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
XFillRectangle(
- Tk_Display(tkwin), d, BackgroundGC(tkwin, sb->backgroundObj),
- b.x+2, b.y+2, b.width-4, b.height-4);
+ Tk_Display(tkwin), d, BackgroundGC(tkwin, sb->backgroundObj),
+ b.x+2, b.y+2, (unsigned)b.width-4, (unsigned)b.height-4);
b = Ttk_PadBox(b, Ttk_UniformPadding(3));
h = b.width < b.height ? b.width : b.height;
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index 966451e..c27591c 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -1,4 +1,4 @@
-/* $Id: ttkDefaultTheme.c,v 1.5 2006/11/21 02:21:27 jenglish Exp $
+/* $Id: ttkDefaultTheme.c,v 1.6 2007/01/11 15:35:40 dkf Exp $
*
* Copyright (c) 2003, Joe English
*
@@ -297,8 +297,8 @@ BorderElementDraw(
if (defaultState == TTK_BUTTON_DEFAULT_ACTIVE) {
GC gc = Tk_GCForColor(borderColor, d);
- XDrawRectangle(Tk_Display(tkwin), d, gc,
- b.x, b.y, b.width-1, b.height-1);
+ XDrawRectangle(Tk_Display(tkwin), d, gc,
+ b.x, b.y, (unsigned)b.width-1, (unsigned)b.height-1);
}
if (defaultState != TTK_BUTTON_DEFAULT_DISABLED) {
/* Space for default ring: */
@@ -578,11 +578,12 @@ static void IndicatorElementDraw(
/*
* Copy onto our target drawable surface.
*/
+
memset(&gcValues, 0, sizeof(gcValues));
copyGC = Tk_GetGC(tkwin, 0, &gcValues);
TkPutImage(NULL, 0, display, d, copyGC, img, 0, 0, b.x, b.y,
- spec->width, spec->height);
+ (unsigned)spec->width, (unsigned)spec->height);
/*
* Tidy up.
@@ -1084,7 +1085,7 @@ static void TreeitemIndicatorDraw(
b = Ttk_PadBox(b, padding);
XDrawRectangle(Tk_Display(tkwin), d, gc,
- b.x, b.y, b.width - 1, b.height - 1);
+ b.x, b.y, (unsigned)b.width - 1, (unsigned)b.height - 1);
cx = b.x + (b.width - 1) / 2;
cy = b.y + (b.height - 1) / 2;
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index 171058a..cb2c5b5 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -1,4 +1,4 @@
-/* $Id: ttkElements.c,v 1.4 2006/12/14 19:51:03 jenglish Exp $
+/* $Id: ttkElements.c,v 1.5 2007/01/11 15:35:40 dkf Exp $
*
* Copyright (c) 2003, Joe English
*
@@ -84,7 +84,7 @@ BackgroundElementDraw(
XFillRectangle(Tk_Display(tkwin), d,
Tk_3DBorderGC(tkwin, backgroundPtr, TK_3D_FLAT_GC),
- 0,0, Tk_Width(tkwin), Tk_Height(tkwin));
+ 0,0, (unsigned)Tk_Width(tkwin), (unsigned)Tk_Height(tkwin));
}
static Ttk_ElementSpec BackgroundElementSpec =
@@ -297,7 +297,8 @@ static void DrawFocusRing(
mask = GCForeground | GCLineStyle | GCDashList | GCDashOffset | GCLineWidth;
gc = Tk_GetGC(tkwin, mask, &gcvalues);
- XDrawRectangle(Tk_Display(tkwin), d, gc, b.x, b.y, b.width-1, b.height-1);
+ XDrawRectangle(Tk_Display(tkwin), d, gc, b.x, b.y,
+ (unsigned)b.width-1, (unsigned)b.height-1);
Tk_FreeGC(Tk_Display(tkwin), gc);
}
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 1d4d765..6ac910a 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkEntry.c,v 1.6 2007/01/11 14:49:47 jenglish Exp $
+ * $Id: ttkEntry.c,v 1.7 2007/01/11 15:35:40 dkf Exp $
*
* DERIVED FROM: tk/generic/tkEntry.c r1.35.
*
@@ -293,7 +293,7 @@ static char *EntryDisplayString(const char *showChar, int numChars)
Tcl_UtfToUniChar(showChar, &ch);
size = Tcl_UniCharToUtf(ch, buf);
- p = displayString = ckalloc(numChars * size + 1);
+ p = displayString = ckalloc((unsigned)numChars * size + 1);
while (numChars--) {
p += Tcl_UniCharToUtf(ch, p);
@@ -710,7 +710,7 @@ static void
EntryStoreValue(Entry *entryPtr, const char *value)
{
size_t numBytes = strlen(value);
- int numChars = Tcl_NumUtfChars(value, numBytes);
+ int numChars = Tcl_NumUtfChars(value, (int)numBytes);
if (entryPtr->core.flags & VALIDATING)
entryPtr->core.flags |= VALIDATION_SET_VALUE;
@@ -811,7 +811,7 @@ InsertChars(
char *string = entryPtr->entry.string;
size_t byteIndex = Tcl_UtfAtIndex(string, index) - string;
size_t byteCount = strlen(value);
- int charsAdded = Tcl_NumUtfChars(value, byteCount);
+ int charsAdded = Tcl_NumUtfChars(value, (int)byteCount);
size_t newByteCount = entryPtr->entry.numBytes + byteCount + 1;
char *new;
int code;
@@ -1245,8 +1245,9 @@ static void EntryDisplay(void *clientData, Drawable d)
Tk_SetCaretPos(tkwin, cursorX, cursorY, cursorHeight);
gc = EntryGetGC(entryPtr, es.insertColorObj);
- XFillRectangle(Tk_Display(tkwin), d, gc,
- cursorX-cursorWidth/2, cursorY, cursorWidth, cursorHeight);
+ XFillRectangle(Tk_Display(tkwin), d, gc,
+ cursorX-cursorWidth/2, cursorY,
+ (unsigned)cursorWidth, (unsigned)cursorHeight);
Tk_FreeGC(Tk_Display(tkwin), gc);
}
@@ -1297,13 +1298,13 @@ EntryIndex(
int length;
const char *string = Tcl_GetStringFromObj(indexObj, &length);
- if (strncmp(string, "end", length) == 0) {
+ if (strncmp(string, "end", (unsigned) length) == 0) {
*indexPtr = entryPtr->entry.numChars;
- } else if (strncmp(string, "insert", length) == 0) {
+ } else if (strncmp(string, "insert", (unsigned) length) == 0) {
*indexPtr = entryPtr->entry.insertPos;
- } else if (strncmp(string, "left", length) == 0) { /* for debugging */
+ } else if (strncmp(string, "left", (unsigned) length) == 0) { /* for debugging */
*indexPtr = entryPtr->entry.xscroll.first;
- } else if (strncmp(string, "right", length) == 0) { /* for debugging */
+ } else if (strncmp(string, "right", (unsigned) length) == 0) { /* for debugging */
*indexPtr = entryPtr->entry.xscroll.last;
} else if (strncmp(string, "sel.", 4) == 0) {
if (entryPtr->entry.selectFirst < 0) {
@@ -1312,9 +1313,9 @@ EntryIndex(
Tk_PathName(entryPtr->core.tkwin), NULL);
return TCL_ERROR;
}
- if (strncmp(string, "sel.first", length) == 0) {
+ if (strncmp(string, "sel.first", (unsigned) length) == 0) {
*indexPtr = entryPtr->entry.selectFirst;
- } else if (strncmp(string, "sel.last", length) == 0) {
+ } else if (strncmp(string, "sel.last", (unsigned) length) == 0) {
*indexPtr = entryPtr->entry.selectLast;
} else {
goto badIndex;
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index 777c10b..debe10c 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -1,4 +1,4 @@
-/* $Id: ttkLabel.c,v 1.5 2006/12/25 17:16:28 jenglish Exp $
+/* $Id: ttkLabel.c,v 1.6 2007/01/11 15:35:40 dkf Exp $
*
* text, image, and label elements.
*
@@ -233,7 +233,8 @@ static void ImageTextElementDraw(
return;
XFillRectangle(Tk_Display(tkwin), d,
- Tk_3DBorderGC(tkwin, bd, TK_3D_FLAT_GC), b.x, b.y, b.width, b.height);
+ Tk_3DBorderGC(tkwin, bd, TK_3D_FLAT_GC), b.x, b.y,
+ (unsigned)b.width, (unsigned)b.height);
TextDraw(text, tkwin, d, b);
TextCleanup(text);
@@ -334,7 +335,8 @@ static void StippleOver(
gcvalues.fill_style = FillStippled;
gcvalues.stipple = stipple;
gc = Tk_GetGC(tkwin, mask, &gcvalues);
- XFillRectangle(Tk_Display(tkwin),d,gc,x,y,image->width,image->height);
+ XFillRectangle(Tk_Display(tkwin),d,gc,x,y,
+ (unsigned)image->width,(unsigned)image->height);
Tk_FreeGC(Tk_Display(tkwin), gc);
Tk_FreeBitmapFromObj(tkwin, image->stippleObj);
}
diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c
index ef4f7b1..55e29f2 100644
--- a/generic/ttk/ttkLayout.c
+++ b/generic/ttk/ttkLayout.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 2003 Joe English. Freely redistributable.
*
- * $Id: ttkLayout.c,v 1.5 2006/12/10 19:19:44 jenglish Exp $
+ * $Id: ttkLayout.c,v 1.6 2007/01/11 15:35:40 dkf Exp $
*/
#include <string.h>
@@ -1073,7 +1073,7 @@ static void Ttk_DrawNodeList(
for (; node; node = node->next)
{
int border = node->flags & TTK_BORDER;
- int substate = state;
+ Ttk_State substate = state;
if (node->flags & TTK_UNIT)
substate |= node->state;
diff --git a/generic/ttk/ttkManager.c b/generic/ttk/ttkManager.c
index e41b36d..378e3cc 100644
--- a/generic/ttk/ttkManager.c
+++ b/generic/ttk/ttkManager.c
@@ -1,4 +1,4 @@
-/* $Id: ttkManager.c,v 1.1 2006/10/31 01:42:26 hobbs Exp $
+/* $Id: ttkManager.c,v 1.2 2007/01/11 15:35:40 dkf Exp $
*
* Copyright 2005, Joe English. Freely redistributable.
*
@@ -121,7 +121,7 @@ static void ManagerIdleProc(ClientData clientData)
* Recompute slave layout when master widget is resized.
* Keep the slave's map state in sync with the master's.
*/
-static const int ManagerEventMask = StructureNotifyMask;
+static const unsigned ManagerEventMask = StructureNotifyMask;
static void ManagerEventHandler(ClientData clientData, XEvent *eventPtr)
{
Ttk_Manager *mgr = clientData;
@@ -221,16 +221,16 @@ Ttk_Manager *Ttk_CreateManager(
mgr->slaves = NULL;
mgr->flags = 0;
- Tk_CreateEventHandler(
- mgr->masterWindow, ManagerEventMask, ManagerEventHandler, mgr);
+ Tk_CreateEventHandler(mgr->masterWindow, ManagerEventMask,
+ ManagerEventHandler, mgr);
return mgr;
}
void Ttk_DeleteManager(Ttk_Manager *mgr)
{
- Tk_DeleteEventHandler(
- mgr->masterWindow, ManagerEventMask, ManagerEventHandler, mgr);
+ Tk_DeleteEventHandler(mgr->masterWindow, ManagerEventMask,
+ ManagerEventHandler, mgr);
while (mgr->nSlaves > 0) {
Ttk_ForgetSlave(mgr, mgr->nSlaves - 1);
@@ -386,12 +386,12 @@ int Ttk_ConfigureSlave(
/* ASSERT: mgr->slaveOptionTable != NULL */
if (Tk_SetOptions(interp, slave->slaveData, mgr->slaveOptionTable,
- objc, objv, slave->slaveWindow, &savedOptions, &mask) != TCL_OK)
- {
+ objc, objv, slave->slaveWindow, &savedOptions, &mask) != TCL_OK) {
return TCL_ERROR;
}
- if (mgr->managerSpec->SlaveConfigured(interp,mgr,slave,mask) != TCL_OK) {
+ if (mgr->managerSpec->SlaveConfigured(interp, mgr, slave,
+ (unsigned)mask) != TCL_OK) {
Tk_RestoreSavedOptions(&savedOptions);
return TCL_ERROR;
}
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index cd5847e..43aa541 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -1,4 +1,4 @@
-/* $Id: ttkNotebook.c,v 1.6 2007/01/11 14:49:47 jenglish Exp $
+/* $Id: ttkNotebook.c,v 1.7 2007/01/11 15:35:40 dkf Exp $
* Copyright (c) 2004, Joe English
*
* NOTE-ACTIVE: activeTabIndex is not always correct (it's
@@ -672,18 +672,15 @@ static Ttk_ManagerSpec NotebookManagerSpec =
/* NotebookEventHandler --
* Tracks the active tab.
*/
-static const int NotebookEventMask
- = StructureNotifyMask
- | PointerMotionMask
- | LeaveWindowMask
- ;
+static const unsigned NotebookEventMask =
+ StructureNotifyMask | PointerMotionMask | LeaveWindowMask;
static void NotebookEventHandler(ClientData clientData, XEvent *eventPtr)
{
Notebook *nb = clientData;
if (eventPtr->type == DestroyNotify) { /* Remove self */
- Tk_DeleteEventHandler(nb->core.tkwin,
- NotebookEventMask, NotebookEventHandler, clientData);
+ Tk_DeleteEventHandler(nb->core.tkwin, NotebookEventMask,
+ NotebookEventHandler, clientData);
} else if (eventPtr->type == MotionNotify) {
int index = IdentifyTab(nb, eventPtr->xmotion.x, eventPtr->xmotion.y);
ActivateTab(nb, index);
diff --git a/generic/ttk/ttkTagSet.c b/generic/ttk/ttkTagSet.c
index dd4d3a4..ce776b6 100644
--- a/generic/ttk/ttkTagSet.c
+++ b/generic/ttk/ttkTagSet.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTagSet.c,v 1.1 2006/10/31 01:42:26 hobbs Exp $
+/* $Id: ttkTagSet.c,v 1.2 2007/01/11 15:35:40 dkf Exp $
*
* Ttk widget set: tag tables. Half-baked, work in progress.
*
@@ -31,8 +31,8 @@ struct TtkTagTable {
static Ttk_Tag NewTag(Ttk_TagTable tagTable)
{
Ttk_Tag tag = (Ttk_Tag)ckalloc(sizeof(*tag));
- tag->tagRecord = (Tcl_Obj **)ckalloc(tagTable->tagRecordSize);
- memset(tag->tagRecord, 0, tagTable->tagRecordSize);
+ tag->tagRecord = (Tcl_Obj **)ckalloc((unsigned) tagTable->tagRecordSize);
+ memset(tag->tagRecord, 0, (unsigned) tagTable->tagRecordSize);
return tag;
}
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index 305445d..f1c4e9f 100644
--- a/generic/ttk/ttkTheme.c
+++ b/generic/ttk/ttkTheme.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.
*
- * $Id: ttkTheme.c,v 1.4 2006/12/10 19:19:44 jenglish Exp $
+ * $Id: ttkTheme.c,v 1.5 2007/01/11 15:35:40 dkf Exp $
*/
#include <stdlib.h>
@@ -1015,7 +1015,7 @@ int InitializeElementRecord(
*dest = styleDefault ? styleDefault : elementDefault;
}
- if (!AllocateResource(cache, tkwin, dest, elementOption->type)) {
+ if (!AllocateResource(cache, tkwin, dest, (int) elementOption->type)) {
return 0;
}
}
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 07a1b71..a7a9b18 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTreeview.c,v 1.12 2007/01/11 14:49:47 jenglish Exp $
+/* $Id: ttkTreeview.c,v 1.13 2007/01/11 15:35:40 dkf Exp $
* Copyright (c) 2004, Joe English
*
* ttk::treeview widget implementation.
@@ -1012,7 +1012,7 @@ static int TreeviewInitialize(Tcl_Interp *interp, void *recordPtr)
tv->tree.nColumns = tv->tree.nDisplayColumns = 0;
tv->tree.columns = NULL;
tv->tree.displayColumns = NULL;
- tv->tree.showFlags = ~0;
+ tv->tree.showFlags = ~(unsigned)0;
InitColumn(&tv->tree.column0);
Tk_InitOptions(
@@ -3180,7 +3180,7 @@ static void RowElementDraw(
XColor *color = Tk_GetColorFromObj(tkwin, row->backgroundObj);
GC gc = Tk_GCForColor(color, d);
XFillRectangle(Tk_Display(tkwin), d, gc,
- b.x, b.y, b.width, b.height);
+ b.x, b.y, (unsigned)b.width, (unsigned)b.height);
}
static Ttk_ElementSpec RowElementSpec =