summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-02-16 21:12:56 (GMT)
committernijtmans <nijtmans>2010-02-16 21:12:56 (GMT)
commit98ad94bf967f4567ae47c4b74ffe11cc12f7d22f (patch)
treeb566e3894b84ff71cec41746404929097ffb61c6 /generic
parent759424b1be09259bf20d269efd93af21c5150a01 (diff)
downloadtk-98ad94bf967f4567ae47c4b74ffe11cc12f7d22f.zip
tk-98ad94bf967f4567ae47c4b74ffe11cc12f7d22f.tar.gz
tk-98ad94bf967f4567ae47c4b74ffe11cc12f7d22f.tar.bz2
tkWindow.c/tkStubInit.c adapted from stub changes in Tcl
tkArgv.c make defaultTable const tkScrollbar.c Store default for "-with" in static non-const memory tkWinInt.h make tkWinProcs const, and 5 tkWinX.c procs MODULE_SCOPE tkWinColor.c make sysColors const tkWinKey.c make keymap const tkWinScrlbr.c Simplify copying of "-with" default value. tkUnixWm.c make TkSetTransientFor static tests/textImage.test textImage-1.13 depends on hash-order
Diffstat (limited to 'generic')
-rw-r--r--generic/tkArgv.c4
-rw-r--r--generic/tkScrollbar.c7
-rw-r--r--generic/tkStubInit.c22
-rw-r--r--generic/tkWindow.c6
4 files changed, 21 insertions, 18 deletions
diff --git a/generic/tkArgv.c b/generic/tkArgv.c
index 8ad8331..a69e3e3 100644
--- a/generic/tkArgv.c
+++ b/generic/tkArgv.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: tkArgv.c,v 1.17 2008/11/08 18:44:39 dkf Exp $
+ * RCS: @(#) $Id: tkArgv.c,v 1.18 2010/02/16 21:12:56 nijtmans Exp $
*/
#include "tkInt.h"
@@ -20,7 +20,7 @@
* every application.
*/
-static Tk_ArgvInfo defaultTable[] = {
+static const Tk_ArgvInfo defaultTable[] = {
{"-help", TK_ARGV_HELP, NULL, NULL,
"Print summary of command-line options and abort"},
{NULL, TK_ARGV_END, NULL, NULL, NULL}
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c
index 983f73a..04e3333 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.18 2010/01/18 20:43:38 nijtmans Exp $
+ * RCS: @(#) $Id: tkScrollbar.c,v 1.19 2010/02/16 21:12:56 nijtmans Exp $
*/
#include "tkInt.h"
@@ -26,6 +26,9 @@ static const Tk_CustomOption orientOption = {
TkOrientParseProc, TkOrientPrintProc, (ClientData) NULL
};
+/* static space for "-width" default value */
+static char defScrollbarWidth[TCL_INTEGER_SPACE] = DEF_SCROLLBAR_WIDTH;
+
/*
* Information used for argv parsing.
*/
@@ -87,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",
- DEF_SCROLLBAR_WIDTH, Tk_Offset(TkScrollbar, width), 0, NULL},
+ defScrollbarWidth, Tk_Offset(TkScrollbar, width), 0, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index dae166d..92925c2 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -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: tkStubInit.c,v 1.72 2010/02/05 22:45:03 nijtmans Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.73 2010/02/16 21:12:56 nijtmans Exp $
*/
#include "tkInt.h"
@@ -47,11 +47,11 @@
* below should be made in the generic/tk.decls script.
*/
-MODULE_SCOPE const TkStubs tkConstStubs;
+MODULE_SCOPE const TkStubs tkStubs;
/* !BEGIN!: Do not edit below this line. */
-static const TkIntStubs tkIntConstStubs = {
+static const TkIntStubs tkIntStubs = {
TCL_STUB_MAGIC,
NULL,
TkAllocWindow, /* 0 */
@@ -336,7 +336,7 @@ static const TkIntStubs tkIntConstStubs = {
TkSmoothPrintProc, /* 180 */
};
-static const TkIntPlatStubs tkIntPlatConstStubs = {
+static const TkIntPlatStubs tkIntPlatStubs = {
TCL_STUB_MAGIC,
NULL,
#ifdef __WIN32__ /* WIN */
@@ -452,7 +452,7 @@ static const TkIntPlatStubs tkIntPlatConstStubs = {
#endif /* X11 */
};
-static const TkIntXlibStubs tkIntXlibConstStubs = {
+static const TkIntXlibStubs tkIntXlibStubs = {
TCL_STUB_MAGIC,
NULL,
#ifdef __WIN32__ /* WIN */
@@ -660,7 +660,7 @@ static const TkIntXlibStubs tkIntXlibConstStubs = {
#endif /* AQUA */
};
-static const TkPlatStubs tkPlatConstStubs = {
+static const TkPlatStubs tkPlatStubs = {
TCL_STUB_MAGIC,
NULL,
#ifdef __WIN32__ /* WIN */
@@ -687,13 +687,13 @@ static const TkPlatStubs tkPlatConstStubs = {
};
static const TkStubHooks tkStubHooks = {
- &tkPlatConstStubs,
- &tkIntConstStubs,
- &tkIntPlatConstStubs,
- &tkIntXlibConstStubs
+ &tkPlatStubs,
+ &tkIntStubs,
+ &tkIntPlatStubs,
+ &tkIntXlibStubs
};
-const TkStubs tkConstStubs = {
+const TkStubs tkStubs = {
TCL_STUB_MAGIC,
&tkStubHooks,
Tk_MainLoop, /* 0 */
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 877a667..2c9f0e3 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.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: tkWindow.c,v 1.110 2010/02/13 13:47:49 nijtmans Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.111 2010/02/16 21:12:56 nijtmans Exp $
*/
#include "tkInt.h"
@@ -2923,7 +2923,7 @@ Tk_SafeInit(
return Initialize(interp);
}
-MODULE_SCOPE const TkStubs tkConstStubs;
+MODULE_SCOPE const TkStubs tkStubs;
/*
*----------------------------------------------------------------------
@@ -3200,7 +3200,7 @@ Initialize(
*/
code = Tcl_PkgProvideEx(interp, "Tk", TK_PATCH_LEVEL,
- (ClientData) &tkConstStubs);
+ (ClientData) &tkStubs);
if (code != TCL_OK) {
goto done;
}