summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-01-28 20:47:49 (GMT)
committernijtmans <nijtmans>2009-01-28 20:47:49 (GMT)
commit53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1 (patch)
treefdebc2108b277faed42ddafa5e7633fc51b503ec /generic
parent8faa6f4e39faa11f5f8363f8ce53550991b95d3f (diff)
downloadtk-53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1.zip
tk-53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1.tar.gz
tk-53f95f2d8f73b96fbd4dac1a784ce90eb133c0a1.tar.bz2
- eliminate some unnessary type casts
- some internal const decorations - spacing
Diffstat (limited to 'generic')
-rw-r--r--generic/ttk/ttkCache.c16
-rw-r--r--generic/ttk/ttkLayout.c4
-rw-r--r--generic/ttk/ttkState.c4
-rw-r--r--generic/ttk/ttkTheme.c8
4 files changed, 16 insertions, 16 deletions
diff --git a/generic/ttk/ttkCache.c b/generic/ttk/ttkCache.c
index a12bf30..0d558d4 100644
--- a/generic/ttk/ttkCache.c
+++ b/generic/ttk/ttkCache.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkCache.c,v 1.1 2006/10/31 01:42:26 hobbs Exp $
+ * $Id: ttkCache.c,v 1.2 2009/01/28 20:47:49 nijtmans Exp $
* Ttk theme engine, resource cache.
*
* Copyright (c) 2004, Joe English
@@ -141,7 +141,7 @@ static void Ttk_ClearCache(Ttk_ResourceCache cache)
void Ttk_FreeResourceCache(Ttk_ResourceCache cache)
{
- Tcl_HashEntry *entryPtr;
+ Tcl_HashEntry *entryPtr;
Tcl_HashSearch search;
Ttk_ClearCache(cache);
@@ -200,10 +200,10 @@ static void InitCacheWindow(Ttk_ResourceCache cache, Tk_Window tkwin)
* Ttk_RegisterNamedColor --
* Specify an RGB triplet as a named color.
* Overrides any previous named color specification.
- *
+ *
*/
void Ttk_RegisterNamedColor(
- Ttk_ResourceCache cache,
+ Ttk_ResourceCache cache,
const char *colorName,
XColor *colorPtr)
{
@@ -212,7 +212,7 @@ void Ttk_RegisterNamedColor(
char nameBuf[14];
Tcl_Obj *colorNameObj;
- sprintf(nameBuf, "#%04X%04X%04X",
+ sprintf(nameBuf, "#%04X%04X%04X",
colorPtr->red, colorPtr->green, colorPtr->blue);
colorNameObj = Tcl_NewStringObj(nameBuf, -1);
Tcl_IncrRefCount(colorNameObj);
@@ -223,7 +223,7 @@ void Ttk_RegisterNamedColor(
Tcl_DecrRefCount(oldColor);
}
- Tcl_SetHashValue(entryPtr, (ClientData)colorNameObj);
+ Tcl_SetHashValue(entryPtr, colorNameObj);
}
/*
@@ -234,7 +234,7 @@ void Ttk_RegisterNamedColor(
*/
static Tcl_Obj *CheckNamedColor(Ttk_ResourceCache cache, Tcl_Obj *objPtr)
{
- Tcl_HashEntry *entryPtr =
+ Tcl_HashEntry *entryPtr =
Tcl_FindHashEntry(&cache->namedColors, Tcl_GetString(objPtr));
if (entryPtr) { /* Use named color instead */
objPtr = (Tcl_Obj *)Tcl_GetHashValue(entryPtr);
@@ -249,7 +249,7 @@ typedef void *(*Allocator)(Tcl_Interp *, Tk_Window, Tcl_Obj *);
static Tcl_Obj *Ttk_Use(
Tcl_Interp *interp,
- Tcl_HashTable *table,
+ Tcl_HashTable *table,
Allocator allocate,
Tk_Window tkwin,
Tcl_Obj *objPtr)
diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c
index 2f599dd..8107683 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.13 2008/12/07 16:34:56 das Exp $
+ * $Id: ttkLayout.c,v 1.14 2009/01/28 20:47:49 nijtmans Exp $
*/
#include <string.h>
@@ -619,7 +619,7 @@ Ttk_LayoutTemplate Ttk_ParseLayoutTemplate(Tcl_Interp *interp, Tcl_Obj *objPtr)
return 0;
while (i < objc) {
- char *elementName = Tcl_GetString(objv[i]);
+ const char *elementName = Tcl_GetString(objv[i]);
unsigned flags = 0x0, sticky = TTK_FILL_BOTH;
Tcl_Obj *childSpec = 0;
diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c
index 693c5d7..8586db0 100644
--- a/generic/ttk/ttkState.c
+++ b/generic/ttk/ttkState.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkState.c,v 1.3 2008/12/03 18:44:49 jenglish Exp $
+ * $Id: ttkState.c,v 1.4 2009/01/28 20:47:49 nijtmans Exp $
*
* Tk widget state utilities.
*
@@ -83,7 +83,7 @@ static int StateSpecSetFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr)
return status;
for (i = 0; i < objc; ++i) {
- char *stateName = Tcl_GetString(objv[i]);
+ const char *stateName = Tcl_GetString(objv[i]);
int on, j;
if (*stateName == '!') {
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index 91805d6..1bcee83 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.16 2008/10/24 20:01:10 jenglish Exp $
+ * $Id: ttkTheme.c,v 1.17 2009/01/28 20:47:49 nijtmans Exp $
*/
#include <stdlib.h>
@@ -332,7 +332,7 @@ static Theme *NewTheme(Ttk_ResourceCache cache, Ttk_Theme parent)
themePtr->rootStyle->styleName =
Tcl_GetHashKey(&themePtr->styleTable, entryPtr);
themePtr->rootStyle->cache = themePtr->cache;
- Tcl_SetHashValue(entryPtr, (ClientData)themePtr->rootStyle);
+ Tcl_SetHashValue(entryPtr, themePtr->rootStyle);
return themePtr;
}
@@ -563,7 +563,7 @@ Ttk_CreateTheme(
if (!parent) parent = pkgPtr->defaultTheme;
themePtr = NewTheme(pkgPtr->cache, parent);
- Tcl_SetHashValue(entryPtr, (ClientData) themePtr);
+ Tcl_SetHashValue(entryPtr, themePtr);
return themePtr;
}
@@ -711,7 +711,7 @@ Ttk_Style Ttk_GetStyle(Ttk_Theme themePtr, const char *styleName)
stylePtr->styleName = Tcl_GetHashKey(&themePtr->styleTable, entryPtr);
stylePtr->cache = stylePtr->parentStyle->cache;
- Tcl_SetHashValue(entryPtr, (ClientData)stylePtr);
+ Tcl_SetHashValue(entryPtr, stylePtr);
return stylePtr;
}
return (Style*)Tcl_GetHashValue(entryPtr);