summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tkWinButton.c4
-rw-r--r--win/tkWinColor.c4
-rw-r--r--win/tkWinCursor.c14
-rw-r--r--win/tkWinDialog.c24
-rw-r--r--win/tkWinImage.c4
-rw-r--r--win/tkWinMenu.c6
-rw-r--r--win/tkWinSend.c40
-rw-r--r--win/tkWinWm.c16
8 files changed, 57 insertions, 55 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index 5a348b1..41f8b84 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.34 2007/12/14 15:56:09 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinButton.c,v 1.35 2008/10/17 23:18:38 nijtmans Exp $
*/
#define OEMRESOURCE
@@ -258,7 +258,7 @@ CreateProc(
{
Window window;
HWND parent;
- char *class;
+ const char *class;
WinButton *butPtr = (WinButton *)instanceData;
parent = Tk_GetHWND(parentWin);
diff --git a/win/tkWinColor.c b/win/tkWinColor.c
index 1972695..2d68384 100644
--- a/win/tkWinColor.c
+++ b/win/tkWinColor.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: tkWinColor.c,v 1.11 2007/01/11 15:35:40 dkf Exp $
+ * RCS: @(#) $Id: tkWinColor.c,v 1.12 2008/10/17 23:18:38 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -33,7 +33,7 @@ typedef struct WinColor {
*/
typedef struct {
- char *name;
+ const char *name;
int index;
} SystemColorEntry;
diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c
index b35a2c8..99a7ffd 100644
--- a/win/tkWinCursor.c
+++ b/win/tkWinCursor.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: tkWinCursor.c,v 1.16 2008/04/27 22:39:14 dkf Exp $
+ * RCS: @(#) $Id: tkWinCursor.c,v 1.17 2008/10/17 23:18:38 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -39,7 +39,7 @@ typedef struct {
*/
static struct CursorName {
- char *name;
+ const char *name;
LPCTSTR id;
} cursorNames[] = {
{"starting", IDC_APPSTARTING},
@@ -71,7 +71,7 @@ static struct CursorName {
#define TK_DEFAULT_CURSOR IDC_ARROW
-
+
/*
*----------------------------------------------------------------------
*
@@ -171,7 +171,7 @@ TkGetCursorByName(
return (TkCursor *) cursorPtr;
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -200,7 +200,7 @@ TkCreateCursorFromData(
{
return NULL;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -224,7 +224,7 @@ TkpFreeCursor(
{
/* TkWinCursor *winCursorPtr = (TkWinCursor *) cursorPtr; */
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -259,7 +259,7 @@ TkpSetCursor(
SetCursor(hcursor);
}
}
-
+
/*
* Local Variables:
* mode: c
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index c55fb2a..871eeee 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.53 2008/10/05 18:22:22 dkf Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.54 2008/10/17 23:18:38 nijtmans Exp $
*
*/
@@ -299,7 +299,7 @@ Tk_ChooseColorObjCmd(
static int inited = 0;
static COLORREF dwCustColors[16];
static long oldColor; /* the color selected last time */
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"-initialcolor", "-parent", "-title", NULL
};
enum options {
@@ -579,15 +579,15 @@ GetFileNameW(
Tcl_Encoding unicodeEncoding = TkWinGetUnicodeEncoding();
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- static const char *saveOptionStrings[] = {
+ static const char *const saveOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
"-parent", "-title", "-typevariable", NULL
};
- static const char *openOptionStrings[] = {
+ static const char *const openOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
"-multiple", "-parent", "-title", "-typevariable", NULL
};
- const char **optionStrings;
+ const char *const *optionStrings;
enum options {
FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE,
@@ -1023,15 +1023,15 @@ GetFileNameA(
Tcl_DString extString, filterString, dirString, titleString;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- static const char *saveOptionStrings[] = {
+ static const char *const saveOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
"-parent", "-title", "-typevariable", NULL
};
- static const char *openOptionStrings[] = {
+ static const char *const openOptionStrings[] = {
"-defaultextension", "-filetypes", "-initialdir", "-initialfile",
"-multiple", "-parent", "-title", "-typevariable", NULL
};
- const char **optionStrings;
+ const char *const *optionStrings;
enum options {
FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE,
@@ -1485,7 +1485,7 @@ MakeFilter(
/*
* Use "All Files (*.*) as the default filter if none is specified
*/
- char *defaultFilter = "All Files (*.*)";
+ const char *defaultFilter = "All Files (*.*)";
p = filterStr = (char*)ckalloc(30 * sizeof(char));
@@ -1527,7 +1527,7 @@ MakeFilter(
for (filterPtr = flist.filters, p = filterStr; filterPtr;
filterPtr = filterPtr->next) {
- char *sep;
+ const char *sep;
FileFilterClause *clausePtr;
/*
@@ -1691,7 +1691,7 @@ Tk_ChooseDirectoryObjCmd(
TCHAR saveDir[MAX_PATH];
Tcl_DString titleString; /* UTF Title */
Tcl_DString initDirString; /* Initial directory */
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"-initialdir", "-mustexist", "-parent", "-title", NULL
};
enum options {
@@ -2066,7 +2066,7 @@ Tk_MessageBoxObjCmd(
int defaultBtn, icon, type;
int i, oldMode, winCode;
UINT flags;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"-default", "-detail", "-icon", "-message",
"-parent", "-title", "-type", NULL
};
diff --git a/win/tkWinImage.c b/win/tkWinImage.c
index 37e4351..1aa9c20 100644
--- a/win/tkWinImage.c
+++ b/win/tkWinImage.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: tkWinImage.c,v 1.11 2007/01/12 10:41:23 dkf Exp $
+ * RCS: @(#) $Id: tkWinImage.c,v 1.12 2008/10/17 23:18:38 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -641,7 +641,7 @@ XGetImage(
imagePtr = XGetImageZPixmap(display, d, x, y,
width, height, plane_mask, format);
} else {
- char *errMsg = NULL;
+ const char *errMsg = NULL;
char infoBuf[sizeof(BITMAPINFO) + sizeof(RGBQUAD)];
BITMAPINFO *infoPtr = (BITMAPINFO*)infoBuf;
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 2e077b8..727c0c4 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.59 2007/12/13 15:28:56 dgp Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.60 2008/10/17 23:18:38 nijtmans Exp $
*/
#define OEMRESOURCE
@@ -452,9 +452,9 @@ GetEntryText(
strcpy(itemText, "( )");
} else {
int i;
- char *label = (mePtr->labelPtr == NULL) ? ""
+ const char *label = (mePtr->labelPtr == NULL) ? ""
: Tcl_GetString(mePtr->labelPtr);
- char *accel = (mePtr->accelPtr == NULL) ? ""
+ const char *accel = (mePtr->accelPtr == NULL) ? ""
: Tcl_GetString(mePtr->accelPtr);
const char *p, *next;
Tcl_DString itemString;
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index 84b37ac..10cd181 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.17 2008/10/05 18:22:22 dkf Exp $
+ * RCS: @(#) $Id: tkWinSend.c,v 1.18 2008/10/17 23:18:38 nijtmans Exp $
*/
#include "tkInt.h"
@@ -68,7 +68,9 @@ 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);
#ifdef TK_SEND_ENABLED_ON_WINDOWS
static HRESULT RegisterInterp(const char *name,
@@ -88,7 +90,7 @@ static Tcl_EventProc SendEventProc;
#else
#define TRACE 1 ? ((void)0) : SendTrace
#endif
-
+
/*
*--------------------------------------------------------------
*
@@ -189,7 +191,7 @@ Tk_SetAppName(
return (const char *) riPtr->name;
#endif /* TK_SEND_ENABLED_ON_WINDOWS */
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -295,7 +297,7 @@ TkGetInterpNames(
return result;
#endif /* TK_SEND_ENABLED_ON_WINDOWS */
}
-
+
/*
*--------------------------------------------------------------
*
@@ -324,7 +326,7 @@ Tk_SendObjCmd(
enum {
SEND_ASYNC, SEND_DISPLAYOF, SEND_LAST
};
- static const char *sendOptions[] = {
+ static const char *const sendOptions[] = {
"-async", "-displayof", "--", NULL
};
int result = TCL_OK;
@@ -387,7 +389,7 @@ Tk_SendObjCmd(
return result;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -456,7 +458,7 @@ FindInterpreterObject(
}
return result;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -511,8 +513,7 @@ CmdDeleteProc(
ckfree(clientData);
}
-#endif
-
+
/*
*--------------------------------------------------------------
*
@@ -556,7 +557,8 @@ RevokeObjectRegistration(
riPtr->name = NULL;
}
}
-
+#endif
+
/*
* ----------------------------------------------------------------------
*
@@ -583,7 +585,7 @@ InterpDeleteProc(
CoUninitialize();
}
#endif
-
+
/*
* ----------------------------------------------------------------------
*
@@ -626,7 +628,7 @@ BuildMoniker(
}
return hr;
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -704,7 +706,7 @@ RegisterInterp(
return hr;
}
#endif
-
+
/*
* ----------------------------------------------------------------------
*
@@ -812,7 +814,7 @@ Send(
return (SUCCEEDED(hr) ? TCL_OK : TCL_ERROR);
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -862,7 +864,7 @@ Win32ErrorObj(
return errPtr;
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -926,7 +928,7 @@ SetExcepInfo(
}
}
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -970,7 +972,7 @@ TkWinSend_QueueCommand(
return 0;
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -1007,7 +1009,7 @@ SendEventProc(
return 1; /* 1 to indicate the event has been handled */
}
-
+
/*
* ----------------------------------------------------------------------
*
@@ -1038,7 +1040,7 @@ SendTrace(
OutputDebugString(buffer);
va_end(args);
}
-
+
/*
* Local Variables:
* mode: c
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index f9346eb..004397d 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.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: tkWinWm.c,v 1.130 2008/10/06 21:57:21 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.131 2008/10/17 23:18:38 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -2830,7 +2830,7 @@ Tk_WmObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window tkwin = clientData;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"aspect", "attributes", "client", "colormapwindows",
"command", "deiconify", "focusmodel", "forget", "frame",
"geometry", "grid", "group", "iconbitmap",
@@ -3642,7 +3642,7 @@ WmFocusmodelCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"active", "passive", NULL
};
enum options {
@@ -4796,7 +4796,7 @@ WmPositionfromCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"program", "user", NULL
};
enum options {
@@ -5013,7 +5013,7 @@ WmSizefromCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"program", "user", NULL
};
enum options {
@@ -5079,7 +5079,7 @@ WmStackorderCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
TkWindow **windows, **window_ptr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"isabove", "isbelow", NULL
};
enum options {
@@ -5197,7 +5197,7 @@ WmStateCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"normal", "iconic", "withdrawn", "zoomed", NULL
};
enum options {
@@ -8457,7 +8457,7 @@ TkpWinToplevelDetachWindow(
*----------------------------------------------------------------------
*/
-static void
+static void
RemapWindows(
TkWindow *winPtr,
HWND parentHWND)