summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans@noemail.net>2009-01-09 07:03:30 (GMT)
committernijtmans <nijtmans@noemail.net>2009-01-09 07:03:30 (GMT)
commit5eadd3bb9be114b58dd385b957f1d9dd8bd8b40b (patch)
tree114952748e04d5313399716b2823ceed5fa01c9c /generic
parente5b15cf9b9c85fb8d61bd1f0224c996349c40748 (diff)
downloadtk-5eadd3bb9be114b58dd385b957f1d9dd8bd8b40b.zip
tk-5eadd3bb9be114b58dd385b957f1d9dd8bd8b40b.tar.gz
tk-5eadd3bb9be114b58dd385b957f1d9dd8bd8b40b.tar.bz2
CONSTify TkDebugBorder, TkStringToKeysym, TkDebugBitmap
TkDebugColor, TkDebugCursor, TkDebugFont All those mods TIP #27 complient, no incompatibility risks. FossilOrigin-Name: 36cbe251e06e8ed0d25938bae3a8302b63449afc
Diffstat (limited to 'generic')
-rw-r--r--generic/tk3d.c4
-rw-r--r--generic/tkBind.c21
-rw-r--r--generic/tkBitmap.c4
-rw-r--r--generic/tkColor.c4
-rw-r--r--generic/tkCursor.c4
-rw-r--r--generic/tkFont.c16
-rw-r--r--generic/tkInt.decls14
-rw-r--r--generic/tkIntDecls.h26
8 files changed, 47 insertions, 46 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c
index daa4fcb..26c8536 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.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: tk3d.c,v 1.24 2008/12/12 00:09:37 nijtmans Exp $
+ * RCS: @(#) $Id: tk3d.c,v 1.25 2009/01/09 07:03:31 nijtmans Exp $
*/
#include "tkInt.h"
@@ -1360,7 +1360,7 @@ Tcl_Obj *
TkDebugBorder(
Tk_Window tkwin, /* The window in which the border will be used
* (not currently used). */
- char *name) /* Name of the desired color. */
+ const char *name) /* Name of the desired color. */
{
Tcl_HashEntry *hashPtr;
Tcl_Obj *resultPtr;
diff --git a/generic/tkBind.c b/generic/tkBind.c
index a3312db..0d542b0 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.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: tkBind.c,v 1.51 2008/12/09 21:22:56 dgp Exp $
+ * RCS: @(#) $Id: tkBind.c,v 1.52 2009/01/09 07:03:31 nijtmans Exp $
*/
#include "tkInt.h"
@@ -653,10 +653,10 @@ static void ChangeScreen(Tcl_Interp *interp, char *dispName,
int screenIndex);
static int CreateVirtualEvent(Tcl_Interp *interp,
VirtualEventTable *vetPtr, char *virtString,
- char *eventString);
+ const char *eventString);
static int DeleteVirtualEvent(Tcl_Interp *interp,
VirtualEventTable *vetPtr, char *virtString,
- char *eventString);
+ const char *eventString);
static void DeleteVirtualEventTable(VirtualEventTable *vetPtr);
static void ExpandPercents(TkWindow *winPtr, const char *before,
XEvent *eventPtr,KeySym keySym,Tcl_DString *dsPtr);
@@ -2700,7 +2700,8 @@ Tk_EventObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int index, i;
- char *name, *event;
+ char *name;
+ const char *event;
Tk_Window tkwin = clientData;
VirtualEventTable *vetPtr;
TkBindInfo bindInfo;
@@ -2871,7 +2872,7 @@ CreateVirtualEvent(
Tcl_Interp *interp, /* Used for error reporting. */
VirtualEventTable *vetPtr, /* Table in which to augment virtual event. */
char *virtString, /* Name of new virtual event. */
- char *eventString) /* String describing physical event that
+ const char *eventString) /* String describing physical event that
* triggers virtual event. */
{
PatSeq *psPtr;
@@ -2980,7 +2981,7 @@ DeleteVirtualEvent(
VirtualEventTable *vetPtr, /* Table in which to delete event. */
char *virtString, /* String describing event sequence that
* triggers binding. */
- char *eventString) /* The event sequence that should be deleted,
+ const char *eventString) /* The event sequence that should be deleted,
* or NULL to delete all event sequences for
* the entire virtual event. */
{
@@ -3254,7 +3255,7 @@ HandleEventGenerate(
{
XEvent event;
const char *p;
- char *name, *windowName;
+ const char *name, *windowName;
int count, flags, synch, i, number, warp;
Tcl_QueuePosition pos;
Pattern pat;
@@ -3527,7 +3528,7 @@ HandleEventGenerate(
break;
case EVENT_KEYSYM: {
KeySym keysym;
- char *value;
+ const char *value;
value = Tcl_GetString(valuePtr);
keysym = TkStringToKeysym(value);
@@ -3823,7 +3824,7 @@ NameToWindow(
Tcl_Obj *objPtr, /* Contains name or id string of window. */
Tk_Window *tkwinPtr) /* Filled with token for window. */
{
- char *name = Tcl_GetString(objPtr);
+ const char *name = Tcl_GetString(objPtr);
Tk_Window tkwin;
if (name[0] == '.') {
@@ -4552,7 +4553,7 @@ FreeTclBinding(
KeySym
TkStringToKeysym(
- char *name) /* Name of a keysym. */
+ const char *name) /* Name of a keysym. */
{
#ifdef REDO_KEYSYM_LOOKUP
Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&keySymTable, name);
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c
index ca40bbc..fdb9908 100644
--- a/generic/tkBitmap.c
+++ b/generic/tkBitmap.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: tkBitmap.c,v 1.24 2008/11/08 18:44:39 dkf Exp $
+ * RCS: @(#) $Id: tkBitmap.c,v 1.25 2009/01/09 07:03:31 nijtmans Exp $
*/
#include "tkInt.h"
@@ -1127,7 +1127,7 @@ Tcl_Obj *
TkDebugBitmap(
Tk_Window tkwin, /* The window in which the bitmap will be used
* (not currently used). */
- char *name) /* Name of the desired color. */
+ const char *name) /* Name of the desired color. */
{
TkBitmap *bitmapPtr;
Tcl_HashEntry *hashPtr;
diff --git a/generic/tkColor.c b/generic/tkColor.c
index 1c9c792..627799e 100644
--- a/generic/tkColor.c
+++ b/generic/tkColor.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: tkColor.c,v 1.19 2008/11/08 18:44:39 dkf Exp $
+ * RCS: @(#) $Id: tkColor.c,v 1.20 2009/01/09 07:03:31 nijtmans Exp $
*/
#include "tkInt.h"
@@ -771,7 +771,7 @@ Tcl_Obj *
TkDebugColor(
Tk_Window tkwin, /* The window in which the color will be used
* (not currently used). */
- char *name) /* Name of the desired color. */
+ const char *name) /* Name of the desired color. */
{
Tcl_HashEntry *hashPtr;
Tcl_Obj *resultPtr;
diff --git a/generic/tkCursor.c b/generic/tkCursor.c
index 047834d..f5a4ca4 100644
--- a/generic/tkCursor.c
+++ b/generic/tkCursor.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: tkCursor.c,v 1.21 2008/11/08 18:44:39 dkf Exp $
+ * RCS: @(#) $Id: tkCursor.c,v 1.22 2009/01/09 07:03:31 nijtmans Exp $
*/
#include "tkInt.h"
@@ -833,7 +833,7 @@ Tcl_Obj *
TkDebugCursor(
Tk_Window tkwin, /* The window in which the cursor will be used
* (not currently used). */
- char *name) /* Name of the desired color. */
+ const char *name) /* Name of the desired color. */
{
TkCursor *cursorPtr;
Tcl_HashEntry *hashPtr;
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 0b67f56..046a0ff 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.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: tkFont.c,v 1.51 2008/12/07 16:34:12 das Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.52 2009/01/09 07:03:31 nijtmans Exp $
*/
#include "tkInt.h"
@@ -607,7 +607,7 @@ Tk_FontObjCmd(
}
case FONT_CONFIGURE: {
int result;
- char *string;
+ const char *string;
Tcl_Obj *objPtr;
NamedFont *nfPtr;
Tcl_HashEntry *namedHashPtr;
@@ -641,7 +641,7 @@ Tk_FontObjCmd(
}
case FONT_CREATE: {
int skip, i;
- char *name;
+ const char *name;
char buf[16 + TCL_INTEGER_SPACE];
TkFontAttributes fa;
Tcl_HashEntry *namedHashPtr;
@@ -683,7 +683,7 @@ Tk_FontObjCmd(
}
case FONT_DELETE: {
int i, result = TCL_OK;
- char *string;
+ const char *string;
/*
* Delete the named font. If there are still widgets using this font,
@@ -715,7 +715,7 @@ Tk_FontObjCmd(
break;
}
case FONT_MEASURE: {
- char *string;
+ const char *string;
Tk_Font tkfont;
int length = 0, skip = 0;
@@ -3371,7 +3371,7 @@ ConfigAttributesObj(
{
int i, n, index;
Tcl_Obj *optionPtr, *valuePtr;
- char *value;
+ const char *value;
for (i = 0; i < objc; i += 2) {
optionPtr = objv[i];
@@ -3566,7 +3566,7 @@ ParseFontNameObj(
char *dash;
int objc, result, i, n;
Tcl_Obj **objv;
- char *string;
+ const char *string;
TkInitFontAttributes(faPtr);
@@ -4167,7 +4167,7 @@ Tcl_Obj *
TkDebugFont(
Tk_Window tkwin, /* The window in which the font will be used
* (not currently used). */
- char *name) /* Name of the desired color. */
+ const char *name) /* Name of the desired color. */
{
TkFont *fontPtr;
Tcl_HashEntry *hashPtr;
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 776e38a..c1b501d 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -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: tkInt.decls,v 1.51 2008/12/05 15:51:31 nijtmans Exp $
+# RCS: @(#) $Id: tkInt.decls,v 1.52 2009/01/09 07:03:31 nijtmans Exp $
library tk
@@ -315,7 +315,7 @@ declare 85 generic {
char *oldMenuName, char *menuName)
}
declare 86 generic {
- KeySym TkStringToKeysym(char *name)
+ KeySym TkStringToKeysym(const char *name)
}
declare 87 generic {
int TkThickPolyLineToArea(double *coordPtr, int numPoints,
@@ -356,22 +356,22 @@ declare 97 generic {
# new for 8.1
declare 98 generic {
- Tcl_Obj *TkDebugBitmap(Tk_Window tkwin, char *name)
+ Tcl_Obj *TkDebugBitmap(Tk_Window tkwin, const char *name)
}
declare 99 generic {
- Tcl_Obj *TkDebugBorder(Tk_Window tkwin, char *name)
+ Tcl_Obj *TkDebugBorder(Tk_Window tkwin, const char *name)
}
declare 100 generic {
- Tcl_Obj *TkDebugCursor(Tk_Window tkwin, char *name)
+ Tcl_Obj *TkDebugCursor(Tk_Window tkwin, const char *name)
}
declare 101 generic {
- Tcl_Obj *TkDebugColor(Tk_Window tkwin, char *name)
+ Tcl_Obj *TkDebugColor(Tk_Window tkwin, const char *name)
}
declare 102 generic {
Tcl_Obj *TkDebugConfig(Tcl_Interp *interp, Tk_OptionTable table)
}
declare 103 generic {
- Tcl_Obj *TkDebugFont(Tk_Window tkwin, char *name)
+ Tcl_Obj *TkDebugFont(Tk_Window tkwin, const char *name)
}
declare 104 generic {
int TkFindStateNumObj(Tcl_Interp *interp, Tcl_Obj *optionPtr,
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 78bf6d1..da16c96 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -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: tkIntDecls.h,v 1.41 2008/12/05 15:51:31 nijtmans Exp $
+ * RCS: @(#) $Id: tkIntDecls.h,v 1.42 2009/01/09 07:03:30 nijtmans Exp $
*/
#ifndef _TKINTDECLS
@@ -541,7 +541,7 @@ EXTERN void TkSetWindowMenuBar (Tcl_Interp * interp,
#ifndef TkStringToKeysym_TCL_DECLARED
#define TkStringToKeysym_TCL_DECLARED
/* 86 */
-EXTERN KeySym TkStringToKeysym (char * name);
+EXTERN KeySym TkStringToKeysym (const char * name);
#endif
#ifndef TkThickPolyLineToArea_TCL_DECLARED
#define TkThickPolyLineToArea_TCL_DECLARED
@@ -605,22 +605,22 @@ EXTERN void TkWmUnmapWindow (TkWindow * winPtr);
#ifndef TkDebugBitmap_TCL_DECLARED
#define TkDebugBitmap_TCL_DECLARED
/* 98 */
-EXTERN Tcl_Obj * TkDebugBitmap (Tk_Window tkwin, char * name);
+EXTERN Tcl_Obj * TkDebugBitmap (Tk_Window tkwin, const char * name);
#endif
#ifndef TkDebugBorder_TCL_DECLARED
#define TkDebugBorder_TCL_DECLARED
/* 99 */
-EXTERN Tcl_Obj * TkDebugBorder (Tk_Window tkwin, char * name);
+EXTERN Tcl_Obj * TkDebugBorder (Tk_Window tkwin, const char * name);
#endif
#ifndef TkDebugCursor_TCL_DECLARED
#define TkDebugCursor_TCL_DECLARED
/* 100 */
-EXTERN Tcl_Obj * TkDebugCursor (Tk_Window tkwin, char * name);
+EXTERN Tcl_Obj * TkDebugCursor (Tk_Window tkwin, const char * name);
#endif
#ifndef TkDebugColor_TCL_DECLARED
#define TkDebugColor_TCL_DECLARED
/* 101 */
-EXTERN Tcl_Obj * TkDebugColor (Tk_Window tkwin, char * name);
+EXTERN Tcl_Obj * TkDebugColor (Tk_Window tkwin, const char * name);
#endif
#ifndef TkDebugConfig_TCL_DECLARED
#define TkDebugConfig_TCL_DECLARED
@@ -631,7 +631,7 @@ EXTERN Tcl_Obj * TkDebugConfig (Tcl_Interp * interp,
#ifndef TkDebugFont_TCL_DECLARED
#define TkDebugFont_TCL_DECLARED
/* 103 */
-EXTERN Tcl_Obj * TkDebugFont (Tk_Window tkwin, char * name);
+EXTERN Tcl_Obj * TkDebugFont (Tk_Window tkwin, const char * name);
#endif
#ifndef TkFindStateNumObj_TCL_DECLARED
#define TkFindStateNumObj_TCL_DECLARED
@@ -1131,7 +1131,7 @@ typedef struct TkIntStubs {
void (*tkSelPropProc) (XEvent * eventPtr); /* 83 */
void *reserved84;
void (*tkSetWindowMenuBar) (Tcl_Interp * interp, Tk_Window tkwin, char * oldMenuName, char * menuName); /* 85 */
- KeySym (*tkStringToKeysym) (char * name); /* 86 */
+ KeySym (*tkStringToKeysym) (const char * name); /* 86 */
int (*tkThickPolyLineToArea) (double * coordPtr, int numPoints, double width, int capStyle, int joinStyle, double * rectPtr); /* 87 */
void (*tkWmAddToColormapWindows) (TkWindow * winPtr); /* 88 */
void (*tkWmDeadWindow) (TkWindow * winPtr); /* 89 */
@@ -1143,12 +1143,12 @@ typedef struct TkIntStubs {
void (*tkWmRestackToplevel) (TkWindow * winPtr, int aboveBelow, TkWindow * otherPtr); /* 95 */
void (*tkWmSetClass) (TkWindow * winPtr); /* 96 */
void (*tkWmUnmapWindow) (TkWindow * winPtr); /* 97 */
- Tcl_Obj * (*tkDebugBitmap) (Tk_Window tkwin, char * name); /* 98 */
- Tcl_Obj * (*tkDebugBorder) (Tk_Window tkwin, char * name); /* 99 */
- Tcl_Obj * (*tkDebugCursor) (Tk_Window tkwin, char * name); /* 100 */
- Tcl_Obj * (*tkDebugColor) (Tk_Window tkwin, char * name); /* 101 */
+ Tcl_Obj * (*tkDebugBitmap) (Tk_Window tkwin, const char * name); /* 98 */
+ Tcl_Obj * (*tkDebugBorder) (Tk_Window tkwin, const char * name); /* 99 */
+ Tcl_Obj * (*tkDebugCursor) (Tk_Window tkwin, const char * name); /* 100 */
+ Tcl_Obj * (*tkDebugColor) (Tk_Window tkwin, const char * name); /* 101 */
Tcl_Obj * (*tkDebugConfig) (Tcl_Interp * interp, Tk_OptionTable table); /* 102 */
- Tcl_Obj * (*tkDebugFont) (Tk_Window tkwin, char * name); /* 103 */
+ Tcl_Obj * (*tkDebugFont) (Tk_Window tkwin, const char * name); /* 103 */
int (*tkFindStateNumObj) (Tcl_Interp * interp, Tcl_Obj * optionPtr, const TkStateMap * mapPtr, Tcl_Obj * keyPtr); /* 104 */
Tcl_HashTable * (*tkGetBitmapPredefTable) (void); /* 105 */
TkDisplay * (*tkGetDisplayList) (void); /* 106 */