summaryrefslogtreecommitdiffstats
path: root/generic/tkStyle.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 10:29:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 10:29:25 (GMT)
commit9389cc709a38a39f1dbd50e744342ee2590269f8 (patch)
tree71968a06df024ea74a2bc06c881ffd4d50c04891 /generic/tkStyle.c
parent8a539b981722705710128c18bb03787afa71847f (diff)
parente8469505b13e2af380977e581f42402073a2136f (diff)
downloadtk-9389cc709a38a39f1dbd50e744342ee2590269f8.zip
tk-9389cc709a38a39f1dbd50e744342ee2590269f8.tar.gz
tk-9389cc709a38a39f1dbd50e744342ee2590269f8.tar.bz2
SetOptions.3: minor doc fix
make various other tables const (all backported from Tk 8.6)
Diffstat (limited to 'generic/tkStyle.c')
-rw-r--r--generic/tkStyle.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index 80d4e59..dd3b2e8 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.c
@@ -24,7 +24,7 @@ typedef struct StyledWidgetSpec {
* structure. */
Tk_OptionTable optionTable; /* Option table for the widget class using the
* element. */
- CONST Tk_OptionSpec **optionsPtr;
+ const Tk_OptionSpec **optionsPtr;
/* Table of option spec pointers, matching the
* option list provided during element
* registration. Malloc'd. */
@@ -58,7 +58,7 @@ typedef struct StyledElement {
*/
typedef struct StyleEngine {
- CONST char *name; /* Name of engine. Points to a hash key. */
+ const char *name; /* Name of engine. Points to a hash key. */
StyledElement *elements; /* Table of widget element descriptors. Each
* element is indexed by a unique system-wide
* ID. Table grows dynamically as new elements
@@ -75,7 +75,7 @@ typedef struct StyleEngine {
*/
typedef struct Style {
- CONST char *name; /* Name of style. Points to a hash key. */
+ const char *name; /* Name of style. Points to a hash key. */
StyleEngine *enginePtr; /* Style engine of which the style is an
* instance. */
ClientData clientData; /* Data provided during registration. */
@@ -86,7 +86,7 @@ typedef struct Style {
*/
typedef struct Element {
- CONST char *name; /* Name of element. Points to a hash key. */
+ const char *name; /* Name of element. Points to a hash key. */
int id; /* Id of element. */
int genericId; /* Id of generic element. */
int created; /* Boolean, whether the element was created
@@ -120,7 +120,7 @@ static Tcl_ThreadDataKey dataKey;
* Forward declarations for functions defined later in this file:
*/
-static int CreateElement(CONST char *name, int create);
+static int CreateElement(const char *name, int create);
static void DupStyleObjProc(Tcl_Obj *srcObjPtr,
Tcl_Obj *dupObjPtr);
static void FreeElement(Element *elementPtr);
@@ -132,13 +132,13 @@ static StyledElement * GetStyledElement(StyleEngine *enginePtr,
int elementId);
static StyledWidgetSpec*GetWidgetSpec(StyledElement *elementPtr,
Tk_OptionTable optionTable);
-static void InitElement(Element *elementPtr, CONST char *name,
+static void InitElement(Element *elementPtr, const char *name,
int id, int genericId, int created);
-static void InitStyle(Style *stylePtr, CONST char *name,
+static void InitStyle(Style *stylePtr, const char *name,
StyleEngine *enginePtr, ClientData clientData);
static void InitStyledElement(StyledElement *elementPtr);
static void InitStyleEngine(StyleEngine *enginePtr,
- CONST char *name, StyleEngine *parentPtr);
+ const char *name, StyleEngine *parentPtr);
static void InitWidgetSpec(StyledWidgetSpec *widgetSpecPtr,
StyledElement *elementPtr,
Tk_OptionTable optionTable);
@@ -303,7 +303,7 @@ TkStylePkgFree(
Tk_StyleEngine
Tk_RegisterStyleEngine(
- CONST char *name, /* Name of the engine to create. NULL or empty
+ const char *name, /* Name of the engine to create. NULL or empty
* means the default system engine. */
Tk_StyleEngine parent) /* The engine's parent. NULL means the default
* system engine. */
@@ -359,7 +359,7 @@ Tk_RegisterStyleEngine(
static void
InitStyleEngine(
StyleEngine *enginePtr, /* Points to an uninitialized engine. */
- CONST char *name, /* Name of the registered engine. NULL or empty
+ const char *name, /* Name of the registered engine. NULL or empty
* means the default system engine. Usually
* points to the hash key. */
StyleEngine *parentPtr) /* The engine's parent. NULL means the default
@@ -454,7 +454,7 @@ FreeStyleEngine(
Tk_StyleEngine
Tk_GetStyleEngine(
- CONST char *name) /* Name of the engine to retrieve. NULL or
+ const char *name) /* Name of the engine to retrieve. NULL or
* empty means the default system engine. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
@@ -492,7 +492,7 @@ Tk_GetStyleEngine(
static void
InitElement(
Element *elementPtr, /* Points to an uninitialized element.*/
- CONST char *name, /* Name of the registered element. Usually
+ const char *name, /* Name of the registered element. Usually
* points to the hash key. */
int id, /* Unique element ID. */
int genericId, /* ID of generic element. -1 means none. */
@@ -602,7 +602,7 @@ FreeStyledElement(
static int
CreateElement(
- CONST char *name, /* Name of the element. */
+ const char *name, /* Name of the element. */
int create) /* Boolean, whether the element is being created
* explicitly (being registered) or implicitly (by a
* derived element). */
@@ -689,7 +689,7 @@ CreateElement(
int
Tk_GetElementId(
- CONST char *name) /* Name of the element. */
+ const char *name) /* Name of the element. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -910,7 +910,7 @@ InitWidgetSpec(
{
int i, nbOptions;
Tk_ElementOptionSpec *elementOptionPtr;
- CONST Tk_OptionSpec *widgetOptionPtr;
+ const Tk_OptionSpec *widgetOptionPtr;
widgetSpecPtr->elementPtr = elementPtr;
widgetSpecPtr->optionTable = optionTable;
@@ -928,7 +928,7 @@ InitWidgetSpec(
* Build the widget option list.
*/
- widgetSpecPtr->optionsPtr = (CONST Tk_OptionSpec **)
+ widgetSpecPtr->optionsPtr = (const Tk_OptionSpec **)
ckalloc(sizeof(Tk_OptionSpec *) * nbOptions);
for (i = 0, elementOptionPtr = elementPtr->specPtr->options;
i < nbOptions; i++, elementOptionPtr++) {
@@ -1230,7 +1230,7 @@ Tk_DrawElement(
Tk_Style
Tk_CreateStyle(
- CONST char *name, /* Name of the style to create. NULL or empty
+ const char *name, /* Name of the style to create. NULL or empty
* means the default system style. */
Tk_StyleEngine engine, /* The style engine. */
ClientData clientData) /* Private data passed as is to engine code. */
@@ -1288,7 +1288,7 @@ Tk_CreateStyle(
*---------------------------------------------------------------------------
*/
-CONST char *
+const char *
Tk_NameOfStyle(
Tk_Style style) /* Style whose name is desired. */
{
@@ -1316,7 +1316,7 @@ Tk_NameOfStyle(
static void
InitStyle(
Style *stylePtr, /* Points to an uninitialized style. */
- CONST char *name, /* Name of the registered style. NULL or empty
+ const char *name, /* Name of the registered style. NULL or empty
* means the default system style. Usually
* points to the hash key. */
StyleEngine *enginePtr, /* The style engine. */
@@ -1348,7 +1348,7 @@ InitStyle(
Tk_Style
Tk_GetStyle(
Tcl_Interp *interp, /* Interp for error return. */
- CONST char *name) /* Name of the style to retrieve. NULL or empty
+ const char *name) /* Name of the style to retrieve. NULL or empty
* means the default system style. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)