summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.decls10
-rw-r--r--generic/tk.h4
-rw-r--r--generic/tkCanvArc.c4
-rw-r--r--generic/tkCanvBmap.c4
-rw-r--r--generic/tkCanvImg.c4
-rw-r--r--generic/tkCanvLine.c4
-rw-r--r--generic/tkCanvPoly.c4
-rw-r--r--generic/tkCanvPs.c4
-rw-r--r--generic/tkCanvText.c4
-rw-r--r--generic/tkCanvWind.c4
-rw-r--r--generic/tkCanvas.c4
-rw-r--r--generic/tkDecls.h21
-rw-r--r--generic/tkImgBmap.c4
-rw-r--r--generic/tkImgPhoto.c4
-rw-r--r--generic/tkOldConfig.c40
-rw-r--r--generic/tkRectOval.c4
-rw-r--r--generic/tkScrollbar.c20
-rw-r--r--generic/tkScrollbar.h12
18 files changed, 76 insertions, 79 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index a68864c..e05b320 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tk.decls,v 1.51 2010/02/05 22:45:03 nijtmans Exp $
+# RCS: @(#) $Id: tk.decls,v 1.52 2010/02/17 19:21:15 nijtmans Exp $
library tk
@@ -136,17 +136,17 @@ declare 26 generic {
}
declare 27 generic {
int Tk_ConfigureInfo(Tcl_Interp *interp,
- Tk_Window tkwin, Tk_ConfigSpec *specs,
+ Tk_Window tkwin, const Tk_ConfigSpec *specs,
char *widgRec, const char *argvName, int flags)
}
declare 28 generic {
int Tk_ConfigureValue(Tcl_Interp *interp,
- Tk_Window tkwin, Tk_ConfigSpec *specs,
+ Tk_Window tkwin, const Tk_ConfigSpec *specs,
char *widgRec, const char *argvName, int flags)
}
declare 29 generic {
int Tk_ConfigureWidget(Tcl_Interp *interp,
- Tk_Window tkwin, Tk_ConfigSpec *specs,
+ Tk_Window tkwin, const Tk_ConfigSpec *specs,
int argc, CONST84 char **argv, char *widgRec,
int flags)
}
@@ -318,7 +318,7 @@ declare 73 generic {
void Tk_FreeImage(Tk_Image image)
}
declare 74 generic {
- void Tk_FreeOptions(Tk_ConfigSpec *specs,
+ void Tk_FreeOptions(const Tk_ConfigSpec *specs,
char *widgRec, Display *display, int needFlags)
}
declare 75 generic {
diff --git a/generic/tk.h b/generic/tk.h
index 0512b1d..d154e86 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.132 2009/09/04 09:39:54 dkf Exp $
+ * RCS: @(#) $Id: tk.h,v 1.133 2010/02/17 19:21:16 nijtmans Exp $
*/
#ifndef _TK
@@ -1031,7 +1031,7 @@ typedef struct Tk_ItemType {
Tk_ItemCreateProc *createProc;
/* Procedure to create a new item of this
* type. */
- Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for
+ CONST86 Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for
* this type. Used for returning configuration
* info. */
Tk_ItemConfigureProc *configProc;
diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c
index cb829fa..96bc03c 100644
--- a/generic/tkCanvArc.c
+++ b/generic/tkCanvArc.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: tkCanvArc.c,v 1.21 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvArc.c,v 1.22 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -104,7 +104,7 @@ static const Tk_CustomOption pixelOption = {
TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
NULL, Tk_Offset(ArcItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c
index 9599598..256cc64 100644
--- a/generic/tkCanvBmap.c
+++ b/generic/tkCanvBmap.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: tkCanvBmap.c,v 1.18 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvBmap.c,v 1.19 2010/02/17 19:21:15 nijtmans Exp $
*/
#include "tkInt.h"
@@ -49,7 +49,7 @@ static const Tk_CustomOption tagsOption = {
Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_COLOR, "-activebackground", NULL, NULL,
NULL, Tk_Offset(BitmapItem, activeBgColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activebitmap", NULL, NULL,
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index 8d6d809..5141dbe 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.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: tkCanvImg.c,v 1.16 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvImg.c,v 1.17 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -52,7 +52,7 @@ static const Tk_CustomOption tagsOption = {
Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_STRING, "-activeimage", NULL, NULL,
NULL, Tk_Offset(ImageItem, activeImageString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_ANCHOR, "-anchor", NULL, NULL,
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 0533640..0752354 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvLine.c,v 1.31 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvLine.c,v 1.32 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -157,7 +157,7 @@ static const Tk_CustomOption pixelOption = {
TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
NULL, Tk_Offset(LineItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 257f4f4..9f09c3c 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvPoly.c,v 1.25 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvPoly.c,v 1.26 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -76,7 +76,7 @@ static const Tk_CustomOption pixelOption = {
TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
NULL, Tk_Offset(PolygonItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index 9c297e4..1af0a3a 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvPs.c,v 1.29 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvPs.c,v 1.30 2010/02/17 19:21:17 nijtmans Exp $
*/
#include "tkInt.h"
@@ -94,7 +94,7 @@ typedef struct TkPostscriptInfo {
* canvas "postscript" command and fill in TkPostscriptInfo structures.
*/
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_STRING, "-colormap", NULL, NULL,
"", Tk_Offset(TkPostscriptInfo, colorVar), 0, NULL},
{TK_CONFIG_STRING, "-colormode", NULL, NULL,
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index e05c905..d5f1ae2 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.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: tkCanvText.c,v 1.37 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvText.c,v 1.38 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -95,7 +95,7 @@ static const Tk_CustomOption offsetOption = {
TkOffsetParseProc, TkOffsetPrintProc, (ClientData) (TK_OFFSET_RELATIVE)
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_COLOR, "-activefill", NULL, NULL,
NULL, Tk_Offset(TextItem, activeColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activestipple", NULL, NULL,
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index b4653c3..031879f 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.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: tkCanvWind.c,v 1.21 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvWind.c,v 1.22 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -46,7 +46,7 @@ static const Tk_CustomOption tagsOption = {
Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_ANCHOR, "-anchor", NULL, NULL,
"center", Tk_Offset(WindowItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_PIXELS, "-height", NULL, NULL,
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index ade1374..4e39367 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.64 2010/01/19 22:10:03 dkf Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.65 2010/02/17 19:21:16 nijtmans Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -116,7 +116,7 @@ static const Tk_CustomOption offsetOption = {
* Information used for argv parsing.
*/
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_BORDER, "-background", "background", "Background",
DEF_CANVAS_BG_COLOR, Tk_Offset(TkCanvas, bgBorder),
TK_CONFIG_COLOR_ONLY, NULL},
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index e1f270a..8c0184e 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkDecls.h,v 1.45 2010/02/05 10:56:43 nijtmans Exp $
+ * RCS: @(#) $Id: tkDecls.h,v 1.46 2010/02/17 19:21:16 nijtmans Exp $
*/
#ifndef _TKDECLS
@@ -204,14 +204,14 @@ EXTERN int Tk_ClipboardClear(Tcl_Interp *interp,
#define Tk_ConfigureInfo_TCL_DECLARED
/* 27 */
EXTERN int Tk_ConfigureInfo(Tcl_Interp *interp, Tk_Window tkwin,
- Tk_ConfigSpec *specs, char *widgRec,
+ const Tk_ConfigSpec *specs, char *widgRec,
const char *argvName, int flags);
#endif
#ifndef Tk_ConfigureValue_TCL_DECLARED
#define Tk_ConfigureValue_TCL_DECLARED
/* 28 */
EXTERN int Tk_ConfigureValue(Tcl_Interp *interp,
- Tk_Window tkwin, Tk_ConfigSpec *specs,
+ Tk_Window tkwin, const Tk_ConfigSpec *specs,
char *widgRec, const char *argvName,
int flags);
#endif
@@ -219,7 +219,7 @@ EXTERN int Tk_ConfigureValue(Tcl_Interp *interp,
#define Tk_ConfigureWidget_TCL_DECLARED
/* 29 */
EXTERN int Tk_ConfigureWidget(Tcl_Interp *interp,
- Tk_Window tkwin, Tk_ConfigSpec *specs,
+ Tk_Window tkwin, const Tk_ConfigSpec *specs,
int argc, CONST84 char **argv, char *widgRec,
int flags);
#endif
@@ -496,8 +496,9 @@ EXTERN void Tk_FreeImage(Tk_Image image);
#ifndef Tk_FreeOptions_TCL_DECLARED
#define Tk_FreeOptions_TCL_DECLARED
/* 74 */
-EXTERN void Tk_FreeOptions(Tk_ConfigSpec *specs, char *widgRec,
- Display *display, int needFlags);
+EXTERN void Tk_FreeOptions(const Tk_ConfigSpec *specs,
+ char *widgRec, Display *display,
+ int needFlags);
#endif
#ifndef Tk_FreePixmap_TCL_DECLARED
#define Tk_FreePixmap_TCL_DECLARED
@@ -1730,9 +1731,9 @@ typedef struct TkStubs {
void (*tk_ClearSelection) (Tk_Window tkwin, Atom selection); /* 24 */
int (*tk_ClipboardAppend) (Tcl_Interp *interp, Tk_Window tkwin, Atom target, Atom format, const char *buffer); /* 25 */
int (*tk_ClipboardClear) (Tcl_Interp *interp, Tk_Window tkwin); /* 26 */
- int (*tk_ConfigureInfo) (Tcl_Interp *interp, Tk_Window tkwin, Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 27 */
- int (*tk_ConfigureValue) (Tcl_Interp *interp, Tk_Window tkwin, Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 28 */
- int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, Tk_ConfigSpec *specs, int argc, CONST84 char **argv, char *widgRec, int flags); /* 29 */
+ int (*tk_ConfigureInfo) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 27 */
+ int (*tk_ConfigureValue) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 28 */
+ int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, int argc, CONST84 char **argv, char *widgRec, int flags); /* 29 */
void (*tk_ConfigureWindow) (Tk_Window tkwin, unsigned int valueMask, XWindowChanges *valuePtr); /* 30 */
Tk_TextLayout (*tk_ComputeTextLayout) (Tk_Font font, const char *str, int numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr, int *heightPtr); /* 31 */
Tk_Window (*tk_CoordsToWindow) (int rootX, int rootY, Tk_Window tkwin); /* 32 */
@@ -1777,7 +1778,7 @@ typedef struct TkStubs {
void (*tk_FreeFont) (Tk_Font f); /* 71 */
void (*tk_FreeGC) (Display *display, GC gc); /* 72 */
void (*tk_FreeImage) (Tk_Image image); /* 73 */
- void (*tk_FreeOptions) (Tk_ConfigSpec *specs, char *widgRec, Display *display, int needFlags); /* 74 */
+ void (*tk_FreeOptions) (const Tk_ConfigSpec *specs, char *widgRec, Display *display, int needFlags); /* 74 */
void (*tk_FreePixmap) (Display *display, Pixmap pixmap); /* 75 */
void (*tk_FreeTextLayout) (Tk_TextLayout textLayout); /* 76 */
void (*tk_FreeXId) (Display *display, XID xid); /* 77 */
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index bec7a93..32eb536 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkImgBmap.c,v 1.31 2010/02/13 13:47:49 nijtmans Exp $
+ * RCS: @(#) $Id: tkImgBmap.c,v 1.32 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -108,7 +108,7 @@ Tk_ImageType tkBitmapImageType = {
* Information used for parsing configuration specs:
*/
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_UID, "-background", NULL, NULL,
"", Tk_Offset(BitmapMaster, bgUid), 0, NULL},
{TK_CONFIG_STRING, "-data", NULL, NULL,
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 8e0f6e3..9066456 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -17,7 +17,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.95 2010/02/13 13:47:49 nijtmans Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.96 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkImgPhoto.h"
@@ -152,7 +152,7 @@ static Tcl_ThreadDataKey dataKey;
* Information used for parsing configuration specifications:
*/
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_STRING, "-file", NULL, NULL,
NULL, Tk_Offset(PhotoMaster, fileString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_DOUBLE, "-gamma", NULL, NULL,
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index 7ce1c36..9f0655e 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkOldConfig.c,v 1.29 2010/01/22 14:17:53 nijtmans Exp $
+ * RCS: @(#) $Id: tkOldConfig.c,v 1.30 2010/02/17 19:21:17 nijtmans Exp $
*/
#include "tkInt.h"
@@ -38,9 +38,9 @@ static Tk_ConfigSpec * FindConfigSpec(Tcl_Interp *interp,
Tk_ConfigSpec *specs, const char *argvName,
int needFlags, int hateFlags);
static char * FormatConfigInfo(Tcl_Interp *interp, Tk_Window tkwin,
- Tk_ConfigSpec *specPtr, char *widgRec);
+ const Tk_ConfigSpec *specPtr, char *widgRec);
static const char * FormatConfigValue(Tcl_Interp *interp, Tk_Window tkwin,
- Tk_ConfigSpec *specPtr, char *widgRec,
+ const Tk_ConfigSpec *specPtr, char *widgRec,
char *buffer, Tcl_FreeProc **freeProcPtr);
static Tk_ConfigSpec * GetCachedSpecs(Tcl_Interp *interp,
const Tk_ConfigSpec *staticSpecs);
@@ -74,7 +74,7 @@ Tk_ConfigureWidget(
Tcl_Interp *interp, /* Interpreter for error reporting. */
Tk_Window tkwin, /* Window containing widget (needed to set up
* X resources). */
- Tk_ConfigSpec *specs, /* Describes legal options. */
+ const Tk_ConfigSpec *specs, /* Describes legal options. */
int argc, /* Number of elements in argv. */
const char **argv, /* Command-line options. */
char *widgRec, /* Record whose fields are to be modified.
@@ -84,7 +84,7 @@ Tk_ConfigureWidget(
* considered. Also, may have
* TK_CONFIG_ARGV_ONLY set. */
{
- register Tk_ConfigSpec *specPtr;
+ register Tk_ConfigSpec *specPtr, *staticSpecs;
Tk_Uid value; /* Value of option from database. */
int needFlags; /* Specs must contain this set of flags or
* else they are not considered. */
@@ -112,7 +112,7 @@ Tk_ConfigureWidget(
* Get the build of the config for this interpreter.
*/
- specs = GetCachedSpecs(interp, specs);
+ staticSpecs = GetCachedSpecs(interp, specs);
/*
* Pass one: scan through all of the arguments, processing those that
@@ -127,7 +127,7 @@ Tk_ConfigureWidget(
} else {
arg = *argv;
}
- specPtr = FindConfigSpec(interp, specs, arg, needFlags, hateFlags);
+ specPtr = FindConfigSpec(interp, staticSpecs, arg, needFlags, hateFlags);
if (specPtr == NULL) {
return TCL_ERROR;
}
@@ -165,7 +165,7 @@ Tk_ConfigureWidget(
*/
if (!(flags & TK_CONFIG_ARGV_ONLY)) {
- for (specPtr=specs; specPtr->type!=TK_CONFIG_END; specPtr++) {
+ for (specPtr = staticSpecs; specPtr->type != TK_CONFIG_END; specPtr++) {
if ((specPtr->specFlags & TK_CONFIG_OPTION_SPECIFIED)
|| (specPtr->argvName == NULL)
|| (specPtr->type == TK_CONFIG_SYNONYM)) {
@@ -593,7 +593,7 @@ int
Tk_ConfigureInfo(
Tcl_Interp *interp, /* Interpreter for error reporting. */
Tk_Window tkwin, /* Window corresponding to widgRec. */
- Tk_ConfigSpec *specs, /* Describes legal options. */
+ const Tk_ConfigSpec *specs, /* Describes legal options. */
char *widgRec, /* Record whose fields contain current values
* for options. */
const char *argvName, /* If non-NULL, indicates a single option
@@ -603,7 +603,7 @@ Tk_ConfigureInfo(
* be present in config specs for them to be
* considered. */
{
- register Tk_ConfigSpec *specPtr;
+ register Tk_ConfigSpec *specPtr, *staticSpecs;
int needFlags, hateFlags;
char *list;
const char *leader = "{";
@@ -619,7 +619,7 @@ Tk_ConfigureInfo(
* Get the build of the config for this interpreter.
*/
- specs = GetCachedSpecs(interp, specs);
+ staticSpecs = GetCachedSpecs(interp, specs);
/*
* If information is only wanted for a single configuration spec, then
@@ -628,7 +628,7 @@ Tk_ConfigureInfo(
Tcl_ResetResult(interp);
if (argvName != NULL) {
- specPtr = FindConfigSpec(interp, specs, argvName, needFlags,hateFlags);
+ specPtr = FindConfigSpec(interp, staticSpecs, argvName, needFlags,hateFlags);
if (specPtr == NULL) {
return TCL_ERROR;
}
@@ -643,7 +643,7 @@ Tk_ConfigureInfo(
* information.
*/
- for (specPtr = specs; specPtr->type != TK_CONFIG_END; specPtr++) {
+ for (specPtr = staticSpecs; specPtr->type != TK_CONFIG_END; specPtr++) {
if ((argvName != NULL) && (specPtr->argvName != argvName)) {
continue;
}
@@ -685,7 +685,7 @@ FormatConfigInfo(
Tcl_Interp *interp, /* Interpreter to use for things like
* floating-point precision. */
Tk_Window tkwin, /* Window corresponding to widget. */
- register Tk_ConfigSpec *specPtr,
+ register const Tk_ConfigSpec *specPtr,
/* Pointer to information describing
* option. */
char *widgRec) /* Pointer to record holding current values of
@@ -752,7 +752,7 @@ static const char *
FormatConfigValue(
Tcl_Interp *interp, /* Interpreter for use in real conversions. */
Tk_Window tkwin, /* Window corresponding to widget. */
- Tk_ConfigSpec *specPtr, /* Pointer to information describing option.
+ const Tk_ConfigSpec *specPtr, /* Pointer to information describing option.
* Must not point to a synonym option. */
char *widgRec, /* Pointer to record holding current values of
* info for widget. */
@@ -904,7 +904,7 @@ int
Tk_ConfigureValue(
Tcl_Interp *interp, /* Interpreter for error reporting. */
Tk_Window tkwin, /* Window corresponding to widgRec. */
- Tk_ConfigSpec *specs, /* Describes legal options. */
+ const Tk_ConfigSpec *specs, /* Describes legal options. */
char *widgRec, /* Record whose fields contain current values
* for options. */
const char *argvName, /* Gives the command-line name for the option
@@ -930,9 +930,9 @@ Tk_ConfigureValue(
* Get the build of the config for this interpreter.
*/
- specs = GetCachedSpecs(interp, specs);
+ specPtr = GetCachedSpecs(interp, specs);
- specPtr = FindConfigSpec(interp, specs, argvName, needFlags, hateFlags);
+ specPtr = FindConfigSpec(interp, specPtr, argvName, needFlags, hateFlags);
if (specPtr == NULL) {
return TCL_ERROR;
}
@@ -973,7 +973,7 @@ Tk_ConfigureValue(
/* ARGSUSED */
void
Tk_FreeOptions(
- Tk_ConfigSpec *specs, /* Describes legal options. */
+ const Tk_ConfigSpec *specs, /* Describes legal options. */
char *widgRec, /* Record whose fields contain current values
* for options. */
Display *display, /* X display; needed for freeing some
@@ -982,7 +982,7 @@ Tk_FreeOptions(
* be present in config specs for them to be
* considered. */
{
- register Tk_ConfigSpec *specPtr;
+ register const Tk_ConfigSpec *specPtr;
char *ptr;
for (specPtr = specs; specPtr->type != TK_CONFIG_END; specPtr++) {
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index beb04f8..d300259 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.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: tkRectOval.c,v 1.21 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkRectOval.c,v 1.22 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -60,7 +60,7 @@ static const Tk_CustomOption pixelOption = {
TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL
};
-static Tk_ConfigSpec configSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
NULL, Tk_Offset(RectOvalItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c
index 04e3333..fc93574 100644
--- a/generic/tkScrollbar.c
+++ b/generic/tkScrollbar.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkScrollbar.c,v 1.19 2010/02/16 21:12:56 nijtmans Exp $
+ * RCS: @(#) $Id: tkScrollbar.c,v 1.20 2010/02/17 19:21:16 nijtmans Exp $
*/
#include "tkInt.h"
@@ -26,14 +26,14 @@ static const Tk_CustomOption orientOption = {
TkOrientParseProc, TkOrientPrintProc, (ClientData) NULL
};
-/* static space for "-width" default value */
-static char defScrollbarWidth[TCL_INTEGER_SPACE] = DEF_SCROLLBAR_WIDTH;
+/* non-const space for "-width" default value for scrollbars */
+char tkDefScrollbarWidth[TCL_INTEGER_SPACE] = DEF_SCROLLBAR_WIDTH;
/*
* Information used for argv parsing.
*/
-Tk_ConfigSpec tkpScrollbarConfigSpecs[] = {
+static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_SCROLLBAR_ACTIVE_BG_COLOR, Tk_Offset(TkScrollbar, activeBorder),
TK_CONFIG_COLOR_ONLY, NULL},
@@ -90,7 +90,7 @@ Tk_ConfigSpec tkpScrollbarConfigSpecs[] = {
DEF_SCROLLBAR_TROUGH_MONO, Tk_Offset(TkScrollbar, troughColorPtr),
TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_PIXELS, "-width", "width", "Width",
- defScrollbarWidth, Tk_Offset(TkScrollbar, width), 0, NULL},
+ tkDefScrollbarWidth, Tk_Offset(TkScrollbar, width), 0, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -284,15 +284,15 @@ ScrollbarWidgetCmd(
goto error;
}
result = Tk_ConfigureValue(interp, scrollPtr->tkwin,
- tkpScrollbarConfigSpecs, (char *) scrollPtr, argv[2], 0);
+ configSpecs, (char *) scrollPtr, argv[2], 0);
} else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)
&& (length >= 2)) {
if (argc == 2) {
result = Tk_ConfigureInfo(interp, scrollPtr->tkwin,
- tkpScrollbarConfigSpecs, (char *) scrollPtr, NULL, 0);
+ configSpecs, (char *) scrollPtr, NULL, 0);
} else if (argc == 3) {
result = Tk_ConfigureInfo(interp, scrollPtr->tkwin,
- tkpScrollbarConfigSpecs, (char *) scrollPtr, argv[2], 0);
+ configSpecs, (char *) scrollPtr, argv[2], 0);
} else {
result = ConfigureScrollbar(interp, scrollPtr, argc-2, argv+2,
TK_CONFIG_ARGV_ONLY);
@@ -529,7 +529,7 @@ ConfigureScrollbar(
const char **argv, /* Arguments. */
int flags) /* Flags to pass to Tk_ConfigureWidget. */
{
- if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, tkpScrollbarConfigSpecs,
+ if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, configSpecs,
argc, argv, (char *) scrollPtr, flags) != TCL_OK) {
return TCL_ERROR;
}
@@ -604,7 +604,7 @@ TkScrollbarEventProc(
* Tk_FreeOptions handle all the standard option-related stuff.
*/
- Tk_FreeOptions(tkpScrollbarConfigSpecs, (char *) scrollPtr,
+ Tk_FreeOptions(configSpecs, (char *) scrollPtr,
scrollPtr->display, 0);
Tcl_EventuallyFree(scrollPtr, TCL_DYNAMIC);
} else if (eventPtr->type == ConfigureNotify) {
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index 11ea5c6..e9e52b4 100644
--- a/generic/tkScrollbar.h
+++ b/generic/tkScrollbar.h
@@ -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: tkScrollbar.h,v 1.9 2010/01/13 23:08:08 nijtmans Exp $
+ * RCS: @(#) $Id: tkScrollbar.h,v 1.10 2010/02/17 19:21:16 nijtmans Exp $
*/
#ifndef _TKSCROLLBAR
@@ -164,16 +164,12 @@ typedef struct TkScrollbar {
#define GOT_FOCUS 4
/*
- * Declaration of scrollbar class functions structure.
+ * Declaration of scrollbar class functions structure
+ * and default scrollbar width, for use in configSpec.
*/
MODULE_SCOPE const Tk_ClassProcs tkpScrollbarProcs;
-
-/*
- * Declaration of scrollbar configuration options.
- */
-
-MODULE_SCOPE Tk_ConfigSpec tkpScrollbarConfigSpecs[];
+MODULE_SCOPE char tkDefScrollbarWidth[TCL_INTEGER_SPACE];
/*
* Declaration of functions used in the implementation of the scrollbar