summaryrefslogtreecommitdiffstats
path: root/generic/tkStyle.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkStyle.c')
-rw-r--r--generic/tkStyle.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index fda6f7b..bf683bc 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.c
@@ -255,7 +255,7 @@ TkStylePkgFree(
entryPtr = Tcl_FirstHashEntry(&tsdPtr->styleTable, &search);
while (entryPtr != NULL) {
- ckfree((char *) Tcl_GetHashValue(entryPtr));
+ ckfree(Tcl_GetHashValue(entryPtr));
entryPtr = Tcl_NextHashEntry(&search);
}
Tcl_DeleteHashTable(&tsdPtr->styleTable);
@@ -268,7 +268,7 @@ TkStylePkgFree(
while (entryPtr != NULL) {
enginePtr = Tcl_GetHashValue(entryPtr);
FreeStyleEngine(enginePtr);
- ckfree((char *) enginePtr);
+ ckfree(enginePtr);
entryPtr = Tcl_NextHashEntry(&search);
}
Tcl_DeleteHashTable(&tsdPtr->engineTable);
@@ -281,7 +281,7 @@ TkStylePkgFree(
FreeElement(tsdPtr->elements+i);
}
Tcl_DeleteHashTable(&tsdPtr->elementTable);
- ckfree((char *) tsdPtr->elements);
+ ckfree(tsdPtr->elements);
}
/*
@@ -333,7 +333,7 @@ Tk_RegisterStyleEngine(
* Allocate and intitialize a new engine.
*/
- enginePtr = (StyleEngine *) ckalloc(sizeof(StyleEngine));
+ enginePtr = ckalloc(sizeof(StyleEngine));
InitStyleEngine(enginePtr, Tcl_GetHashKey(&tsdPtr->engineTable, entryPtr),
(StyleEngine *) parent);
Tcl_SetHashValue(entryPtr, enginePtr);
@@ -391,7 +391,7 @@ InitStyleEngine(
*/
if (tsdPtr->nbElements > 0) {
- enginePtr->elements = (StyledElement *) ckalloc(
+ enginePtr->elements = ckalloc(
sizeof(StyledElement) * tsdPtr->nbElements);
for (elementId = 0; elementId < tsdPtr->nbElements; elementId++) {
InitStyledElement(enginePtr->elements+elementId);
@@ -432,7 +432,7 @@ FreeStyleEngine(
for (elementId = 0; elementId < tsdPtr->nbElements; elementId++) {
FreeStyledElement(enginePtr->elements+elementId);
}
- ckfree((char *) enginePtr->elements);
+ ckfree(enginePtr->elements);
}
/*
@@ -580,7 +580,7 @@ FreeStyledElement(
for (i = 0; i < elementPtr->nbWidgetSpecs; i++) {
FreeWidgetSpec(elementPtr->widgetSpecs+i);
}
- ckfree((char *) elementPtr->widgetSpecs);
+ ckfree(elementPtr->widgetSpecs);
}
/*
@@ -644,7 +644,7 @@ CreateElement(
* Reallocate element table.
*/
- tsdPtr->elements = (Element *) ckrealloc((char *) tsdPtr->elements,
+ tsdPtr->elements = ckrealloc(tsdPtr->elements,
sizeof(Element) * tsdPtr->nbElements);
InitElement(tsdPtr->elements+elementId,
Tcl_GetHashKey(&tsdPtr->elementTable, entryPtr), elementId,
@@ -658,8 +658,7 @@ CreateElement(
while (engineEntryPtr != NULL) {
enginePtr = Tcl_GetHashValue(engineEntryPtr);
- enginePtr->elements = (StyledElement *) ckrealloc(
- (char *) enginePtr->elements,
+ enginePtr->elements = ckrealloc(enginePtr->elements,
sizeof(StyledElement) * tsdPtr->nbElements);
InitStyledElement(enginePtr->elements+elementId);
@@ -789,7 +788,7 @@ Tk_RegisterStyledElement(
elementPtr = ((StyleEngine *) engine)->elements+elementId;
- specPtr = (Tk_ElementSpec *) ckalloc(sizeof(Tk_ElementSpec));
+ specPtr = ckalloc(sizeof(Tk_ElementSpec));
specPtr->version = templatePtr->version;
specPtr->name = ckalloc(strlen(templatePtr->name)+1);
strcpy(specPtr->name, templatePtr->name);
@@ -798,7 +797,7 @@ Tk_RegisterStyledElement(
srcOptions->name != NULL; nbOptions++, srcOptions++) {
/* empty body */
}
- specPtr->options = (Tk_ElementOptionSpec *)
+ specPtr->options =
ckalloc(sizeof(Tk_ElementOptionSpec) * (nbOptions+1));
for (srcOptions = templatePtr->options, dstOptions = specPtr->options;
/* End condition within loop */; srcOptions++, dstOptions++) {
@@ -926,7 +925,7 @@ InitWidgetSpec(
* Build the widget option list.
*/
- widgetSpecPtr->optionsPtr = (const Tk_OptionSpec **)
+ widgetSpecPtr->optionsPtr =
ckalloc(sizeof(Tk_OptionSpec *) * nbOptions);
for (i = 0, elementOptionPtr = elementPtr->specPtr->options;
i < nbOptions; i++, elementOptionPtr++) {
@@ -967,7 +966,7 @@ FreeWidgetSpec(
StyledWidgetSpec *widgetSpecPtr)
/* The widget spec to free. */
{
- ckfree((char *) widgetSpecPtr->optionsPtr);
+ ckfree(widgetSpecPtr->optionsPtr);
}
/*
@@ -1011,8 +1010,7 @@ GetWidgetSpec(
*/
i = elementPtr->nbWidgetSpecs++;
- elementPtr->widgetSpecs = (StyledWidgetSpec *) ckrealloc(
- (char *) elementPtr->widgetSpecs,
+ elementPtr->widgetSpecs = ckrealloc(elementPtr->widgetSpecs,
sizeof(StyledWidgetSpec) * elementPtr->nbWidgetSpecs);
widgetSpecPtr = elementPtr->widgetSpecs+i;
InitWidgetSpec(widgetSpecPtr, elementPtr, optionTable);
@@ -1257,7 +1255,7 @@ Tk_CreateStyle(
* Allocate and intitialize a new style.
*/
- stylePtr = (Style *) ckalloc(sizeof(Style));
+ stylePtr = ckalloc(sizeof(Style));
InitStyle(stylePtr, Tcl_GetHashKey(&tsdPtr->styleTable, entryPtr),
(engine!=NULL ? (StyleEngine*) engine : tsdPtr->defaultEnginePtr),
clientData);