diff options
author | nijtmans <nijtmans> | 2010-01-13 23:08:06 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-01-13 23:08:06 (GMT) |
commit | 353d7693729fb7a45a35be7158fc4b94db079735 (patch) | |
tree | 1f472912658d183c50de332bc66a33540b44f060 /win | |
parent | 15e42ed5b2cbc9b9a5802d75268d97f302ac23c0 (diff) | |
download | tk-353d7693729fb7a45a35be7158fc4b94db079735.zip tk-353d7693729fb7a45a35be7158fc4b94db079735.tar.gz tk-353d7693729fb7a45a35be7158fc4b94db079735.tar.bz2 |
Eliminate tkpMenubuttonClass
make tkpButtonProcs CONST
fix gcc warnings: missing initializer
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinButton.c | 5 | ||||
-rw-r--r-- | win/tkWinDialog.c | 6 | ||||
-rw-r--r-- | win/tkWinEmbed.c | 4 | ||||
-rw-r--r-- | win/tkWinFont.c | 6 | ||||
-rw-r--r-- | win/tkWinInit.c | 4 | ||||
-rw-r--r-- | win/tkWinKey.c | 4 | ||||
-rw-r--r-- | win/tkWinPixmap.c | 3 | ||||
-rw-r--r-- | win/tkWinScrlbr.c | 6 | ||||
-rw-r--r-- | win/tkWinSend.c | 36 | ||||
-rw-r--r-- | win/tkWinTest.c | 6 |
10 files changed, 39 insertions, 41 deletions
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; } |