diff options
Diffstat (limited to 'generic/tkConfig.c')
-rw-r--r-- | generic/tkConfig.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 368d0ce..5521615 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.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. * - * RCS: @(#) $Id: tkConfig.c,v 1.26 2007/12/13 15:24:13 dgp Exp $ + * RCS: @(#) $Id: tkConfig.c,v 1.27 2008/04/27 22:38:55 dkf Exp $ */ /* @@ -50,7 +50,7 @@ */ typedef struct TkOption { - CONST Tk_OptionSpec *specPtr; + const Tk_OptionSpec *specPtr; /* The original spec from the template passed * to Tk_CreateOptionTable.*/ Tk_Uid dbNameUID; /* The Uid form of the option database @@ -123,7 +123,7 @@ static Tcl_Obj * GetConfigList(char *recordPtr, Option *optionPtr, Tk_Window tkwin); static Tcl_Obj * GetObjectForOption(char *recordPtr, Option *optionPtr, Tk_Window tkwin); -static Option * GetOption(CONST char *name, OptionTable *tablePtr); +static Option * GetOption(const char *name, OptionTable *tablePtr); static Option * GetOptionFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, OptionTable *tablePtr); static int ObjectIsEmpty(Tcl_Obj *objPtr); @@ -166,7 +166,7 @@ Tk_OptionTable Tk_CreateOptionTable( Tcl_Interp *interp, /* Interpreter associated with the application * in which this table will be used. */ - CONST Tk_OptionSpec *templatePtr) + const Tk_OptionSpec *templatePtr) /* Static information about the configuration * options. */ { @@ -174,7 +174,7 @@ Tk_CreateOptionTable( Tcl_HashEntry *hashEntryPtr; int newEntry; OptionTable *tablePtr; - CONST Tk_OptionSpec *specPtr, *specPtr2; + const Tk_OptionSpec *specPtr, *specPtr2; Option *optionPtr; int numOptions, i; @@ -194,7 +194,7 @@ Tk_CreateOptionTable( hashTablePtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable)); Tcl_InitHashTable(hashTablePtr, TCL_ONE_WORD_KEYS); Tcl_SetAssocData(interp, OPTION_HASH_KEY, DestroyOptionHashTable, - (ClientData) hashTablePtr); + hashTablePtr); } /* @@ -270,7 +270,7 @@ Tk_CreateOptionTable( || (specPtr->type == TK_OPTION_BORDER)) && (specPtr->clientData != NULL)) { optionPtr->extra.monoColorPtr = - Tcl_NewStringObj((char *) specPtr->clientData, -1); + Tcl_NewStringObj(specPtr->clientData, -1); Tcl_IncrRefCount(optionPtr->extra.monoColorPtr); } @@ -278,8 +278,8 @@ Tk_CreateOptionTable( /* * Get the custom parsing, etc., functions. */ - optionPtr->extra.custom = - (Tk_ObjCustomOption *) specPtr->clientData; + + optionPtr->extra.custom = specPtr->clientData; } } if (((specPtr->type == TK_OPTION_STRING) @@ -303,8 +303,8 @@ Tk_CreateOptionTable( */ if (specPtr->clientData != NULL) { - tablePtr->nextPtr = (OptionTable *) Tk_CreateOptionTable(interp, - (Tk_OptionSpec *) specPtr->clientData); + tablePtr->nextPtr = (OptionTable *) + Tk_CreateOptionTable(interp, specPtr->clientData); } return (Tk_OptionTable) tablePtr; @@ -385,7 +385,7 @@ DestroyOptionHashTable( ClientData clientData, /* The hash table we are destroying */ Tcl_Interp *interp) /* The interpreter we are destroying */ { - Tcl_HashTable *hashTablePtr = (Tcl_HashTable *) clientData; + Tcl_HashTable *hashTablePtr = clientData; Tcl_HashSearch search; Tcl_HashEntry *hashEntryPtr; OptionTable *tablePtr; @@ -634,7 +634,7 @@ DoObjConfig( Tk_SavedOption internal; /* Used to save the old internal * representation of the value if * savedOptionPtr is NULL. */ - CONST Tk_OptionSpec *specPtr; + const Tk_OptionSpec *specPtr; int nullOK; /* @@ -735,7 +735,7 @@ DoObjConfig( int newValue; if (Tcl_GetIndexFromObj(interp, valuePtr, - (CONST char **) optionPtr->specPtr->clientData, + optionPtr->specPtr->clientData, optionPtr->specPtr->optionName+1, 0, &newValue) != TCL_OK) { return TCL_ERROR; } @@ -1030,13 +1030,13 @@ ObjectIsEmpty( static Option * GetOption( - CONST char *name, /* String balue to be looked up in the option + const char *name, /* String balue to be looked up in the option * table. */ OptionTable *tablePtr) /* Table in which to look up name. */ { Option *bestPtr, *optionPtr; OptionTable *tablePtr2; - CONST char *p1, *p2; + const char *p1, *p2; int count; /* @@ -1184,9 +1184,9 @@ GetOptionFromObj( *---------------------------------------------------------------------- */ -CONST Tk_OptionSpec * +const Tk_OptionSpec * TkGetOptionSpec( - CONST char *name, /* String value to be looked up. */ + const char *name, /* String value to be looked up. */ Tk_OptionTable optionTable) /* Table in which to look up name. */ { Option *optionPtr; @@ -1262,7 +1262,7 @@ Tk_SetOptions( char *recordPtr, /* The record to configure. */ Tk_OptionTable optionTable, /* Describes valid options. */ int objc, /* The number of elements in objv. */ - Tcl_Obj *CONST objv[], /* Contains one or more name-value pairs. */ + Tcl_Obj *const objv[], /* Contains one or more name-value pairs. */ Tk_Window tkwin, /* Window associated with the thing being * configured; needed for some options (such * as colors). */ @@ -1385,7 +1385,7 @@ Tk_RestoreSavedOptions( * record. */ char *internalPtr; /* Points to internal value of option in * record. */ - CONST Tk_OptionSpec *specPtr; + const Tk_OptionSpec *specPtr; /* * Be sure to restore the options in the opposite order they were set. @@ -1575,7 +1575,7 @@ Tk_FreeConfigOptions( int count; Tcl_Obj **oldPtrPtr, *oldPtr; char *oldInternalPtr; - CONST Tk_OptionSpec *specPtr; + const Tk_OptionSpec *specPtr; for (tablePtr = (OptionTable *) optionTable; tablePtr != NULL; tablePtr = tablePtr->nextPtr) { |