summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-01-13 23:08:06 (GMT)
committernijtmans <nijtmans>2010-01-13 23:08:06 (GMT)
commit353d7693729fb7a45a35be7158fc4b94db079735 (patch)
tree1f472912658d183c50de332bc66a33540b44f060
parent15e42ed5b2cbc9b9a5802d75268d97f302ac23c0 (diff)
downloadtk-353d7693729fb7a45a35be7158fc4b94db079735.zip
tk-353d7693729fb7a45a35be7158fc4b94db079735.tar.gz
tk-353d7693729fb7a45a35be7158fc4b94db079735.tar.bz2
Eliminate tkpMenubuttonClass
make tkpButtonProcs CONST fix gcc warnings: missing initializer
-rw-r--r--ChangeLog35
-rw-r--r--carbon/tkMacOSXButton.c6
-rw-r--r--carbon/tkMacOSXMenubutton.c12
-rw-r--r--carbon/tkMacOSXScrlbr.c9
-rw-r--r--generic/tkBusy.c4
-rw-r--r--generic/tkButton.c4
-rw-r--r--generic/tkButton.h4
-rw-r--r--generic/tkCanvas.c6
-rw-r--r--generic/tkConsole.c5
-rw-r--r--generic/tkEntry.c6
-rw-r--r--generic/tkFrame.c8
-rw-r--r--generic/tkListbox.c6
-rw-r--r--generic/tkMenu.c8
-rw-r--r--generic/tkMenubutton.c16
-rw-r--r--generic/tkMenubutton.h8
-rw-r--r--generic/tkMessage.c6
-rw-r--r--generic/tkScale.c6
-rw-r--r--generic/tkScrollbar.h4
-rw-r--r--generic/tkText.c6
-rw-r--r--generic/ttk/ttkWidget.c10
-rw-r--r--macosx/tkMacOSXButton.c6
-rw-r--r--macosx/tkMacOSXMenubutton.c11
-rw-r--r--macosx/tkMacOSXScrlbr.c9
-rw-r--r--unix/tkUnixButton.c6
-rw-r--r--unix/tkUnixMenubu.c11
-rw-r--r--unix/tkUnixScrlbr.c9
-rw-r--r--win/tkWinButton.c5
-rw-r--r--win/tkWinDialog.c6
-rw-r--r--win/tkWinEmbed.c4
-rw-r--r--win/tkWinFont.c6
-rw-r--r--win/tkWinInit.c4
-rw-r--r--win/tkWinKey.c4
-rw-r--r--win/tkWinPixmap.c3
-rw-r--r--win/tkWinScrlbr.c6
-rw-r--r--win/tkWinSend.c36
-rw-r--r--win/tkWinTest.c6
36 files changed, 173 insertions, 128 deletions
diff --git a/ChangeLog b/ChangeLog
index a895b63..96cc573 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2010-01-?? Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tkMenubutton.h: Eliminate tkpMenubuttonClass
+ * generic/tkButton.h make tkpButtonProcs CONST
+ * generic/tkBusy.c: fix gcc warning: missing initializer
+ * generic/tkButton.c
+ * generic/tkCanvas.c
+ * generic/tkConsole.c
+ * generic/tkEntry.c
+ * generic/tkFrame.c
+ * generic/tkListbox.c
+ * generic/tkMenu.c
+ * generic/tkMenubutton.c
+ * generic/tkMessage.c
+ * generic/tkScale.c
+ * generic/tkScrollbar.h
+ * generic/tkText.c
+ * generic/ttk/ttkWidget.c
+ * carbon/tkMacOSXButton.c
+ * carbon/tkMacOSXMenubutton.c
+ * carbon/tkMacOSXScrlbr.c
+ * macosx/tkMacOSXButton.c
+ * macosx/tkMacOSXMenubutton.c
+ * macosx/tkMacOSXScrlbr.c
+ * unix/tkUnixButton.c
+ * unix/tkUnixMenubu.c
+ * unix/tkUnixScrolbr.c
+ * win/tkWinButton.c
+ * win/tkWinDialog.c
+ * win/tkWinEmbed.c
+ * win/tkWinFont.c
+ * win/tkWinInit.c
+ * win/tkWinKey.c
+ * win/tkWinScrlbr.c
+
2010-01-10 Jan Nijtmans <nijtmans@users.sf.net>
* doc/SetClassProcs.3: CONSTify Tk_SetClassProcs
diff --git a/carbon/tkMacOSXButton.c b/carbon/tkMacOSXButton.c
index bae2a88..4bd2cbe 100644
--- a/carbon/tkMacOSXButton.c
+++ b/carbon/tkMacOSXButton.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: tkMacOSXButton.c,v 1.2 2009/06/29 14:35:01 das Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.3 2010/01/13 23:08:12 nijtmans Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -116,9 +116,11 @@ static void SetupBevelButton(MacButton *butPtr, ControlRef controlHandle,
* The class procedure table for the button widgets.
*/
-Tk_ClassProcs tkpButtonProcs = {
+const Tk_ClassProcs tkpButtonProcs = {
sizeof(Tk_ClassProcs), /* size */
TkButtonWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
static int bCount;
diff --git a/carbon/tkMacOSXMenubutton.c b/carbon/tkMacOSXMenubutton.c
index 7eb513e..7891760 100644
--- a/carbon/tkMacOSXMenubutton.c
+++ b/carbon/tkMacOSXMenubutton.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: tkMacOSXMenubutton.c,v 1.1 2009/06/26 01:42:47 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenubutton.c,v 1.2 2010/01/13 23:08:12 nijtmans Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -88,16 +88,6 @@ static void ComputeControlTitleParams(TkMenuButton *mbPtr,
static void CompareControlTitleParams(ControlTitleParams *p1Ptr,
ControlTitleParams *p2Ptr, int *titleChanged, int *styleChanged);
-/*
- * The structure below defines menubutton class behavior by means of
- * procedures that can be invoked from generic window code.
- */
-
-Tk_ClassProcs tkpMenubuttonClass = {
- sizeof(Tk_ClassProcs), /* size */
- TkMenuButtonWorldChanged, /* worldChangedProc */
-};
-
/*
*----------------------------------------------------------------------
diff --git a/carbon/tkMacOSXScrlbr.c b/carbon/tkMacOSXScrlbr.c
index ff5ce92..6a9f5a1 100644
--- a/carbon/tkMacOSXScrlbr.c
+++ b/carbon/tkMacOSXScrlbr.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: tkMacOSXScrlbr.c,v 1.1 2009/06/26 01:42:47 das Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.2 2010/01/13 23:08:12 nijtmans Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -97,8 +97,11 @@ static void UpdateControlValues(MacScrollbar *macScrollPtr);
* at which the variable is declared.
*/
-Tk_ClassProcs tkpScrollbarProcs = {
- sizeof(Tk_ClassProcs) /* size */
+const Tk_ClassProcs tkpScrollbarProcs = {
+ sizeof(Tk_ClassProcs), /* size */
+ NULL, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 4a6c5cb..6f200c3 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.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: tkBusy.c,v 1.6 2008/12/10 00:34:51 das Exp $
+ * RCS: @(#) $Id: tkBusy.c,v 1.7 2010/01/13 23:08:09 nijtmans Exp $
*/
#include "tkInt.h"
@@ -29,7 +29,7 @@ static Tk_OptionSpec busyOptionSpecs[] = {
DEF_BUSY_CURSOR, -1, Tk_Offset(Busy, cursor),
TK_OPTION_NULL_OK, 0, 0},
#endif
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
/*
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 70b77d0..38b374d 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.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: tkButton.c,v 1.36 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkButton.c,v 1.37 2010/01/13 23:08:07 nijtmans Exp $
*/
#include "tkInt.h"
@@ -144,7 +144,7 @@ static Tk_OptionSpec labelOptionSpecs[] = {
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
DEF_BUTTON_WRAP_LENGTH, Tk_Offset(TkButton, wrapLengthPtr),
Tk_Offset(TkButton, wrapLength), 0, 0, 0},
- {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0}
+ {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
static Tk_OptionSpec buttonOptionSpecs[] = {
diff --git a/generic/tkButton.h b/generic/tkButton.h
index 738626c..6eb1ce5 100644
--- a/generic/tkButton.h
+++ b/generic/tkButton.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: tkButton.h,v 1.16 2007/12/13 15:24:13 dgp Exp $
+ * RCS: @(#) $Id: tkButton.h,v 1.17 2010/01/13 23:08:07 nijtmans Exp $
*/
#ifndef _TKBUTTON
@@ -298,7 +298,7 @@ typedef struct {
* Declaration of variables shared between the files in the button module.
*/
-MODULE_SCOPE Tk_ClassProcs tkpButtonProcs;
+MODULE_SCOPE const Tk_ClassProcs tkpButtonProcs;
/*
* Declaration of functions used in the implementation of the button widget.
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index f14d2d0..d49297a 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.61 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.62 2010/01/13 23:08:08 nijtmans Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -323,9 +323,11 @@ static Tk_Item * TagSearchNext(TagSearch *searchPtr);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs canvasClass = {
+static const Tk_ClassProcs canvasClass = {
sizeof(Tk_ClassProcs), /* size */
CanvasWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index a2d348d..7f496fb 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.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: tkConsole.c,v 1.40 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.41 2010/01/13 23:08:09 nijtmans Exp $
*/
#include "tkInt.h"
@@ -66,7 +66,7 @@ static int InterpreterObjCmd(ClientData clientData, Tcl_Interp *interp,
* This structure describes the channel type structure for file based IO:
*/
-static Tcl_ChannelType consoleChannelType = {
+static const Tcl_ChannelType consoleChannelType = {
"console", /* Type name. */
TCL_CHANNEL_VERSION_4, /* v4 channel */
ConsoleClose, /* Close proc. */
@@ -83,6 +83,7 @@ static Tcl_ChannelType consoleChannelType = {
NULL, /* handler proc. */
NULL, /* wide seek proc */
NULL, /* thread action proc */
+ NULL
};
#ifdef __WIN32__
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index c5181f8..93f14a2 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEntry.c,v 1.59 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.60 2010/01/13 23:08:10 nijtmans Exp $
*/
#include "tkInt.h"
@@ -448,9 +448,11 @@ static int ComputeFormat(Spinbox *sbPtr);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs entryClass = {
+static const Tk_ClassProcs entryClass = {
sizeof(Tk_ClassProcs), /* size */
EntryWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index c204742..eea7e9d 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.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: tkFrame.c,v 1.39 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.40 2010/01/13 23:08:08 nijtmans Exp $
*/
#include "default.h"
@@ -329,9 +329,11 @@ static void MapFrame(ClientData clientData);
* can be invoked from generic window code.
*/
-static Tk_ClassProcs frameClass = {
+static const Tk_ClassProcs frameClass = {
sizeof(Tk_ClassProcs), /* size */
- FrameWorldChanged /* worldChangedProc */
+ FrameWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 1f23531..e651f97 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.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: tkListbox.c,v 1.57 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.58 2010/01/13 23:08:06 nijtmans Exp $
*/
#include "default.h"
@@ -436,9 +436,11 @@ static void MigrateHashEntries(Tcl_HashTable *table,
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs listboxClass = {
+static const Tk_ClassProcs listboxClass = {
sizeof(Tk_ClassProcs), /* size */
ListboxWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 4f97eb9..a8119d6 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.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: tkMenu.c,v 1.56 2010/01/05 09:40:46 dkf Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.57 2010/01/13 23:08:09 nijtmans Exp $
*/
/*
@@ -373,9 +373,11 @@ static void TkMenuCleanup(ClientData unused);
* geometry proc to be called.
*/
-static Tk_ClassProcs menuClass = {
+static const Tk_ClassProcs menuClass = {
sizeof(Tk_ClassProcs), /* size */
- MenuWorldChanged /* worldChangedProc */
+ MenuWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index e94fdd1..a4c42ed 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.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: tkMenubutton.c,v 1.26 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkMenubutton.c,v 1.27 2010/01/13 23:08:07 nijtmans Exp $
*/
#include "tkInt.h"
@@ -18,6 +18,18 @@
#include "default.h"
/*
+ * The structure below defines menubutton class behavior by means of
+ * procedures that can be invoked from generic window code.
+ */
+
+static const Tk_ClassProcs menubuttonClass = {
+ sizeof(Tk_ClassProcs), /* size */
+ TkMenuButtonWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
+};
+
+/*
* The following table defines the legal values for the -direction option. It
* is used together with the "enum direction" declaration in tkMenubutton.h.
*/
@@ -236,7 +248,7 @@ Tk_MenubuttonObjCmd(
Tk_SetClass(tkwin, "Menubutton");
mbPtr = TkpCreateMenuButton(tkwin);
- Tk_SetClassProcs(tkwin, &tkpMenubuttonClass, mbPtr);
+ Tk_SetClassProcs(tkwin, &menubuttonClass, mbPtr);
/*
* Initialize the data structure for the button.
diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h
index 84c119d..ded69a1 100644
--- a/generic/tkMenubutton.h
+++ b/generic/tkMenubutton.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: tkMenubutton.h,v 1.14 2007/12/13 15:24:16 dgp Exp $
+ * RCS: @(#) $Id: tkMenubutton.h,v 1.15 2010/01/13 23:08:07 nijtmans Exp $
*/
#ifndef _TKMENUBUTTON
@@ -211,12 +211,6 @@ typedef struct {
#define INDICATOR_HEIGHT 17
/*
- * Declaration of variables shared between the files in the button module.
- */
-
-MODULE_SCOPE Tk_ClassProcs tkpMenubuttonClass;
-
-/*
* Declaration of procedures used in the implementation of the button widget.
*/
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index e4ee15b..78238c1 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.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: tkMessage.c,v 1.23 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkMessage.c,v 1.24 2010/01/13 23:08:09 nijtmans Exp $
*/
#include "default.h"
@@ -190,9 +190,11 @@ static void DisplayMessage(ClientData clientData);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs messageClass = {
+static const Tk_ClassProcs messageClass = {
sizeof(Tk_ClassProcs), /* size */
MessageWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 816bf54..d99a8dd 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkScale.c,v 1.34 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkScale.c,v 1.35 2010/01/13 23:08:10 nijtmans Exp $
*/
#include "default.h"
@@ -177,9 +177,11 @@ static void ScaleSetVariable(TkScale *scalePtr);
* that can be invoked from generic window code.
*/
-static Tk_ClassProcs scaleClass = {
+static const Tk_ClassProcs scaleClass = {
sizeof(Tk_ClassProcs), /* size */
ScaleWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index 70acab2..11ea5c6 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.8 2005/11/27 02:36:14 das Exp $
+ * RCS: @(#) $Id: tkScrollbar.h,v 1.9 2010/01/13 23:08:08 nijtmans Exp $
*/
#ifndef _TKSCROLLBAR
@@ -167,7 +167,7 @@ typedef struct TkScrollbar {
* Declaration of scrollbar class functions structure.
*/
-MODULE_SCOPE Tk_ClassProcs tkpScrollbarProcs;
+MODULE_SCOPE const Tk_ClassProcs tkpScrollbarProcs;
/*
* Declaration of scrollbar configuration options.
diff --git a/generic/tkText.c b/generic/tkText.c
index a7d966a..e36a2a1 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.93 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.94 2010/01/13 23:08:08 nijtmans Exp $
*/
#include "default.h"
@@ -428,9 +428,11 @@ static SearchLineIndexProc TextSearchGetLineIndex;
* can be invoked from generic window code.
*/
-static Tk_ClassProcs textClass = {
+static const Tk_ClassProcs textClass = {
sizeof(Tk_ClassProcs), /* size */
TextWorldChangedCallback, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index e64f1f1..de29d35 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -1,4 +1,4 @@
-/* $Id: ttkWidget.c,v 1.22 2009/11/01 18:12:44 jenglish Exp $
+/* $Id: ttkWidget.c,v 1.23 2010/01/13 23:08:13 nijtmans Exp $
* Copyright (c) 2003, Joe English
*
* Core widget utilities.
@@ -359,9 +359,11 @@ static void WidgetWorldChanged(ClientData clientData)
TtkRedisplayWidget(corePtr);
}
-static struct Tk_ClassProcs widgetClassProcs = {
- sizeof(Tk_ClassProcs),
- WidgetWorldChanged
+static Tk_ClassProcs widgetClassProcs = {
+ sizeof(Tk_ClassProcs), /* size */
+ WidgetWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index ab1d01e..5f26135 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.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: tkMacOSXButton.c,v 1.35 2009/07/06 20:29:21 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.36 2010/01/13 23:08:12 nijtmans Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -78,9 +78,11 @@ static void ComputeUnixButtonGeometry(TkButton *butPtr);
* The class procedure table for the button widgets.
*/
-Tk_ClassProcs tkpButtonProcs = {
+const Tk_ClassProcs tkpButtonProcs = {
sizeof(Tk_ClassProcs), /* size */
TkButtonWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index e17d452..4b0e0be 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.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: tkMacOSXMenubutton.c,v 1.22 2009/07/06 20:29:21 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXMenubutton.c,v 1.23 2010/01/13 23:08:13 nijtmans Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -68,15 +68,6 @@ static const BoundsFix boundsFixes[] = {
static void MenuButtonEventProc(ClientData clientData, XEvent *eventPtr);
-/*
- * The structure below defines menubutton class behavior by means of functions
- * that can be invoked from generic window code.
- */
-
-Tk_ClassProcs tkpMenubuttonClass = {
- sizeof(Tk_ClassProcs), /* size */
- TkMenuButtonWorldChanged, /* worldChangedProc */
-};
/*
*----------------------------------------------------------------------
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 2b1a74e..fffc058 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.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: tkMacOSXScrlbr.c,v 1.31 2009/07/06 20:29:21 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.32 2010/01/13 23:08:12 nijtmans Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -63,8 +63,11 @@ static void ScrollbarEventProc(ClientData clientData,
* The class procedure table for the scrollbar widget.
*/
-Tk_ClassProcs tkpScrollbarProcs = {
- sizeof(Tk_ClassProcs) /* size */
+const Tk_ClassProcs tkpScrollbarProcs = {
+ sizeof(Tk_ClassProcs), /* size */
+ NULL, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
#pragma mark TKApplication(TKScrlbr)
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index 064a2f4..5e4c926 100644
--- a/unix/tkUnixButton.c
+++ b/unix/tkUnixButton.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: tkUnixButton.c,v 1.27 2009/10/24 00:01:48 dkf Exp $
+ * RCS: @(#) $Id: tkUnixButton.c,v 1.28 2010/01/13 23:08:11 nijtmans Exp $
*/
#include "tkInt.h"
@@ -37,9 +37,11 @@ typedef struct UnixButton {
* The class function table for the button widgets.
*/
-Tk_ClassProcs tkpButtonProcs = {
+const Tk_ClassProcs tkpButtonProcs = {
sizeof(Tk_ClassProcs), /* size */
TkButtonWorldChanged, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c
index 08d796e..790d804 100644
--- a/unix/tkUnixMenubu.c
+++ b/unix/tkUnixMenubu.c
@@ -9,21 +9,12 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixMenubu.c,v 1.11 2007/12/13 15:28:50 dgp Exp $
+ * RCS: @(#) $Id: tkUnixMenubu.c,v 1.12 2010/01/13 23:08:11 nijtmans Exp $
*/
#include "tkInt.h"
#include "tkMenubutton.h"
-/*
- * The structure below defines menubutton class behavior by means of functions
- * that can be invoked from generic window code.
- */
-
-Tk_ClassProcs tkpMenubuttonClass = {
- sizeof(Tk_ClassProcs), /* size */
- TkMenuButtonWorldChanged, /* worldChangedProc */
-};
/*
*----------------------------------------------------------------------
diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c
index 2ca0a2e..a979797 100644
--- a/unix/tkUnixScrlbr.c
+++ b/unix/tkUnixScrlbr.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: tkUnixScrlbr.c,v 1.8 2009/10/07 14:33:27 dkf Exp $
+ * RCS: @(#) $Id: tkUnixScrlbr.c,v 1.9 2010/01/13 23:08:10 nijtmans Exp $
*/
#include "tkInt.h"
@@ -38,8 +38,11 @@ typedef struct UnixScrollbar {
* variable is declared at this scope.
*/
-Tk_ClassProcs tkpScrollbarProcs = {
- sizeof(Tk_ClassProcs) /* size */
+const Tk_ClassProcs tkpScrollbarProcs = {
+ sizeof(Tk_ClassProcs), /* size */
+ NULL, /* worldChangedProc */
+ NULL, /* createProc */
+ NULL /* modalProc */
};
/*
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index b3cf7c8..e17244b 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.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: tkWinButton.c,v 1.38 2009/11/02 04:43:26 mistachkin Exp $
+ * RCS: @(#) $Id: tkWinButton.c,v 1.39 2010/01/13 23:08:11 nijtmans Exp $
*/
#define OEMRESOURCE
@@ -89,10 +89,11 @@ static void InitBoxes(void);
* The class procedure table for the button widgets.
*/
-Tk_ClassProcs tkpButtonProcs = {
+const Tk_ClassProcs tkpButtonProcs = {
sizeof(Tk_ClassProcs), /* size */
TkButtonWorldChanged, /* worldChangedProc */
CreateProc, /* createProc */
+ NULL /* modalProc */
};
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index fd06861..ebea91d 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.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: tkWinDialog.c,v 1.68 2010/01/05 21:50:54 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.69 2010/01/13 23:08:11 nijtmans Exp $
*
*/
@@ -2338,7 +2338,7 @@ Tk_MessageBoxObjCmd(
if (defaultBtn >= 0) {
int defaultBtnIdx = -1;
- for (i = 0; i < NUM_TYPES; i++) {
+ for (i = 0; i < (int) NUM_TYPES; i++) {
if (type == allowedTypes[i].type) {
int j;
@@ -2623,7 +2623,7 @@ HookProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
*/
if (WM_COMMAND == msg && LOWORD(wParam) == 1026) {
- LOGFONT lf = {0};
+ LOGFONT lf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0}};
HDC hdc = GetDC(hwndDlg);
SendMessage(hwndDlg, WM_CHOOSEFONT_GETLOGFONT, 0, (LPARAM) &lf);
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index bf49dcd..814a163 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.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: tkWinEmbed.c,v 1.35 2008/04/27 22:39:17 dkf Exp $
+ * RCS: @(#) $Id: tkWinEmbed.c,v 1.36 2010/01/13 23:08:11 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -738,7 +738,7 @@ TkWinEmbeddedEventProc(
*/
if (topwinPtr) {
- if (wParam >= 0 && wParam <= 3) {
+ if (wParam <= 3) {
TkpWmSetState(topwinPtr, wParam);
}
result = 1+TkpWmGetState(topwinPtr);
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 715228b..e5d7b82 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.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: tkWinFont.c,v 1.48 2010/01/05 08:49:50 dkf Exp $
+ * RCS: @(#) $Id: tkWinFont.c,v 1.49 2010/01/13 23:08:12 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -2521,7 +2521,7 @@ GetScreenFont(
* We can only store up to LF_FACESIZE wide characters
*/
- if (Tcl_DStringLength(&ds) >= (LF_FACESIZE * sizeof(WCHAR))) {
+ if (Tcl_DStringLength(&ds) >= (int)(LF_FACESIZE * sizeof(WCHAR))) {
Tcl_DStringSetLength(&ds, LF_FACESIZE);
}
src = (Tcl_UniChar *) Tcl_DStringValue(&ds);
@@ -2808,7 +2808,7 @@ LoadFontRanges(
}
n = GetFontData(hdc, cmapKey, 0, &cmapTable, sizeof(cmapTable));
- if (n != GDI_ERROR) {
+ if (n != (int) GDI_ERROR) {
if (swapped) {
SwapShort(&cmapTable.numTables);
}
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index a1b06ff..6b30f17 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.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: tkWinInit.c,v 1.15 2008/04/27 22:39:17 dkf Exp $
+ * RCS: @(#) $Id: tkWinInit.c,v 1.16 2010/01/13 23:08:11 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -129,7 +129,7 @@ TkpDisplayWarning(
#define TK_MAX_WARN_LEN (1024 * sizeof(WCHAR))
Tcl_UtfToExternalDString(unicodeEncoding, msg, -1, &msgString);
Tcl_UtfToExternalDString(unicodeEncoding, title, -1, &titleString);
- if (Tcl_DStringLength(&msgString) > TK_MAX_WARN_LEN) {
+ if (Tcl_DStringLength(&msgString) > (int) TK_MAX_WARN_LEN) {
Tcl_DStringSetLength(&msgString, TK_MAX_WARN_LEN);
Tcl_DStringAppend(&msgString, (char *) L" ...", 4 * sizeof(WCHAR));
}
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index 3cc86b5..8536f9f 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.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: tkWinKey.c,v 1.20 2009/12/16 22:00:31 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinKey.c,v 1.21 2010/01/13 23:08:11 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -330,7 +330,7 @@ KeycodeToKeysym(
*/
skipToAscii:
- if (keycode < 0 || keycode > MAX_KEYCODE) {
+ if (keycode > MAX_KEYCODE) {
return NoSymbol;
}
switch (keycode) {
diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c
index 3f9c21a..82bc7e9 100644
--- a/win/tkWinPixmap.c
+++ b/win/tkWinPixmap.c
@@ -9,11 +9,10 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinPixmap.c,v 1.9 2009/08/10 23:16:28 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinPixmap.c,v 1.10 2010/01/13 23:08:12 nijtmans Exp $
*/
#include "tkWinInt.h"
-
/*
*----------------------------------------------------------------------
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index eb9fcea..b87731c 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.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: tkWinScrlbr.c,v 1.17 2008/12/09 21:22:56 dgp Exp $
+ * RCS: @(#) $Id: tkWinScrlbr.c,v 1.18 2010/01/13 23:08:11 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -84,11 +84,11 @@ static void UpdateScrollbarMetrics(void);
* The class procedure table for the scrollbar widget.
*/
-Tk_ClassProcs tkpScrollbarProcs = {
+const Tk_ClassProcs tkpScrollbarProcs = {
sizeof(Tk_ClassProcs), /* size */
NULL, /* worldChangedProc */
CreateProc, /* createProc */
- ModalLoopProc, /* modalProc */
+ ModalLoopProc /* modalProc */
};
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index 913de71..a6951af 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.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: tkWinSend.c,v 1.20 2009/05/13 22:03:38 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinSend.c,v 1.21 2010/01/13 23:08:11 nijtmans Exp $
*/
#include "tkInt.h"
@@ -67,8 +67,6 @@ static Tcl_ThreadDataKey dataKey;
static void CmdDeleteProc(ClientData clientData);
static void InterpDeleteProc(ClientData clientData,
Tcl_Interp *interp);
-#endif
-#ifdef TK_SEND_ENABLED_ON_WINDOWS
static void RevokeObjectRegistration(RegisteredInterp *riPtr);
#endif
static HRESULT BuildMoniker(const char *name, LPMONIKER *pmk);
@@ -90,7 +88,7 @@ static Tcl_EventProc SendEventProc;
#else
#define TRACE 1 ? ((void)0) : SendTrace
#endif
-
+
/*
*--------------------------------------------------------------
*
@@ -191,7 +189,7 @@ Tk_SetAppName(
return (const char *) riPtr->name;
#endif /* TK_SEND_ENABLED_ON_WINDOWS */
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -297,7 +295,7 @@ TkGetInterpNames(
return result;
#endif /* TK_SEND_ENABLED_ON_WINDOWS */
}
-
+
/*
*--------------------------------------------------------------
*
@@ -389,7 +387,7 @@ Tk_SendObjCmd(
return result;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -458,7 +456,7 @@ FindInterpreterObject(
}
return result;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -513,7 +511,7 @@ CmdDeleteProc(
ckfree(clientData);
}
-
+
/*
*--------------------------------------------------------------
*
@@ -558,7 +556,7 @@ RevokeObjectRegistration(
}
}
#endif
-
+
/*
* ----------------------------------------------------------------------
*
@@ -585,7 +583,7 @@ InterpDeleteProc(
CoUninitialize();
}
#endif
-
+
/*
* ----------------------------------------------------------------------
*
@@ -628,7 +626,7 @@ BuildMoniker(
}
return hr;
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -706,7 +704,7 @@ RegisterInterp(
return hr;
}
#endif
-
+
/*
* ----------------------------------------------------------------------
*
@@ -814,7 +812,7 @@ Send(
return (SUCCEEDED(hr) ? TCL_OK : TCL_ERROR);
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -864,7 +862,7 @@ Win32ErrorObj(
return errPtr;
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -928,7 +926,7 @@ SetExcepInfo(
}
}
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -972,7 +970,7 @@ TkWinSend_QueueCommand(
return 0;
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -1009,7 +1007,7 @@ SendEventProc(
return 1; /* 1 to indicate the event has been handled */
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -1040,7 +1038,7 @@ SendTrace(
OutputDebugString(buffer);
va_end(args);
}
-
+
/*
* Local Variables:
* mode: c
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index 34647b4..d44bf38 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.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: tkWinTest.c,v 1.28 2009/11/29 22:10:36 nijtmans Exp $
+ * RCS: @(#) $Id: tkWinTest.c,v 1.29 2010/01/13 23:08:11 nijtmans Exp $
*/
#ifndef USE_TCL_STUBS
@@ -172,7 +172,7 @@ AppendSystemError(
if (length == 0) {
char *msgPtr;
- length = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
+ length = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM
| FORMAT_MESSAGE_IGNORE_INSERTS
| FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (char *) &msgPtr,
@@ -412,7 +412,7 @@ TestwineventCmd(
char buf[TCL_INTEGER_SPACE];
sprintf(buf, "%d",
- (int)SendDlgItemMessage(hwnd, id, message, wParam, lParam));
+ (int) SendDlgItemMessage(hwnd, id, message, wParam, lParam));
Tcl_SetResult(interp, buf, TCL_VOLATILE);
break;
}