891 lines
26 KiB
Diff
891 lines
26 KiB
Diff
Descriptiom: Patch makes explicit casts to silence GCC warnings about
|
|
incompatible pointer types (mostly adds or removes const modifier).
|
|
Author: Sergei Golovan
|
|
Last-Modified: Wed, 09 Jul 2014 19:22:39 +0400
|
|
|
|
--- a/generic/bltArrayObj.c
|
|
+++ b/generic/bltArrayObj.c
|
|
@@ -55,7 +55,7 @@
|
|
Blt_HashEntry *hPtr;
|
|
Blt_HashTable *tablePtr;
|
|
Tcl_Obj *elemObjPtr, **vobjv;
|
|
- Tcl_ObjType *oldTypePtr;
|
|
+ CONST Tcl_ObjType *oldTypePtr;
|
|
char *string;
|
|
int isNew;
|
|
int nElem;
|
|
--- a/generic/bltBgexec.c
|
|
+++ b/generic/bltBgexec.c
|
|
@@ -926,7 +926,7 @@
|
|
Tcl_DStringInit(&dStr);
|
|
GetSinkData(sinkPtr, &data, &length);
|
|
Tcl_DStringAppend(&dStr, sinkPtr->command, -1);
|
|
- Tcl_DStringAppendElement(&dStr, data);
|
|
+ Tcl_DStringAppendElement(&dStr, (char *)data);
|
|
Tcl_DStringAppendElement(&dStr, status);
|
|
if (Tcl_GlobalEval(interp, Tcl_DStringValue(&dStr)) != TCL_OK) {
|
|
Tcl_BackgroundError(interp);
|
|
--- a/generic/bltTree.c
|
|
+++ b/generic/bltTree.c
|
|
@@ -47,7 +47,7 @@
|
|
if (dictType == NULL) {
|
|
Tcl_Obj * obj;
|
|
obj = Tcl_NewDictObj();
|
|
- dictType = obj->typePtr;
|
|
+ dictType = (Tcl_ObjType *)obj->typePtr;
|
|
Tcl_DecrRefCount(obj);
|
|
}
|
|
return (objPtr->typePtr == dictType);
|
|
@@ -3320,7 +3320,7 @@
|
|
if (tPtr->nodeTable.numEntries > 0) {
|
|
flags |= TREE_TRACE_TAGMULTIPLE;
|
|
}
|
|
- result = CallTraces(interp, clientPtr, node->treeObject, node, tagName,
|
|
+ result = CallTraces(interp, clientPtr, node->treeObject, node, (Blt_TreeKey)tagName,
|
|
flags, &cnt);
|
|
if (result == TCL_BREAK) {
|
|
return TCL_OK;
|
|
@@ -3349,7 +3349,7 @@
|
|
int cnt;
|
|
|
|
if (!(node->flags & TREE_TRACE_ACTIVE)) {
|
|
- return CallTraces(interp, clientPtr, node->treeObject, node, tagName,
|
|
+ return CallTraces(interp, clientPtr, node->treeObject, node, (Blt_TreeKey)tagName,
|
|
(TREE_TRACE_TAGDELETE), &cnt);
|
|
}
|
|
return TCL_OK;
|
|
--- a/generic/bltTreeCmd.c
|
|
+++ b/generic/bltTreeCmd.c
|
|
@@ -7733,7 +7733,7 @@
|
|
return TCL_ERROR;
|
|
}
|
|
if (valueObjPtr->typePtr != NULL) {
|
|
- Tcl_SetResult(interp, valueObjPtr->typePtr->name, TCL_VOLATILE);
|
|
+ Tcl_SetResult(interp, (char *)(valueObjPtr->typePtr->name), TCL_VOLATILE);
|
|
} else {
|
|
Tcl_SetResult(interp, "string", TCL_STATIC);
|
|
}
|
|
--- a/generic/bltVector.c
|
|
+++ b/generic/bltVector.c
|
|
@@ -370,7 +370,7 @@
|
|
*indexPtr = (int)value;
|
|
cleanup:
|
|
if (string != zStatic) {
|
|
- Blt_Free( string );
|
|
+ Blt_Free( (void *)string );
|
|
}
|
|
return result;
|
|
}
|
|
--- a/generic/bltGrAxis.c
|
|
+++ b/generic/bltGrAxis.c
|
|
@@ -3436,7 +3436,7 @@
|
|
Graph *graphPtr;
|
|
Axis *axisPtr;
|
|
int argc;
|
|
- char *argv[];
|
|
+ CONST char *argv[];
|
|
{
|
|
int flags;
|
|
|
|
--- a/generic/bltGrElem.c
|
|
+++ b/generic/bltGrElem.c
|
|
@@ -1658,7 +1658,7 @@
|
|
Graph *graphPtr; /* Graph widget */
|
|
Tcl_Interp *interp; /* Interpreter to report results to */
|
|
int argc; /* Number of element names */
|
|
- char **argv; /* List of element names */
|
|
+ CONST char **argv; /* List of element names */
|
|
{
|
|
Element *elemPtr;
|
|
ClosestSearch search;
|
|
@@ -1821,12 +1821,12 @@
|
|
Graph *graphPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char *argv[];
|
|
+ CONST char *argv[];
|
|
{
|
|
Element *elemPtr;
|
|
int flags;
|
|
int numNames, numOpts;
|
|
- char **options;
|
|
+ CONST char **options;
|
|
register int i;
|
|
|
|
/* Figure out where the option value pairs begin */
|
|
--- a/generic/bltGrGrid.c
|
|
+++ b/generic/bltGrGrid.c
|
|
@@ -355,7 +355,7 @@
|
|
Graph *graphPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Grid *gridPtr = (Grid *)graphPtr->gridPtr;
|
|
int flags;
|
|
--- a/generic/bltGrHairs.c
|
|
+++ b/generic/bltGrHairs.c
|
|
@@ -379,7 +379,7 @@
|
|
Graph *graphPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Crosshairs *chPtr = graphPtr->crosshairs;
|
|
|
|
--- a/generic/bltGrLegd.c
|
|
+++ b/generic/bltGrLegd.c
|
|
@@ -1393,7 +1393,7 @@
|
|
Graph *graphPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
int flags = TK_CONFIG_ARGV_ONLY;
|
|
Legend *legendPtr;
|
|
--- a/generic/bltGrMarker.c
|
|
+++ b/generic/bltGrMarker.c
|
|
@@ -4274,13 +4274,13 @@
|
|
Graph *graphPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Marker *markerPtr;
|
|
int flags = TK_CONFIG_ARGV_ONLY;
|
|
char *oldName;
|
|
int nNames, nOpts;
|
|
- char **options;
|
|
+ CONST char **options;
|
|
register int i;
|
|
int under;
|
|
|
|
--- a/generic/bltGrPen.c
|
|
+++ b/generic/bltGrPen.c
|
|
@@ -475,13 +475,13 @@
|
|
Tcl_Interp *interp;
|
|
Graph *graphPtr;
|
|
int argc;
|
|
- char *argv[];
|
|
+ CONST char *argv[];
|
|
{
|
|
int flags;
|
|
Pen *penPtr;
|
|
int nNames, nOpts;
|
|
int redraw;
|
|
- char **options;
|
|
+ CONST char **options;
|
|
register int i;
|
|
|
|
/* Figure out where the option value pairs begin */
|
|
--- a/generic/bltGrPs.c
|
|
+++ b/generic/bltGrPs.c
|
|
@@ -406,7 +406,7 @@
|
|
Graph *graphPtr;
|
|
Tcl_Interp *interp;
|
|
int argc; /* Number of options in argv vector */
|
|
- char **argv; /* Option vector */
|
|
+ CONST char **argv; /* Option vector */
|
|
{
|
|
int flags = TK_CONFIG_ARGV_ONLY;
|
|
PostScript *psPtr = (PostScript *)graphPtr->postscript;
|
|
@@ -1110,7 +1110,7 @@
|
|
Graph *graphPtr; /* Graph widget record */
|
|
Tcl_Interp *interp;
|
|
int argc; /* Number of options in argv vector */
|
|
- char **argv; /* Option vector */
|
|
+ CONST char **argv; /* Option vector */
|
|
{
|
|
PostScript *psPtr = (PostScript *)graphPtr->postscript;
|
|
FILE *f = NULL;
|
|
@@ -1121,7 +1121,7 @@
|
|
fileName = NULL;
|
|
if (argc > 3) {
|
|
if (argv[3][0] != '-') {
|
|
- fileName = argv[3]; /* First argument is the file name. */
|
|
+ fileName = (char *)argv[3]; /* First argument is the file name. */
|
|
argv++, argc--;
|
|
}
|
|
if (Blt_ConfigureWidget(interp, graphPtr->tkwin, configSpecs, argc - 3,
|
|
--- a/generic/bltGraph.c
|
|
+++ b/generic/bltGraph.c
|
|
@@ -887,7 +887,7 @@
|
|
CreateGraph(interp, argc, argv, classUid)
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
Blt_Uid classUid;
|
|
{
|
|
Graph *graphPtr;
|
|
@@ -1082,7 +1082,7 @@
|
|
Graph *graphPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
int flags;
|
|
|
|
--- a/generic/bltBitmap.c
|
|
+++ b/generic/bltBitmap.c
|
|
@@ -887,7 +887,7 @@
|
|
ClientData clientData; /* Thread-specific data for bitmaps. */
|
|
Tcl_Interp *interp; /* Interpreter to report results to */
|
|
int argc; /* Number of arguments */
|
|
- char **argv; /* Argument list */
|
|
+ CONST char **argv; /* Argument list */
|
|
{
|
|
BitmapInterpData *dataPtr = clientData;
|
|
int width, height; /* Dimensions of bitmap */
|
|
@@ -934,7 +934,7 @@
|
|
ts.leader = 0;
|
|
ts.anchor = TK_ANCHOR_CENTER;
|
|
|
|
- textPtr = Blt_GetTextLayout(argv[3], &ts);
|
|
+ textPtr = Blt_GetTextLayout((char *)argv[3], &ts);
|
|
bitmap = Blt_CreateTextBitmap(tkwin, textPtr, &ts, &width, &height);
|
|
Blt_Free(textPtr);
|
|
if (bitmap == None) {
|
|
@@ -1003,7 +1003,7 @@
|
|
ClientData clientData; /* Thread-specific data for bitmaps. */
|
|
Tcl_Interp *interp; /* Interpreter to report results to */
|
|
int argc; /* Number of arguments */
|
|
- char **argv; /* Argument list */
|
|
+ CONST char **argv; /* Argument list */
|
|
{
|
|
BitmapInterpData *dataPtr = clientData;
|
|
int width, height; /* Dimensions of bitmap */
|
|
@@ -1032,7 +1032,7 @@
|
|
return TCL_ERROR;
|
|
}
|
|
/* Skip leading spaces. */
|
|
- for (p = argv[3]; isspace(UCHAR(*p)); p++) {
|
|
+ for (p = (char *)argv[3]; isspace(UCHAR(*p)); p++) {
|
|
/*empty*/
|
|
}
|
|
defn = Blt_Strdup(p);
|
|
--- a/generic/bltBusy.c
|
|
+++ b/generic/bltBusy.c
|
|
@@ -413,7 +413,7 @@
|
|
Tcl_Interp *interp;
|
|
Busy *busyPtr;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Tk_Cursor oldCursor;
|
|
|
|
--- a/generic/bltCanvEps.c
|
|
+++ b/generic/bltCanvEps.c
|
|
@@ -1136,7 +1136,7 @@
|
|
Tk_Canvas canvas; /* Canvas containing itemPtr. */
|
|
Tk_Item *itemPtr; /* EPS item to reconfigure. */
|
|
int argc; /* Number of elements in argv. */
|
|
- char **argv; /* Arguments describing things to configure. */
|
|
+ CONST char **argv; /* Arguments describing things to configure. */
|
|
int flags; /* Flags to pass to Tk_ConfigureWidget. */
|
|
{
|
|
EpsItem *epsPtr = (EpsItem *)itemPtr;
|
|
@@ -1282,10 +1282,10 @@
|
|
unsigned long gcMask;
|
|
GC newGC;
|
|
int width, height, i;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
|
|
tkwin = Tk_CanvasTkwin(canvas);
|
|
- argv = (char**)ckalloc((argc+1)*sizeof(char*));
|
|
+ argv = (CONST char **)ckalloc((argc+1)*sizeof(char*));
|
|
for (i=0; i<argc; i++) {
|
|
argv[i] = Tcl_GetString(objv[i]);
|
|
}
|
|
--- a/generic/bltConfig.c
|
|
+++ b/generic/bltConfig.c
|
|
@@ -1545,7 +1545,7 @@
|
|
Tk_Window tkwin;
|
|
int result;
|
|
char *tempName;
|
|
- char *oldClass;
|
|
+ CONST char *oldClass;
|
|
int isTemporary = FALSE;
|
|
|
|
tempName = Blt_Strdup(resName);
|
|
@@ -1573,7 +1573,7 @@
|
|
Blt_Free(tempName);
|
|
|
|
Tk_SetClass(tkwin, className);
|
|
- result = Blt_ConfigureWidget(interp, tkwin, specsPtr, argc, argv, widgRec,
|
|
+ result = Blt_ConfigureWidget(interp, tkwin, specsPtr, argc, (CONST char **)argv, widgRec,
|
|
flags);
|
|
if (isTemporary) {
|
|
Tk_DestroyWindow(tkwin);
|
|
--- a/generic/bltOldConfig.c
|
|
+++ b/generic/bltOldConfig.c
|
|
@@ -578,7 +578,7 @@
|
|
case TK_CONFIG_CUSTOM:
|
|
if ((*specPtr->customPtr->parseProc)(
|
|
specPtr->customPtr->clientData, interp, tkwin,
|
|
- value, widgRec, specPtr->offset) != TCL_OK) {
|
|
+ (char *)value, widgRec, specPtr->offset) != TCL_OK) {
|
|
return TCL_ERROR;
|
|
}
|
|
break;
|
|
@@ -737,7 +737,7 @@
|
|
argv[2] = specPtr->dbClass;
|
|
argv[3] = specPtr->defValue;
|
|
if (specPtr->type == TK_CONFIG_SYNONYM) {
|
|
- return Tcl_Merge(2, argv);
|
|
+ return Tcl_Merge(2, (char * CONST *)argv);
|
|
}
|
|
argv[4] = FormatConfigValue(interp, tkwin, specPtr, widgRec, buffer,
|
|
&freeProc);
|
|
@@ -768,10 +768,10 @@
|
|
|
|
|
|
argv[5] = conftypes[specPtr->type];
|
|
- result = Tcl_Merge(6, argv);
|
|
+ result = Tcl_Merge(6, (char * CONST *)argv);
|
|
|
|
} else {
|
|
- result = Tcl_Merge(5, argv);
|
|
+ result = Tcl_Merge(5, (char * CONST *)argv);
|
|
}
|
|
if (freeProc != NULL) {
|
|
if ((freeProc == TCL_DYNAMIC) || (freeProc == (Tcl_FreeProc *) free)) {
|
|
--- a/generic/bltContainer.c
|
|
+++ b/generic/bltContainer.c
|
|
@@ -1185,7 +1185,7 @@
|
|
* may not already have values for
|
|
* some fields. */
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
int flags;
|
|
{
|
|
XGCValues gcValues;
|
|
--- a/generic/bltDragdrop.c
|
|
+++ b/generic/bltDragdrop.c
|
|
@@ -452,9 +452,9 @@
|
|
static void SourceEventProc _ANSI_ARGS_((ClientData clientData,
|
|
XEvent *eventPtr));
|
|
static int ConfigureSource _ANSI_ARGS_((Tcl_Interp *interp, Source * srcPtr,
|
|
- int argc, char **argv, int flags));
|
|
+ int argc, CONST char **argv, int flags));
|
|
static int ConfigureToken _ANSI_ARGS_((Tcl_Interp *interp, Source * srcPtr,
|
|
- int argc, char **argv));
|
|
+ int argc, CONST char **argv));
|
|
|
|
static Target *CreateTarget _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin));
|
|
static Target *FindTarget _ANSI_ARGS_((Tk_Window tkwin));
|
|
@@ -1060,7 +1060,7 @@
|
|
Tcl_Interp *interp;
|
|
Source *srcPtr;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Token *tokenPtr;
|
|
|
|
@@ -1069,7 +1069,7 @@
|
|
(char *)tokenPtr, TK_CONFIG_ARGV_ONLY) != TCL_OK) {
|
|
return TCL_ERROR;
|
|
}
|
|
- return ConfigureSource(interp, srcPtr, 0, (char **)NULL,
|
|
+ return ConfigureSource(interp, srcPtr, 0, (CONST char **)NULL,
|
|
TK_CONFIG_ARGV_ONLY);
|
|
}
|
|
|
|
@@ -1161,7 +1161,7 @@
|
|
srcPtr->token.borderWidth = srcPtr->token.activeBorderWidth = 3;
|
|
srcPtr->hashPtr = hPtr;
|
|
Blt_InitHashTable(&(srcPtr->handlerTable), BLT_STRING_KEYS);
|
|
- if (ConfigureSource(interp, srcPtr, 0, (char **)NULL, 0) != TCL_OK) {
|
|
+ if (ConfigureSource(interp, srcPtr, 0, (CONST char **)NULL, 0) != TCL_OK) {
|
|
DestroySource(srcPtr);
|
|
return NULL;
|
|
}
|
|
@@ -1280,7 +1280,7 @@
|
|
Tcl_Interp *interp; /* current interpreter */
|
|
register Source *srcPtr; /* drag&drop source widget record */
|
|
int argc; /* number of arguments */
|
|
- char **argv; /* argument strings */
|
|
+ CONST char **argv; /* argument strings */
|
|
int flags; /* flags controlling interpretation */
|
|
{
|
|
unsigned long gcMask;
|
|
@@ -2332,11 +2332,11 @@
|
|
TokenOp(interp, argc, argv)
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Source *srcPtr;
|
|
|
|
- if (GetSource(interp, argv[2], &srcPtr) != TCL_OK) {
|
|
+ if (GetSource(interp, (char *)argv[2], &srcPtr) != TCL_OK) {
|
|
return TCL_ERROR;
|
|
}
|
|
if ((argc > 3) &&
|
|
@@ -2408,7 +2408,7 @@
|
|
SourceOp(interp, argc, argv)
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Source *srcPtr;
|
|
int isNew;
|
|
@@ -2429,7 +2429,7 @@
|
|
/*
|
|
* Find or create source info...
|
|
*/
|
|
- srcPtr = CreateSource(interp, argv[2], &isNew);
|
|
+ srcPtr = CreateSource(interp, (char *)argv[2], &isNew);
|
|
if (srcPtr == NULL) {
|
|
return TCL_ERROR;
|
|
}
|
|
--- a/generic/bltHierbox.c
|
|
+++ b/generic/bltHierbox.c
|
|
@@ -1088,7 +1088,7 @@
|
|
static void EventuallyInvokeSelectCmd _ANSI_ARGS_((Hierbox *hboxPtr));
|
|
static int ComputeVisibleEntries _ANSI_ARGS_((Hierbox *hboxPtr));
|
|
static int ConfigureEntry _ANSI_ARGS_((Hierbox *hboxPtr, Entry * entryPtr,
|
|
- int argc, char **argv, int flags));
|
|
+ int argc, CONST char **argv, int flags));
|
|
static void ComputeLayout _ANSI_ARGS_((Hierbox *hboxPtr));
|
|
|
|
static CompareProc ExactCompare, GlobCompare, RegexpCompare;
|
|
@@ -2064,7 +2064,7 @@
|
|
}
|
|
entryPtr->labelText = Blt_Strdup(name);
|
|
|
|
- if (ConfigureEntry(hboxPtr, entryPtr, 0, (char **)NULL, 0) != TCL_OK) {
|
|
+ if (ConfigureEntry(hboxPtr, entryPtr, 0, (CONST char **)NULL, 0) != TCL_OK) {
|
|
DestroyEntry(entryPtr);
|
|
return NULL;
|
|
}
|
|
@@ -3309,7 +3309,7 @@
|
|
Hierbox *hboxPtr;
|
|
Entry *entryPtr;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
int flags;
|
|
{
|
|
GC newGC;
|
|
@@ -3926,7 +3926,7 @@
|
|
Hierbox *hboxPtr; /* Information about widget; may or may not
|
|
* already have values for some fields. */
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
int flags;
|
|
{
|
|
XGCValues gcValues;
|
|
@@ -5493,7 +5493,7 @@
|
|
Hierbox *hboxPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
/* Figure out where the option value pairs begin */
|
|
argc -= 3;
|
|
@@ -5829,7 +5829,7 @@
|
|
char **argv;
|
|
{
|
|
int nIds, nOpts;
|
|
- char **options;
|
|
+ CONST char **options;
|
|
register int i;
|
|
Tree *treePtr;
|
|
|
|
@@ -5847,7 +5847,7 @@
|
|
}
|
|
nIds = i; /* Number of element names specified */
|
|
nOpts = argc - i; /* Number of options specified */
|
|
- options = argv + i; /* Start of options in argv */
|
|
+ options = (CONST char **)argv + i; /* Start of options in argv */
|
|
|
|
for (i = 0; i < nIds; i++) {
|
|
StringToNode(hboxPtr, argv[i], &treePtr);
|
|
@@ -7204,7 +7204,7 @@
|
|
Tcl_DString dString;
|
|
register int i, l;
|
|
int nOpts;
|
|
- char **options;
|
|
+ CONST char **options;
|
|
char **nameArr;
|
|
|
|
rootPtr = hboxPtr->rootPtr;
|
|
@@ -7230,7 +7230,7 @@
|
|
}
|
|
}
|
|
nOpts = argc - count;
|
|
- options = argv + count;
|
|
+ options = (CONST char **)argv + count;
|
|
|
|
Tcl_DStringInit(&dString);
|
|
for (i = 0; i < count; i++) {
|
|
--- a/generic/bltHtext.c
|
|
+++ b/generic/bltHtext.c
|
|
@@ -3948,7 +3948,7 @@
|
|
HText *htPtr; /* Hypertext widget */
|
|
Tcl_Interp *interp; /* Interpreter associated with widget */
|
|
int argc; /* Number of arguments. */
|
|
- char **argv; /* Argument strings. */
|
|
+ CONST char **argv; /* Argument strings. */
|
|
{
|
|
Line *linePtr;
|
|
EmbeddedWidget *winPtr;
|
|
@@ -4092,7 +4092,7 @@
|
|
HText *htPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
char *itemPtr;
|
|
Tk_ConfigSpec *specsPtr;
|
|
@@ -4531,7 +4531,7 @@
|
|
Itk_SetWidgetCommand(htPtr->tkwin, htPtr->cmdToken);
|
|
#endif
|
|
if ((Blt_ConfigureWidget(interp, htPtr->tkwin, configSpecs, argc - 2,
|
|
- argv + 2, (char *)htPtr, 0) != TCL_OK) ||
|
|
+ (CONST char **)argv + 2, (char *)htPtr, 0) != TCL_OK) ||
|
|
(ConfigureText(interp, htPtr) != TCL_OK)) {
|
|
Tk_DestroyWindow(htPtr->tkwin);
|
|
return TCL_ERROR;
|
|
--- a/generic/bltTable.c
|
|
+++ b/generic/bltTable.c
|
|
@@ -1181,7 +1181,7 @@
|
|
Tcl_Interp *interp;
|
|
Entry *entryPtr;
|
|
int argc; /* Option-value arguments */
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
int oldRowSpan, oldColSpan;
|
|
|
|
@@ -1533,7 +1533,7 @@
|
|
PartitionInfo *infoPtr;
|
|
char *pattern;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
RowColumn *rcPtr;
|
|
register Blt_ChainLink *linkPtr;
|
|
@@ -1852,7 +1852,7 @@
|
|
Table *tablePtr; /* Table to be configured */
|
|
Tcl_Interp *interp; /* Interpreter to report results back to */
|
|
int argc;
|
|
- char **argv; /* Option-value pairs */
|
|
+ CONST char **argv; /* Option-value pairs */
|
|
{
|
|
if (argc == 0) {
|
|
return Tk_ConfigureInfo(interp, tablePtr->tkwin, tableConfigSpecs,
|
|
@@ -2179,7 +2179,7 @@
|
|
Tk_Window tkwin;
|
|
int row, column;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Entry *entryPtr;
|
|
int result = TCL_OK;
|
|
--- a/generic/bltTabnotebook.c
|
|
+++ b/generic/bltTabnotebook.c
|
|
@@ -2758,7 +2758,7 @@
|
|
* may not already have values for
|
|
* some fields. */
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
int flags;
|
|
{
|
|
XGCValues gcValues;
|
|
@@ -3155,7 +3155,7 @@
|
|
Notebook *nbPtr;
|
|
Tcl_Interp *interp;
|
|
int argc; /* Not used. */
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Tab *tabPtr;
|
|
Blt_ChainLink *linkPtr, *beforeLinkPtr;
|
|
@@ -3193,7 +3193,7 @@
|
|
}
|
|
lastNotebookInstance = nbPtr;
|
|
if (Blt_ConfigureWidgetComponent(interp, nbPtr->tkwin, tabPtr->name,
|
|
- "Tab", tabConfigSpecs, argc - 3, argv + 3, (char *)tabPtr, 0)
|
|
+ "Tab", tabConfigSpecs, argc - 3, (char **)argv + 3, (char *)tabPtr, 0)
|
|
!= TCL_OK) {
|
|
DestroyTab(nbPtr, tabPtr);
|
|
return TCL_ERROR;
|
|
@@ -3658,10 +3658,10 @@
|
|
Notebook *nbPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
int nTabs, nOpts, result;
|
|
- char **options;
|
|
+ CONST char **options;
|
|
register int i;
|
|
Tab *tabPtr;
|
|
|
|
--- a/generic/bltTabset.c
|
|
+++ b/generic/bltTabset.c
|
|
@@ -3154,7 +3154,7 @@
|
|
* may not already have values for
|
|
* some fields. */
|
|
int argc,
|
|
- char **argv,
|
|
+ CONST char **argv,
|
|
int flags)
|
|
{
|
|
XGCValues gcValues;
|
|
@@ -3404,7 +3404,7 @@
|
|
Tabset *setPtr,
|
|
Tcl_Interp *interp,
|
|
int argc,
|
|
- char **argv)
|
|
+ CONST char **argv)
|
|
{
|
|
tabSet = setPtr;
|
|
if (argc == 2) {
|
|
@@ -3665,7 +3665,7 @@
|
|
} else {
|
|
Tab *beforePtr;
|
|
|
|
- if (GetTabByIndName(setPtr, argv[2], &beforePtr)
|
|
+ if (GetTabByIndName(setPtr, (char *)argv[2], &beforePtr)
|
|
!= TCL_OK) {
|
|
result = TCL_ERROR;
|
|
goto finish;
|
|
@@ -4415,10 +4415,10 @@
|
|
Tabset *setPtr;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
int nTabs, nOpts, result;
|
|
- char **options;
|
|
+ CONST char **options;
|
|
register int i;
|
|
Tab *tabPtr;
|
|
|
|
@@ -6844,7 +6844,7 @@
|
|
return TCL_ERROR;
|
|
}
|
|
setPtr = CreateTabset(interp, tkwin);
|
|
- if (ConfigureTabset(interp, setPtr, argc - 2, argv + 2, 0) != TCL_OK) {
|
|
+ if (ConfigureTabset(interp, setPtr, argc - 2, (CONST char **)argv + 2, 0) != TCL_OK) {
|
|
Tk_DestroyWindow(setPtr->tkwin);
|
|
return TCL_ERROR;
|
|
}
|
|
--- a/generic/bltTreeViewCmd.c
|
|
+++ b/generic/bltTreeViewCmd.c
|
|
@@ -5186,8 +5186,8 @@
|
|
char *string, *subPath;
|
|
int nLen, idx, useid, oLen;
|
|
int sobjc, tobjc;
|
|
- Tcl_Obj *CONST *sobjv;
|
|
- Tcl_Obj *CONST *tobjv;
|
|
+ Tcl_Obj **sobjv;
|
|
+ Tcl_Obj **tobjv;
|
|
TreeViewStyle *stylePtr;
|
|
TreeViewColumn *columnPtr;
|
|
TreeViewEntry *entryPtr;
|
|
--- a/generic/bltUnixDnd.c
|
|
+++ b/generic/bltUnixDnd.c
|
|
@@ -620,7 +620,7 @@
|
|
static void DestroyDnd _ANSI_ARGS_((DestroyData data));
|
|
static int DndEventProc _ANSI_ARGS_((ClientData clientData, XEvent *eventPtr));
|
|
static int ConfigureToken _ANSI_ARGS_((Tcl_Interp *interp, Dnd *dndPtr,
|
|
- int argc, char **argv, int flags));
|
|
+ int argc, CONST char **argv, int flags));
|
|
|
|
static Winfo *OverTarget _ANSI_ARGS_((Dnd *dndPtr));
|
|
static void AddTargetProperty _ANSI_ARGS_((Dnd *dndPtr));
|
|
@@ -1825,7 +1825,7 @@
|
|
Tcl_Interp *interp; /* current interpreter */
|
|
Dnd *dndPtr; /* Drag&drop source widget record */
|
|
int argc; /* number of arguments */
|
|
- char **argv; /* argument strings */
|
|
+ CONST char **argv; /* argument strings */
|
|
int flags; /* flags controlling interpretation */
|
|
{
|
|
GC newGC;
|
|
@@ -3761,12 +3761,12 @@
|
|
ClientData clientData; /* Thread-specific data. */
|
|
Tcl_Interp *interp; /* current interpreter */
|
|
int argc; /* number of arguments */
|
|
- char **argv; /* argument strings */
|
|
+ CONST char **argv; /* argument strings */
|
|
{
|
|
Dnd *dndPtr;
|
|
int flags;
|
|
|
|
- if (GetDnd(clientData, interp, argv[2], &dndPtr) != TCL_OK) {
|
|
+ if (GetDnd(clientData, interp, (char *)argv[2], &dndPtr) != TCL_OK) {
|
|
return TCL_ERROR;
|
|
}
|
|
flags = TK_CONFIG_ARGV_ONLY;
|
|
@@ -4418,7 +4418,7 @@
|
|
ClientData clientData;
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
DndInterpData *dataPtr = clientData;
|
|
Tk_Window tkwin;
|
|
@@ -4462,12 +4462,12 @@
|
|
ClientData clientData; /* Thread-specific data. */
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Dnd *dndPtr;
|
|
int flags;
|
|
|
|
- if (GetDnd(clientData, interp, argv[3], &dndPtr) != TCL_OK) {
|
|
+ if (GetDnd(clientData, interp, (char *)argv[3], &dndPtr) != TCL_OK) {
|
|
return TCL_ERROR;
|
|
}
|
|
flags = 0;
|
|
@@ -4529,13 +4529,13 @@
|
|
ClientData clientData; /* Thread-specific data. */
|
|
Tcl_Interp *interp;
|
|
int argc;
|
|
- char **argv;
|
|
+ CONST char **argv;
|
|
{
|
|
Token *tokenPtr;
|
|
Dnd *dndPtr;
|
|
int flags;
|
|
|
|
- if (GetDnd(clientData, interp, argv[3], &dndPtr) != TCL_OK) {
|
|
+ if (GetDnd(clientData, interp, (char *)argv[3], &dndPtr) != TCL_OK) {
|
|
return TCL_ERROR;
|
|
}
|
|
flags = TK_CONFIG_ARGV_ONLY;
|
|
--- a/generic/tkButton.c
|
|
+++ b/generic/tkButton.c
|
|
@@ -855,7 +855,7 @@
|
|
Tcl_Interp *interp, int argc, char **argv));
|
|
static void ComputeButtonGeometry _ANSI_ARGS_((Button *butPtr));
|
|
static int ConfigureButton _ANSI_ARGS_((Tcl_Interp *interp,
|
|
- Button *butPtr, int argc, char **argv,
|
|
+ Button *butPtr, int argc, CONST char **argv,
|
|
int flags));
|
|
static void DestroyButton _ANSI_ARGS_((Button *butPtr));
|
|
static void DisplayButton _ANSI_ARGS_((ClientData clientData));
|
|
@@ -1305,7 +1305,7 @@
|
|
Tk_CreateEventHandler(butPtr->tkwin,
|
|
ExposureMask | StructureNotifyMask | FocusChangeMask,
|
|
ButtonEventProc, butPtr);
|
|
- if (ConfigureButton(interp, butPtr, argc - 2, argv + 2,
|
|
+ if (ConfigureButton(interp, butPtr, argc - 2, (CONST char **)argv + 2,
|
|
configFlags[type]) != TCL_OK) {
|
|
Tk_DestroyWindow(butPtr->tkwin);
|
|
return TCL_ERROR;
|
|
@@ -1337,7 +1337,7 @@
|
|
value = Tcl_GetString(valuePtr);
|
|
}
|
|
}
|
|
- return value;
|
|
+ return (char *)value;
|
|
}
|
|
|
|
static int ButtonSetValue(Button *butPtr, char *value, int warn) {
|
|
@@ -1427,7 +1427,7 @@
|
|
(char *)butPtr, argv[2],
|
|
configFlags[butPtr->type]);
|
|
} else {
|
|
- result = ConfigureButton(interp, butPtr, argc - 2, argv + 2,
|
|
+ result = ConfigureButton(interp, butPtr, argc - 2, (CONST char **)argv + 2,
|
|
configFlags[butPtr->type] | TK_CONFIG_ARGV_ONLY);
|
|
}
|
|
} else if ((c == 'd') && (strncmp(argv[1], "deselect", length) == 0)
|
|
@@ -1694,7 +1694,7 @@
|
|
register Button *butPtr; /* Information about widget; may or may
|
|
* not already have values for some fields. */
|
|
int argc; /* Number of valid entries in argv. */
|
|
- char **argv; /* Arguments. */
|
|
+ CONST char **argv; /* Arguments. */
|
|
int flags; /* Flags to pass to Tk_ConfigureWidget. */
|
|
{
|
|
XGCValues gcValues;
|
|
--- a/generic/tkFrame.c
|
|
+++ b/generic/tkFrame.c
|
|
@@ -734,7 +734,7 @@
|
|
#endif /* TK_MAJOR_VERSION > 4 */
|
|
|
|
if (Tk_ConfigureWidget(interp, framePtr->tkwin, configSpecs,
|
|
- argc, argv, (char *)framePtr, flags | framePtr->mask) != TCL_OK) {
|
|
+ argc, (CONST char **)argv, (char *)framePtr, flags | framePtr->mask) != TCL_OK) {
|
|
return TCL_ERROR;
|
|
}
|
|
if (framePtr->tile != NULL) {
|
|
--- a/generic/bltScrollbar.c
|
|
+++ b/generic/bltScrollbar.c
|
|
@@ -301,7 +301,7 @@
|
|
static void ComputeScrollbarGeometry _ANSI_ARGS_((
|
|
Scrollbar *scrollPtr));
|
|
static int ConfigureScrollbar _ANSI_ARGS_((Tcl_Interp *interp,
|
|
- Scrollbar *scrollPtr, int argc, char **argv,
|
|
+ Scrollbar *scrollPtr, int argc, CONST char **argv,
|
|
int flags));
|
|
static void DestroyScrollbar _ANSI_ARGS_((DestroyData *memPtr));
|
|
static void DisplayScrollbar _ANSI_ARGS_((ClientData clientData));
|
|
@@ -434,7 +434,7 @@
|
|
Tk_CreateEventHandler(scrollPtr->tkwin,
|
|
ExposureMask | StructureNotifyMask | FocusChangeMask,
|
|
ScrollbarEventProc, (ClientData)scrollPtr);
|
|
- if (ConfigureScrollbar(interp, scrollPtr, argc - 2, argv + 2, 0) != TCL_OK) {
|
|
+ if (ConfigureScrollbar(interp, scrollPtr, argc - 2, (CONST char **)argv + 2, 0) != TCL_OK) {
|
|
goto error;
|
|
}
|
|
Tcl_SetResult(interp, Tk_PathName(scrollPtr->tkwin), TCL_VOLATILE);
|
|
@@ -558,7 +558,7 @@
|
|
result = Tk_ConfigureInfo(interp, scrollPtr->tkwin, configSpecs,
|
|
(char *)scrollPtr, argv[2], 0);
|
|
} else {
|
|
- result = ConfigureScrollbar(interp, scrollPtr, argc - 2, argv + 2,
|
|
+ result = ConfigureScrollbar(interp, scrollPtr, argc - 2, (CONST char **)argv + 2,
|
|
TK_CONFIG_ARGV_ONLY);
|
|
}
|
|
} else if ((c == 'd') && (strncmp(argv[1], "delta", length) == 0)) {
|
|
@@ -904,7 +904,7 @@
|
|
* may not already have values for
|
|
* some fields. */
|
|
int argc; /* Number of valid entries in argv. */
|
|
- char **argv; /* Arguments. */
|
|
+ CONST char **argv; /* Arguments. */
|
|
int flags; /* Flags to pass to
|
|
* Tk_ConfigureWidget. */
|
|
{
|
|
--- a/generic/bltTed.c
|
|
+++ b/generic/bltTed.c
|
|
@@ -819,7 +819,7 @@
|
|
ConfigureTed(tedPtr, argc, argv, flags)
|
|
Ted *tedPtr;
|
|
int argc;
|
|
- char **argv; /* Option-value pairs */
|
|
+ CONST char **argv; /* Option-value pairs */
|
|
int flags;
|
|
{
|
|
XGCValues gcValues;
|