summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.decls99
-rw-r--r--generic/tk.h12
-rw-r--r--generic/tk3d.c10
-rw-r--r--generic/tkAtom.c8
-rw-r--r--generic/tkBind.c72
-rw-r--r--generic/tkBitmap.c10
-rw-r--r--generic/tkButton.c14
-rw-r--r--generic/tkCanvArc.c6
-rw-r--r--generic/tkCanvBmap.c6
-rw-r--r--generic/tkCanvImg.c6
-rw-r--r--generic/tkCanvLine.c6
-rw-r--r--generic/tkCanvPoly.c6
-rw-r--r--generic/tkCanvPs.c6
-rw-r--r--generic/tkCanvText.c6
-rw-r--r--generic/tkCanvUtil.c4
-rw-r--r--generic/tkCanvWind.c6
-rw-r--r--generic/tkCanvas.c29
-rw-r--r--generic/tkCanvas.h4
-rw-r--r--generic/tkClipboard.c4
-rw-r--r--generic/tkCmds.c16
-rw-r--r--generic/tkColor.c6
-rw-r--r--generic/tkConfig.c4
-rw-r--r--generic/tkConsole.c10
-rw-r--r--generic/tkCursor.c18
-rw-r--r--generic/tkDecls.h209
-rw-r--r--generic/tkEntry.c8
-rw-r--r--generic/tkFont.c8
-rw-r--r--generic/tkFrame.c4
-rw-r--r--generic/tkGet.c18
-rw-r--r--generic/tkGrid.c6
-rw-r--r--generic/tkImage.c10
-rw-r--r--generic/tkImgBmap.c4
-rw-r--r--generic/tkImgPhoto.c14
-rw-r--r--generic/tkInt.decls16
-rw-r--r--generic/tkInt.h14
-rw-r--r--generic/tkIntDecls.h30
-rw-r--r--generic/tkIntPlatDecls.h8
-rw-r--r--generic/tkListbox.c8
-rw-r--r--generic/tkMenu.c8
-rw-r--r--generic/tkMenubutton.c6
-rw-r--r--generic/tkMessage.c8
-rw-r--r--generic/tkOldConfig.c40
-rw-r--r--generic/tkOption.c8
-rw-r--r--generic/tkRectOval.c6
-rw-r--r--generic/tkScale.c8
-rw-r--r--generic/tkScrollbar.c12
-rw-r--r--generic/tkSelect.c6
-rw-r--r--generic/tkStyle.c13
-rw-r--r--generic/tkTest.c55
-rw-r--r--generic/tkText.c66
-rw-r--r--generic/tkText.h32
-rw-r--r--generic/tkTextBTree.c6
-rw-r--r--generic/tkTextDisp.c10
-rw-r--r--generic/tkTextImage.c16
-rw-r--r--generic/tkTextIndex.c72
-rw-r--r--generic/tkTextMark.c16
-rw-r--r--generic/tkTextTag.c12
-rw-r--r--generic/tkTextWind.c16
-rw-r--r--generic/tkUtil.c4
-rw-r--r--generic/tkVisual.c8
-rw-r--r--generic/tkWindow.c32
61 files changed, 615 insertions, 570 deletions
diff --git a/generic/tk.decls b/generic/tk.decls
index 0d2ce92..3328b6a 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -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: tk.decls,v 1.22 2002/06/18 23:51:46 dkf Exp $
+# RCS: @(#) $Id: tk.decls,v 1.23 2002/08/05 04:30:38 dgp Exp $
library tk
@@ -121,7 +121,7 @@ declare 17 generic {
declare 18 generic {
int Tk_CanvasTagsParseProc (ClientData clientData, Tcl_Interp *interp,
- Tk_Window tkwin, char *value, char *widgRec, int offset)
+ Tk_Window tkwin, CONST char *value, char *widgRec, int offset)
}
declare 19 generic {
@@ -164,19 +164,19 @@ declare 26 generic {
declare 27 generic {
int Tk_ConfigureInfo (Tcl_Interp *interp,
Tk_Window tkwin, Tk_ConfigSpec *specs,
- char *widgRec, char *argvName, int flags)
+ char *widgRec, CONST char *argvName, int flags)
}
declare 28 generic {
int Tk_ConfigureValue (Tcl_Interp *interp,
Tk_Window tkwin, Tk_ConfigSpec *specs,
- char *widgRec, char *argvName, int flags)
+ char *widgRec, CONST char *argvName, int flags)
}
declare 29 generic {
int Tk_ConfigureWidget (Tcl_Interp *interp,
Tk_Window tkwin, Tk_ConfigSpec *specs,
- int argc, char **argv, char *widgRec,
+ int argc, CONST84 char **argv, char *widgRec,
int flags)
}
@@ -199,7 +199,7 @@ declare 32 generic {
declare 33 generic {
unsigned long Tk_CreateBinding (Tcl_Interp *interp,
Tk_BindingTable bindingTable, ClientData object,
- char *eventStr, char *command, int append)
+ CONST char *eventStr, CONST char *command, int append)
}
declare 34 generic {
@@ -243,17 +243,17 @@ declare 41 generic {
declare 42 generic {
Tk_Window Tk_CreateWindow (Tcl_Interp *interp,
- Tk_Window parent, char *name, char *screenName)
+ Tk_Window parent, CONST char *name, CONST char *screenName)
}
declare 43 generic {
Tk_Window Tk_CreateWindowFromPath (Tcl_Interp *interp, Tk_Window tkwin,
- char *pathName, char *screenName)
+ CONST char *pathName, CONST char *screenName)
}
declare 44 generic {
- int Tk_DefineBitmap (Tcl_Interp *interp, CONST char *name, char *source,
- int width, int height)
+ int Tk_DefineBitmap (Tcl_Interp *interp, CONST char *name,
+ CONST char *source, int width, int height)
}
declare 45 generic {
@@ -267,7 +267,7 @@ declare 46 generic {
declare 47 generic {
int Tk_DeleteBinding (Tcl_Interp *interp,
Tk_BindingTable bindingTable, ClientData object,
- char *eventStr)
+ CONST char *eventStr)
}
declare 48 generic {
@@ -289,7 +289,7 @@ declare 51 generic {
}
declare 52 generic {
- void Tk_DeleteImage (Tcl_Interp *interp, char *name)
+ void Tk_DeleteImage (Tcl_Interp *interp, CONST char *name)
}
declare 53 generic {
@@ -301,7 +301,7 @@ declare 54 generic {
}
declare 55 generic {
- char * Tk_DisplayName (Tk_Window tkwin)
+ CONST84_RETURN char * Tk_DisplayName (Tk_Window tkwin)
}
declare 56 generic {
@@ -352,7 +352,7 @@ declare 63 generic {
}
declare 64 generic {
- Tk_PhotoHandle Tk_FindPhoto (Tcl_Interp *interp, char *imageName)
+ Tk_PhotoHandle Tk_FindPhoto (Tcl_Interp *interp, CONST char *imageName)
}
declare 65 generic {
@@ -428,17 +428,17 @@ declare 81 generic {
declare 82 generic {
int Tk_GetAnchor (Tcl_Interp *interp,
- char *str, Tk_Anchor *anchorPtr)
+ CONST char *str, Tk_Anchor *anchorPtr)
}
declare 83 generic {
- char * Tk_GetAtomName (Tk_Window tkwin, Atom atom)
+ CONST84_RETURN char * Tk_GetAtomName (Tk_Window tkwin, Atom atom)
}
declare 84 generic {
- char * Tk_GetBinding (Tcl_Interp *interp,
+ CONST84_RETURN char * Tk_GetBinding (Tcl_Interp *interp,
Tk_BindingTable bindingTable, ClientData object,
- char *eventStr)
+ CONST char *eventStr)
}
declare 85 generic {
@@ -447,11 +447,11 @@ declare 85 generic {
declare 86 generic {
Pixmap Tk_GetBitmapFromData (Tcl_Interp *interp,
- Tk_Window tkwin, char *source, int width, int height)
+ Tk_Window tkwin, CONST char *source, int width, int height)
}
declare 87 generic {
- int Tk_GetCapStyle (Tcl_Interp *interp, char *str, int *capPtr)
+ int Tk_GetCapStyle (Tcl_Interp *interp, CONST char *str, int *capPtr)
}
declare 88 generic {
@@ -463,7 +463,8 @@ declare 89 generic {
}
declare 90 generic {
- Colormap Tk_GetColormap (Tcl_Interp *interp, Tk_Window tkwin, char *str)
+ Colormap Tk_GetColormap (Tcl_Interp *interp, Tk_Window tkwin,
+ CONST char *str)
}
declare 91 generic {
@@ -473,7 +474,7 @@ declare 91 generic {
declare 92 generic {
Tk_Cursor Tk_GetCursorFromData (Tcl_Interp *interp,
- Tk_Window tkwin, char *source, char *mask,
+ Tk_Window tkwin, CONST char *source, CONST char *mask,
int width, int height, int xHot, int yHot,
Tk_Uid fg, Tk_Uid bg)
}
@@ -496,13 +497,13 @@ declare 96 generic {
}
declare 97 generic {
- Tk_Image Tk_GetImage (Tcl_Interp *interp, Tk_Window tkwin, char *name,
+ Tk_Image Tk_GetImage (Tcl_Interp *interp, Tk_Window tkwin, CONST char *name,
Tk_ImageChangedProc *changeProc, ClientData clientData)
}
declare 98 generic {
ClientData Tk_GetImageMasterData (Tcl_Interp *interp,
- char *name, Tk_ImageType **typePtrPtr)
+ CONST char *name, Tk_ImageType **typePtrPtr)
}
declare 99 generic {
@@ -510,12 +511,12 @@ declare 99 generic {
}
declare 100 generic {
- int Tk_GetJoinStyle (Tcl_Interp *interp, char *str, int *joinPtr)
+ int Tk_GetJoinStyle (Tcl_Interp *interp, CONST char *str, int *joinPtr)
}
declare 101 generic {
int Tk_GetJustify (Tcl_Interp *interp,
- char *str, Tk_Justify *justifyPtr)
+ CONST char *str, Tk_Justify *justifyPtr)
}
declare 102 generic {
@@ -523,7 +524,8 @@ declare 102 generic {
}
declare 103 generic {
- Tk_Uid Tk_GetOption (Tk_Window tkwin, char *name, char *className)
+ Tk_Uid Tk_GetOption (Tk_Window tkwin, CONST char *name,
+ CONST char *className)
}
declare 104 generic {
@@ -537,7 +539,7 @@ declare 105 generic {
}
declare 106 generic {
- int Tk_GetRelief (Tcl_Interp *interp, char *name, int *reliefPtr)
+ int Tk_GetRelief (Tcl_Interp *interp, CONST char *name, int *reliefPtr)
}
declare 107 generic {
@@ -546,7 +548,7 @@ declare 107 generic {
declare 108 generic {
int Tk_GetScrollInfo (Tcl_Interp *interp,
- int argc, char **argv, double *dblPtr, int *intPtr)
+ int argc, CONST84 char **argv, double *dblPtr, int *intPtr)
}
declare 109 generic {
@@ -566,7 +568,7 @@ declare 111 generic {
declare 112 generic {
Visual * Tk_GetVisual (Tcl_Interp *interp,
- Tk_Window tkwin, char *str, int *depthPtr,
+ Tk_Window tkwin, CONST char *str, int *depthPtr,
Colormap *colormapPtr)
}
@@ -597,7 +599,7 @@ declare 118 generic {
}
declare 119 generic {
- Atom Tk_InternAtom (Tk_Window tkwin, char *name)
+ Atom Tk_InternAtom (Tk_Window tkwin, CONST char *name)
}
declare 120 generic {
@@ -647,47 +649,47 @@ declare 129 generic {
}
declare 130 generic {
- char * Tk_NameOf3DBorder (Tk_3DBorder border)
+ CONST84_RETURN char * Tk_NameOf3DBorder (Tk_3DBorder border)
}
declare 131 generic {
- char * Tk_NameOfAnchor (Tk_Anchor anchor)
+ CONST84_RETURN char * Tk_NameOfAnchor (Tk_Anchor anchor)
}
declare 132 generic {
- char * Tk_NameOfBitmap (Display *display, Pixmap bitmap)
+ CONST84_RETURN char * Tk_NameOfBitmap (Display *display, Pixmap bitmap)
}
declare 133 generic {
- char * Tk_NameOfCapStyle (int cap)
+ CONST84_RETURN char * Tk_NameOfCapStyle (int cap)
}
declare 134 generic {
- char * Tk_NameOfColor (XColor *colorPtr)
+ CONST84_RETURN char * Tk_NameOfColor (XColor *colorPtr)
}
declare 135 generic {
- char * Tk_NameOfCursor (Display *display, Tk_Cursor cursor)
+ CONST84_RETURN char * Tk_NameOfCursor (Display *display, Tk_Cursor cursor)
}
declare 136 generic {
- char * Tk_NameOfFont (Tk_Font font)
+ CONST84_RETURN char * Tk_NameOfFont (Tk_Font font)
}
declare 137 generic {
- char * Tk_NameOfImage (Tk_ImageMaster imageMaster)
+ CONST84_RETURN char * Tk_NameOfImage (Tk_ImageMaster imageMaster)
}
declare 138 generic {
- char * Tk_NameOfJoinStyle (int join)
+ CONST84_RETURN char * Tk_NameOfJoinStyle (int join)
}
declare 139 generic {
- char * Tk_NameOfJustify (Tk_Justify justify)
+ CONST84_RETURN char * Tk_NameOfJustify (Tk_Justify justify)
}
declare 140 generic {
- char * Tk_NameOfRelief (int relief)
+ CONST84_RETURN char * Tk_NameOfRelief (int relief)
}
declare 141 generic {
@@ -780,7 +782,7 @@ declare 159 generic {
}
declare 160 generic {
- char * Tk_SetAppName (Tk_Window tkwin, char *name)
+ CONST char * Tk_SetAppName (Tk_Window tkwin, CONST char *name)
}
declare 161 generic {
@@ -788,7 +790,7 @@ declare 161 generic {
}
declare 162 generic {
- void Tk_SetClass (Tk_Window tkwin, char *className)
+ void Tk_SetClass (Tk_Window tkwin, CONST char *className)
}
declare 163 generic {
@@ -1139,7 +1141,7 @@ declare 240 generic {
#
declare 241 generic {
Tk_Window Tk_CreateAnonymousWindow (Tcl_Interp *interp,
- Tk_Window parent, char *screenName)
+ Tk_Window parent, CONST char *screenName)
}
declare 242 generic {
void Tk_SetClassProcs (Tk_Window tkwin,
@@ -1181,17 +1183,18 @@ declare 248 generic {
# Style engine
declare 249 generic {
- Tk_StyleEngine Tk_RegisterStyleEngine (char *name, Tk_StyleEngine parent)
+ Tk_StyleEngine Tk_RegisterStyleEngine (CONST char *name,
+ Tk_StyleEngine parent)
}
declare 250 generic {
- Tk_StyleEngine Tk_GetStyleEngine (char *name)
+ Tk_StyleEngine Tk_GetStyleEngine (CONST char *name)
}
declare 251 generic {
int Tk_RegisterStyledElement (Tk_StyleEngine engine,
Tk_ElementSpec *templatePtr)
}
declare 252 generic {
- int Tk_GetElementId (char *name)
+ int Tk_GetElementId (CONST char *name)
}
declare 253 generic {
Tk_Style Tk_CreateStyle (CONST char *name, Tk_StyleEngine engine,
diff --git a/generic/tk.h b/generic/tk.h
index cdf03ac..f6a7e78 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -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: tk.h,v 1.65 2002/07/14 17:29:57 dgp Exp $
+ * RCS: @(#) $Id: tk.h,v 1.66 2002/08/05 04:30:38 dgp Exp $
*/
#ifndef _TK
@@ -124,7 +124,7 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement;
* Additional types exported to clients.
*/
-typedef char *Tk_Uid;
+typedef CONST char *Tk_Uid;
/*
* The enum below defines the valid types for Tk configuration options
@@ -322,7 +322,7 @@ typedef struct Tk_SavedOptions {
#ifndef __NO_OLD_CONFIG
typedef int (Tk_OptionParseProc) _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, Tk_Window tkwin, char *value, char *widgRec,
+ Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value, char *widgRec,
int offset));
typedef char *(Tk_OptionPrintProc) _ANSI_ARGS_((ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
@@ -353,9 +353,9 @@ typedef struct Tk_ConfigSpec {
* table must have type TK_CONFIG_END. */
char *argvName; /* Switch used to specify option in argv.
* NULL means this spec is part of a group. */
- char *dbName; /* Name for option in option database. */
- char *dbClass; /* Class for option in database. */
- char *defValue; /* Default value for option if not
+ Tk_Uid dbName; /* Name for option in option database. */
+ Tk_Uid dbClass; /* Class for option in database. */
+ Tk_Uid defValue; /* Default value for option if not
* specified in command line or database. */
int offset; /* Where in widget record to store value;
* use Tk_Offset macro to generate values
diff --git a/generic/tk3d.c b/generic/tk3d.c
index 5e3be12..3c6492e 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.12 2002/01/17 05:13:11 dgp Exp $
+ * RCS: @(#) $Id: tk3d.c,v 1.13 2002/08/05 04:30:38 dgp Exp $
*/
#include "tk3d.h"
@@ -186,7 +186,7 @@ Tk_Get3DBorder(interp, tkwin, colorName)
Tcl_Interp *interp; /* Place to store an error message. */
Tk_Window tkwin; /* Token for window in which border will
* be drawn. */
- char *colorName; /* String giving name of color
+ Tk_Uid colorName; /* String giving name of color
* for window background. */
{
Tcl_HashEntry *hashPtr;
@@ -324,7 +324,7 @@ Tk_Draw3DRectangle(tkwin, drawable, border, x, y, width, height,
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOf3DBorder(border)
Tk_3DBorder border; /* Token for border. */
{
@@ -652,7 +652,7 @@ Tk_GetReliefFromObj(interp, objPtr, resultPtr)
int
Tk_GetRelief(interp, name, reliefPtr)
Tcl_Interp *interp; /* For error messages. */
- char *name; /* Name of a relief type. */
+ CONST char *name; /* Name of a relief type. */
int *reliefPtr; /* Where to store converted relief. */
{
char c;
@@ -703,7 +703,7 @@ Tk_GetRelief(interp, name, reliefPtr)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfRelief(relief)
int relief; /* One of TK_RELIEF_FLAT, TK_RELIEF_RAISED,
* or TK_RELIEF_SUNKEN. */
diff --git a/generic/tkAtom.c b/generic/tkAtom.c
index fba9fb8..0137d40 100644
--- a/generic/tkAtom.c
+++ b/generic/tkAtom.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: tkAtom.c,v 1.2 1998/09/14 18:23:03 stanton Exp $
+ * RCS: @(#) $Id: tkAtom.c,v 1.3 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkPort.h"
@@ -80,7 +80,7 @@ Atom
Tk_InternAtom(tkwin, name)
Tk_Window tkwin; /* Window token; map name to atom
* for this window's display. */
- char *name; /* Name to turn into atom. */
+ CONST char *name; /* Name to turn into atom. */
{
register TkDisplay *dispPtr;
register Tcl_HashEntry *hPtr;
@@ -127,7 +127,7 @@ Tk_InternAtom(tkwin, name)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_GetAtomName(tkwin, atom)
Tk_Window tkwin; /* Window token; map atom to name
* relative to this window's
@@ -168,7 +168,7 @@ Tk_GetAtomName(tkwin, atom)
&new);
Tcl_SetHashValue(hPtr, name);
}
- return (char *) Tcl_GetHashValue(hPtr);
+ return Tcl_GetHashValue(hPtr);
}
/*
diff --git a/generic/tkBind.c b/generic/tkBind.c
index c70a1a5..a71ac44 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.25 2002/06/19 19:37:53 mdejong Exp $
+ * RCS: @(#) $Id: tkBind.c,v 1.26 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkPort.h"
@@ -676,13 +676,13 @@ static int DeleteVirtualEvent _ANSI_ARGS_((Tcl_Interp *interp,
static void DeleteVirtualEventTable _ANSI_ARGS_((
VirtualEventTable *vetPtr));
static void ExpandPercents _ANSI_ARGS_((TkWindow *winPtr,
- char *before, XEvent *eventPtr, KeySym keySym,
+ CONST char *before, XEvent *eventPtr, KeySym keySym,
Tcl_DString *dsPtr));
static void FreeTclBinding _ANSI_ARGS_((ClientData clientData));
static PatSeq * FindSequence _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_HashTable *patternTablePtr, ClientData object,
- char *eventString, int create, int allowVirtual,
- unsigned long *maskPtr));
+ CONST char *eventString, int create,
+ int allowVirtual, unsigned long *maskPtr));
static void GetAllVirtualEvents _ANSI_ARGS_((Tcl_Interp *interp,
VirtualEventTable *vetPtr));
static char * GetField _ANSI_ARGS_((char *p, char *copy, int size));
@@ -705,7 +705,7 @@ static int NameToWindow _ANSI_ARGS_((Tcl_Interp *interp,
Tk_Window main, Tcl_Obj *objPtr,
Tk_Window *tkwinPtr));
static int ParseEventDescription _ANSI_ARGS_((Tcl_Interp *interp,
- char **eventStringPtr, Pattern *patPtr,
+ CONST char **eventStringPtr, Pattern *patPtr,
unsigned long *eventMaskPtr));
static void DoWarp _ANSI_ARGS_((ClientData clientData));
@@ -972,9 +972,9 @@ Tk_CreateBinding(interp, bindingTable, object, eventString, command, append)
/* Table in which to create binding. */
ClientData object; /* Token for object with which binding is
* associated. */
- char *eventString; /* String describing event sequence that
+ CONST char *eventString; /* String describing event sequence that
* triggers binding. */
- char *command; /* Contains Tcl command to execute when
+ CONST char *command; /* Contains Tcl command to execute when
* binding triggers. */
int append; /* 0 means replace any existing binding for
* eventString; 1 means append to that
@@ -1076,7 +1076,7 @@ TkCreateBindingProcedure(interp, bindingTable, object, eventString,
/* Table in which to create binding. */
ClientData object; /* Token for object with which binding is
* associated. */
- char *eventString; /* String describing event sequence that
+ CONST char *eventString; /* String describing event sequence that
* triggers binding. */
TkBindEvalProc *eventProc; /* Procedure to invoke when binding
* triggers. Must not be NULL. */
@@ -1154,7 +1154,7 @@ Tk_DeleteBinding(interp, bindingTable, object, eventString)
Tk_BindingTable bindingTable; /* Table in which to delete binding. */
ClientData object; /* Token for object with which binding
* is associated. */
- char *eventString; /* String describing event sequence
+ CONST char *eventString; /* String describing event sequence
* that triggers binding. */
{
BindingTable *bindPtr = (BindingTable *) bindingTable;
@@ -1243,14 +1243,14 @@ Tk_DeleteBinding(interp, bindingTable, object, eventString)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_GetBinding(interp, bindingTable, object, eventString)
Tcl_Interp *interp; /* Interpreter for error reporting. */
Tk_BindingTable bindingTable; /* Table in which to look for
* binding. */
ClientData object; /* Token for object with which binding
* is associated. */
- char *eventString; /* String describing event sequence
+ CONST char *eventString; /* String describing event sequence
* that triggers binding. */
{
BindingTable *bindPtr = (BindingTable *) bindingTable;
@@ -1263,7 +1263,7 @@ Tk_GetBinding(interp, bindingTable, object, eventString)
return NULL;
}
if (psPtr->eventProc == EvalTclBinding) {
- return (char *) psPtr->clientData;
+ return (CONST char *) psPtr->clientData;
}
return "";
}
@@ -2306,7 +2306,7 @@ static void
ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr)
TkWindow *winPtr; /* Window where event occurred: needed to
* get input context. */
- char *before; /* Command containing percent expressions
+ CONST char *before; /* Command containing percent expressions
* to be replaced. */
XEvent *eventPtr; /* X event containing information to be
* used in % replacements. */
@@ -2319,7 +2319,7 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr)
* list element. */
int number, flags, length;
#define NUM_SIZE 40
- char *string;
+ CONST char *string;
Tcl_DString buf;
char numStorage[NUM_SIZE+1];
@@ -3279,7 +3279,8 @@ HandleEventGenerate(interp, mainWin, objc, objv)
Tcl_Obj *CONST objv[]; /* Argument objects. */
{
XEvent event;
- char *name, *p, *windowName;
+ CONST char *p;
+ char *name, *windowName;
int count, flags, synch, i, number, warp;
Tcl_QueuePosition pos;
Pattern pat;
@@ -3951,7 +3952,7 @@ FindSequence(interp, patternTablePtr, object, eventString, create,
ClientData object; /* For binding table, token for object with
* which binding is associated.
* For virtual event table, NULL. */
- char *eventString; /* String description of pattern to
+ CONST char *eventString; /* String description of pattern to
* match on. See user documentation
* for details. */
int create; /* 0 means don't create the entry if
@@ -3967,7 +3968,7 @@ FindSequence(interp, patternTablePtr, object, eventString, create,
Pattern pats[EVENT_BUFFER_SIZE];
int numPats, virtualFound;
- char *p;
+ CONST char *p;
Pattern *patPtr;
PatSeq *psPtr;
Tcl_HashEntry *hPtr;
@@ -4122,7 +4123,7 @@ static int
ParseEventDescription(interp, eventStringPtr, patPtr,
eventMaskPtr)
Tcl_Interp *interp; /* For error messages. */
- char **eventStringPtr; /* On input, holds a pointer to start of
+ CONST char **eventStringPtr;/* On input, holds a pointer to start of
* event string. On exit, gets pointer to
* rest of string after parsed event. */
Pattern *patPtr; /* Filled with the pattern parsed from the
@@ -4136,8 +4137,10 @@ ParseEventDescription(interp, eventStringPtr, patPtr,
#define FIELD_SIZE 48
char field[FIELD_SIZE];
Tcl_HashEntry *hPtr;
+ Tcl_DString copy;
- p = *eventStringPtr;
+ Tcl_DStringInit(&copy);
+ p = Tcl_DStringAppend(&copy, *eventStringPtr, -1);
patPtr->eventType = -1;
patPtr->needMods = 0;
@@ -4166,7 +4169,8 @@ ParseEventDescription(interp, eventStringPtr, patPtr,
sprintf(buf, "bad ASCII character 0x%x", (unsigned char) *p);
Tcl_SetResult(interp, buf, TCL_VOLATILE);
- return 0;
+ count = 0;
+ goto done;
}
}
p++;
@@ -4207,12 +4211,14 @@ ParseEventDescription(interp, eventStringPtr, patPtr,
if (p == field) {
Tcl_SetResult(interp, "virtual event \"<<>>\" is badly formed",
TCL_STATIC);
- return 0;
+ count = 0;
+ goto done;
}
if ((p == NULL) || (p[1] != '>')) {
Tcl_SetResult(interp, "missing \">\" in virtual binding",
TCL_STATIC);
- return 0;
+ count = 0;
+ goto done;
}
*p = '\0';
patPtr->eventType = VirtualEvent;
@@ -4275,7 +4281,8 @@ ParseEventDescription(interp, eventStringPtr, patPtr,
} else if ((eventFlags & BUTTON) == 0) {
Tcl_AppendResult(interp, "specified button \"", field,
"\" for non-button event", (char *) NULL);
- return 0;
+ count = 0;
+ goto done;
}
patPtr->detail.button = (*field - '0');
} else {
@@ -4284,7 +4291,8 @@ ParseEventDescription(interp, eventStringPtr, patPtr,
if (patPtr->detail.keySym == NoSymbol) {
Tcl_AppendResult(interp, "bad event type or keysym \"",
field, "\"", (char *) NULL);
- return 0;
+ count = 0;
+ goto done;
}
if (eventFlags == 0) {
patPtr->eventType = KeyPress;
@@ -4292,13 +4300,15 @@ ParseEventDescription(interp, eventStringPtr, patPtr,
} else if ((eventFlags & KEY) == 0) {
Tcl_AppendResult(interp, "specified keysym \"", field,
"\" for non-key event", (char *) NULL);
- return 0;
+ count = 0;
+ goto done;
}
}
} else if (eventFlags == 0) {
Tcl_SetResult(interp, "no event type or button # or keysym",
TCL_STATIC);
- return 0;
+ count = 0;
+ goto done;
}
while ((*p == '-') || isspace(UCHAR(*p))) {
@@ -4311,17 +4321,21 @@ ParseEventDescription(interp, eventStringPtr, patPtr,
Tcl_SetResult(interp,
"extra characters after detail in binding",
TCL_STATIC);
- return 0;
+ count = 0;
+ goto done;
}
}
Tcl_SetResult(interp, "missing \">\" in binding", TCL_STATIC);
- return 0;
+ count = 0;
+ goto done;
}
p++;
end:
- *eventStringPtr = p;
+ *eventStringPtr += (p - Tcl_DStringValue(&copy));
*eventMaskPtr |= eventMask;
+done:
+ Tcl_DStringFree(&copy);
return count;
}
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c
index fc445f6..3f9e2e6 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.9 2001/08/15 15:44:36 dkf Exp $
+ * RCS: @(#) $Id: tkBitmap.c,v 1.10 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkPort.h"
@@ -87,7 +87,7 @@ typedef struct TkBitmap {
*/
typedef struct {
- char *source; /* Bitmap bits. */
+ CONST char *source; /* Bitmap bits. */
int width, height; /* Dimensions of bitmap. */
} DataKey;
@@ -468,7 +468,7 @@ Tk_DefineBitmap(interp, name, source, width, height)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
CONST char *name; /* Name to use for bitmap. Must not already
* be defined as a bitmap. */
- char *source; /* Address of bits for bitmap. */
+ CONST char *source; /* Address of bits for bitmap. */
int width; /* Width of bitmap. */
int height; /* Height of bitmap. */
{
@@ -523,7 +523,7 @@ Tk_DefineBitmap(interp, name, source, width, height)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfBitmap(display, bitmap)
Display *display; /* Display for which bitmap was
* allocated. */
@@ -809,7 +809,7 @@ Pixmap
Tk_GetBitmapFromData(interp, tkwin, source, width, height)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tk_Window tkwin; /* Window in which bitmap will be used. */
- char *source; /* Bitmap data for bitmap shape. */
+ CONST char *source; /* Bitmap data for bitmap shape. */
int width, height; /* Dimensions of bitmap. */
{
DataKey nameKey;
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 429916f..141f69f 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.18 2002/06/17 10:54:29 drh Exp $
+ * RCS: @(#) $Id: tkButton.c,v 1.19 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkButton.h"
@@ -524,11 +524,11 @@ static void ButtonSelectImageProc _ANSI_ARGS_((
ClientData clientData, int x, int y, int width,
int height, int imgWidth, int imgHeight));
static char * ButtonTextVarProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static char * ButtonVarProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static int ButtonWidgetObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
@@ -1552,7 +1552,7 @@ static char *
ButtonVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about button. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
+ CONST char *name1; /* Name of variable. */
CONST char *name2; /* Second part of variable name. */
int flags; /* Information about what happened. */
{
@@ -1631,7 +1631,7 @@ static char *
ButtonTextVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about button. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Not used. */
+ CONST char *name1; /* Not used. */
CONST char *name2; /* Not used. */
int flags; /* Information about what happened. */
{
diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c
index d1d5f68..317c272 100644
--- a/generic/tkCanvArc.c
+++ b/generic/tkCanvArc.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: tkCanvArc.c,v 1.9 2001/07/03 06:03:44 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvArc.c,v 1.10 2002/08/05 04:30:38 dgp Exp $
*/
#include <stdio.h>
@@ -467,8 +467,8 @@ ConfigureArc(interp, canvas, itemPtr, objc, objv, flags)
Tk_State state;
tkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, (char **) objv,
- (char *) arcPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
+ (CONST char **) objv, (char *) arcPtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c
index 39cf6a2..cc35dad 100644
--- a/generic/tkCanvBmap.c
+++ b/generic/tkCanvBmap.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: tkCanvBmap.c,v 1.5 2001/07/03 06:03:44 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvBmap.c,v 1.6 2002/08/05 04:30:38 dgp Exp $
*/
#include <stdio.h>
@@ -336,8 +336,8 @@ ConfigureBitmap(interp, canvas, itemPtr, objc, objv, flags)
Tk_State state;
tkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, (char **) objv,
- (char *) bmapPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
+ (CONST char **) objv, (char *) bmapPtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index 144b755..212ac2f 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.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: tkCanvImg.c,v 1.4 1999/12/14 06:52:25 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvImg.c,v 1.5 2002/08/05 04:30:38 dgp Exp $
*/
#include <stdio.h>
@@ -319,8 +319,8 @@ ConfigureImage(interp, canvas, itemPtr, argc, argv, flags)
Tk_Image image;
tkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, tkwin, configSpecs, argc, (char **) argv,
- (char *) imgPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, argc,
+ (CONST char **) argv, (char *) imgPtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 1263249..6431830 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.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: tkCanvLine.c,v 1.10 2002/01/25 21:09:36 dgp Exp $
+ * RCS: @(#) $Id: tkCanvLine.c,v 1.11 2002/08/05 04:30:38 dgp Exp $
*/
#include <stdio.h>
@@ -496,8 +496,8 @@ ConfigureLine(interp, canvas, itemPtr, objc, objv, flags)
Tk_State state;
tkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, (char **) objv,
- (char *) linePtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
+ (CONST char **) objv, (char *) linePtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index c4adf3c..b3f5374 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.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: tkCanvPoly.c,v 1.8 2001/07/04 00:40:11 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvPoly.c,v 1.9 2002/08/05 04:30:38 dgp Exp $
*/
#include <stdio.h>
@@ -451,8 +451,8 @@ ConfigurePolygon(interp, canvas, itemPtr, objc, objv, flags)
Tk_State state;
tkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, (char **) objv,
- (char *) polyPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
+ (CONST char **) objv, (char *) polyPtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index 47aa841..643f2a9 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.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: tkCanvPs.c,v 1.9 2002/06/25 16:27:43 a_kovalenko Exp $
+ * RCS: @(#) $Id: tkCanvPs.c,v 1.10 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkInt.h"
@@ -146,7 +146,7 @@ TkCanvPostscriptCmd(canvasPtr, interp, argc, argv)
TkCanvas *canvasPtr; /* Information about canvas widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Caller has
+ CONST char **argv; /* Argument strings. Caller has
* already parsed this command enough
* to know that argv[1] is
* "postscript". */
@@ -739,7 +739,7 @@ Tk_PostscriptFont(interp, psInfo, tkfont)
int argc;
double size;
CONST char **argv;
- char *name;
+ CONST char *name;
name = Tk_NameOfFont(tkfont);
list = Tcl_GetVar2(interp, psInfoPtr->fontVar, name, 0);
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 5254431..a7b9aa3 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.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: tkCanvText.c,v 1.13 2002/05/26 09:09:19 pspjuth Exp $
+ * RCS: @(#) $Id: tkCanvText.c,v 1.14 2002/08/05 04:30:38 dgp Exp $
*/
#include <stdio.h>
@@ -407,8 +407,8 @@ ConfigureText(interp, canvas, itemPtr, objc, objv, flags)
Tk_State state;
tkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, (char **) objv,
- (char *) textPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
+ (CONST char **) objv, (char *) textPtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c
index 87aadc9..80ba194 100644
--- a/generic/tkCanvUtil.c
+++ b/generic/tkCanvUtil.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: tkCanvUtil.c,v 1.6 2002/01/25 21:09:36 dgp Exp $
+ * RCS: @(#) $Id: tkCanvUtil.c,v 1.7 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkInt.h"
@@ -369,7 +369,7 @@ Tk_CanvasTagsParseProc(clientData, interp, tkwin, value, widgRec, offset)
ClientData clientData; /* Not used.*/
Tcl_Interp *interp; /* Used for reporting errors. */
Tk_Window tkwin; /* Window containing canvas widget. */
- char *value; /* Value of option (list of tag
+ CONST char *value; /* Value of option (list of tag
* names). */
char *widgRec; /* Pointer to record for item. */
int offset; /* Offset into item (ignored). */
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index 65d09bd..c197584 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.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: tkCanvWind.c,v 1.6 2002/06/14 22:25:12 jenglish Exp $
+ * RCS: @(#) $Id: tkCanvWind.c,v 1.7 2002/08/05 04:30:38 dgp Exp $
*/
#include <stdio.h>
@@ -329,8 +329,8 @@ ConfigureWinItem(interp, canvas, itemPtr, objc, objv, flags)
oldWindow = winItemPtr->tkwin;
canvasTkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, canvasTkwin, configSpecs, objc, (char **) objv,
- (char *) winItemPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, canvasTkwin, configSpecs, objc,
+ (CONST char **) objv, (char *) winItemPtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 37f9683..97adaf3 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.19 2002/07/24 19:41:38 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.20 2002/08/05 04:30:38 dgp Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -291,7 +291,7 @@ static int FindArea _ANSI_ARGS_((Tcl_Interp *interp,
TkCanvas *canvasPtr, Tcl_Obj *CONST *argv, Tk_Uid uid,
int enclosed));
static double GridAlign _ANSI_ARGS_((double coord, double spacing));
-static char** GetStringsFromObjs _ANSI_ARGS_((int argc,
+static CONST char** GetStringsFromObjs _ANSI_ARGS_((int argc,
Tcl_Obj *CONST *objv));
static void InitCanvas _ANSI_ARGS_((void));
#ifdef USE_OLD_TAG_SEARCH
@@ -770,7 +770,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
goto done;
}
} else if (argc == 4) {
- char *command;
+ CONST char *command;
command = Tk_GetBinding(interp, canvasPtr->bindingTable,
object, Tcl_GetStringFromObj(argv[3], NULL));
@@ -791,7 +791,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
Tcl_ResetResult(interp);
}
} else {
- Tcl_SetResult(interp, command, TCL_STATIC);
+ Tcl_SetResult(interp, (char *) command, TCL_STATIC);
}
} else {
Tk_GetAllBindings(interp, canvasPtr->bindingTable, object);
@@ -900,7 +900,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
result = (*itemPtr->typePtr->coordProc)(interp,
(Tk_Canvas) canvasPtr, itemPtr, argc-3, argv+3);
} else {
- char **args = GetStringsFromObjs(argc-3, argv+3);
+ CONST char **args = GetStringsFromObjs(argc-3, argv+3);
result = (*itemPtr->typePtr->coordProc)(interp,
(Tk_Canvas) canvasPtr, itemPtr, argc-3, (Tcl_Obj **) args);
if (args) ckfree((char *) args);
@@ -959,7 +959,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
result = (*typePtr->createProc)(interp, (Tk_Canvas) canvasPtr,
itemPtr, argc-3, argv+3);
} else {
- char **args = GetStringsFromObjs(argc-3, argv+3);
+ CONST char **args = GetStringsFromObjs(argc-3, argv+3);
result = (*typePtr->createProc)(interp, (Tk_Canvas) canvasPtr,
itemPtr, argc-3, (Tcl_Obj **) args);
if (args) ckfree((char *) args);
@@ -1437,7 +1437,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
(Tk_Canvas) canvasPtr, itemPtr, argc-3, argv+3,
TK_CONFIG_ARGV_ONLY);
} else {
- char **args = GetStringsFromObjs(argc-3, argv+3);
+ CONST char **args = GetStringsFromObjs(argc-3, argv+3);
result = (*itemPtr->typePtr->configProc)(interp,
(Tk_Canvas) canvasPtr, itemPtr, argc-3, (Tcl_Obj **) args,
TK_CONFIG_ARGV_ONLY);
@@ -1526,7 +1526,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
break;
}
case CANV_POSTSCRIPT: {
- char **args = GetStringsFromObjs(argc, argv);
+ CONST char **args = GetStringsFromObjs(argc, argv);
result = TkCanvPostscriptCmd(canvasPtr, interp, argc, args);
if (args) ckfree((char *) args);
break;
@@ -1819,7 +1819,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
- canvasPtr->inset, canvasPtr->scrollX1,
canvasPtr->scrollX2));
} else {
- char **args = GetStringsFromObjs(argc, argv);
+ CONST char **args = GetStringsFromObjs(argc, argv);
type = Tk_GetScrollInfo(interp, argc, args, &fraction, &count);
if (args) ckfree((char *) args);
switch (type) {
@@ -1863,7 +1863,7 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
- canvasPtr->inset, canvasPtr->scrollY1,
canvasPtr->scrollY2));
} else {
- char **args = GetStringsFromObjs(argc, argv);
+ CONST char **args = GetStringsFromObjs(argc, argv);
type = Tk_GetScrollInfo(interp, argc, args, &fraction, &count);
if (args) ckfree((char *) args);
switch (type) {
@@ -2008,7 +2008,8 @@ ConfigureCanvas(interp, canvasPtr, argc, argv, flags)
GC new;
if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs,
- argc, (char **) argv, (char *) canvasPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ argc, (CONST char **) argv, (char *) canvasPtr,
+ flags|TK_CONFIG_OBJS) != TCL_OK) {
return TCL_ERROR;
}
@@ -5485,17 +5486,17 @@ CanvasSetOrigin(canvasPtr, xOrigin, yOrigin)
*----------------------------------------------------------------------
*/
/* ARGSUSED */
-static char **
+static CONST char **
GetStringsFromObjs(argc, objv)
int argc;
Tcl_Obj *CONST objv[];
{
register int i;
- char **argv;
+ CONST char **argv;
if (argc <= 0) {
return NULL;
}
- argv = (char **) ckalloc((argc+1) * sizeof(char *));
+ argv = (CONST char **) ckalloc((argc+1) * sizeof(char *));
for (i = 0; i < argc; i++) {
argv[i]=Tcl_GetStringFromObj(objv[i], (int *) NULL);
}
diff --git a/generic/tkCanvas.h b/generic/tkCanvas.h
index 9d2c392..70cb03d 100644
--- a/generic/tkCanvas.h
+++ b/generic/tkCanvas.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: tkCanvas.h,v 1.4 1999/12/14 06:52:27 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvas.h,v 1.5 2002/08/05 04:30:38 dgp Exp $
*/
#ifndef _TKCANVAS
@@ -293,7 +293,7 @@ typedef struct TkCanvas {
*/
extern int TkCanvPostscriptCmd _ANSI_ARGS_((TkCanvas *canvasPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
/*
* The following definition is shared between tkCanvPs.c and tkCanvImg.c,
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index 83fb376..2efdeac 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.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: tkClipboard.c,v 1.11 2002/06/19 20:40:55 mdejong Exp $
+ * RCS: @(#) $Id: tkClipboard.c,v 1.12 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkInt.h"
@@ -141,7 +141,7 @@ ClipboardAppHandler(clientData, offset, buffer, maxBytes)
{
TkDisplay *dispPtr = (TkDisplay *) clientData;
size_t length;
- char *p;
+ CONST char *p;
p = dispPtr->clipboardAppPtr->winPtr->nameUid;
length = strlen(p);
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 6b08149..e1cac65 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.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: tkCmds.c,v 1.28 2002/06/17 20:09:01 hobbs Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.29 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkPort.h"
@@ -32,8 +32,8 @@
static TkWindow * GetToplevel _ANSI_ARGS_((Tk_Window tkwin));
static char * WaitVariableProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static void WaitVisibilityProc _ANSI_ARGS_((ClientData clientData,
XEvent *eventPtr));
static void WaitWindowProc _ANSI_ARGS_((ClientData clientData,
@@ -193,7 +193,7 @@ Tk_BindObjCmd(clientData, interp, objc, objv)
return TCL_ERROR;
}
} else if (objc == 3) {
- char *command;
+ CONST char *command;
command = Tk_GetBinding(interp, winPtr->mainPtr->bindingTable,
object, Tcl_GetString(objv[2]));
@@ -201,7 +201,7 @@ Tk_BindObjCmd(clientData, interp, objc, objv)
Tcl_ResetResult(interp);
return TCL_OK;
}
- Tcl_SetResult(interp, command, TCL_STATIC);
+ Tcl_SetResult(interp, (char *) command, TCL_STATIC);
} else {
Tk_GetAllBindings(interp, winPtr->mainPtr->bindingTable, object);
}
@@ -939,7 +939,7 @@ static char *
WaitVariableProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Pointer to integer to set to 1. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
+ CONST char *name1; /* Name of variable. */
CONST char *name2; /* Second part of variable name. */
int flags; /* Information about what happened. */
{
@@ -1410,7 +1410,7 @@ Tk_WinfoObjCmd(clientData, interp, objc, objv)
break;
}
case WIN_ATOMNAME: {
- char *name;
+ CONST char *name;
long id;
skip = TkGetDisplayOf(interp, objc - 2, objv + 2, &tkwin);
@@ -1966,7 +1966,7 @@ TkDeadAppCmd(clientData, interp, argc, argv)
ClientData clientData; /* Dummy. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
Tcl_AppendResult(interp, "can't invoke \"", argv[0],
"\" command: application has been destroyed", (char *) NULL);
diff --git a/generic/tkColor.c b/generic/tkColor.c
index 7a9ced2..b3cc9bb 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.8 2001/08/15 15:44:36 dkf Exp $
+ * RCS: @(#) $Id: tkColor.c,v 1.9 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkColor.h"
@@ -187,7 +187,7 @@ Tk_GetColor(interp, tkwin, name)
Tcl_Interp *interp; /* Place to leave error message if
* color can't be found. */
Tk_Window tkwin; /* Window in which color will be used. */
- char *name; /* Name of color to be allocated (in form
+ Tk_Uid name; /* Name of color to be allocated (in form
* suitable for passing to XParseColor). */
{
Tcl_HashEntry *nameHashPtr;
@@ -363,7 +363,7 @@ Tk_GetColorByValue(tkwin, colorPtr)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfColor(colorPtr)
XColor *colorPtr; /* Color whose name is desired. */
{
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 6572e23..643ef81 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.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: tkConfig.c,v 1.17 2002/06/18 23:51:46 dkf Exp $
+ * RCS: @(#) $Id: tkConfig.c,v 1.18 2002/08/05 04:30:38 dgp Exp $
*/
/*
@@ -465,7 +465,7 @@ Tk_InitOptions(interp, recordPtr, optionTable, tkwin)
OptionTable *tablePtr = (OptionTable *) optionTable;
Option *optionPtr;
int count;
- char *value;
+ Tk_Uid value;
Tcl_Obj *valuePtr;
enum {
OPTION_DATABASE, SYSTEM_DEFAULT, TABLE_DEFAULT
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index e004155..c8e2c8a 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.17 2002/04/12 06:51:50 hobbs Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.18 2002/08/05 04:30:38 dgp Exp $
*/
#include "tk.h"
@@ -48,12 +48,12 @@ TCL_DECLARE_MUTEX(consoleMutex)
*/
static int ConsoleCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static void ConsoleDeleteProc _ANSI_ARGS_((ClientData clientData));
static void ConsoleEventProc _ANSI_ARGS_((ClientData clientData,
XEvent *eventPtr));
static int InterpreterCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int ConsoleInput _ANSI_ARGS_((ClientData instanceData,
char *buf, int toRead, int *errorCode));
@@ -560,7 +560,7 @@ ConsoleCmd(clientData, interp, argc, argv)
ClientData clientData; /* Not used. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
ConsoleInfo *info = (ConsoleInfo *) clientData;
char c;
@@ -637,7 +637,7 @@ InterpreterCmd(clientData, interp, argc, argv)
ClientData clientData; /* Not used. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
ConsoleInfo *info = (ConsoleInfo *) clientData;
char c;
diff --git a/generic/tkCursor.c b/generic/tkCursor.c
index 89c40ae..ce6b381 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.8 2001/10/23 08:40:47 dkf Exp $
+ * RCS: @(#) $Id: tkCursor.c,v 1.9 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkPort.h"
@@ -26,8 +26,8 @@
*/
typedef struct {
- char *source; /* Cursor bits. */
- char *mask; /* Mask bits. */
+ CONST char *source; /* Cursor bits. */
+ CONST char *mask; /* Mask bits. */
int width, height; /* Dimensions of cursor (and data
* and mask). */
int xHot, yHot; /* Location of cursor hot-spot. */
@@ -45,7 +45,7 @@ static void DupCursorObjProc _ANSI_ARGS_((Tcl_Obj *srcObjPtr,
static void FreeCursor _ANSI_ARGS_((TkCursor *cursorPtr));
static void FreeCursorObjProc _ANSI_ARGS_((Tcl_Obj *objPtr));
static TkCursor * GetCursor _ANSI_ARGS_((Tcl_Interp *interp,
- Tk_Window tkwin, char *name));
+ Tk_Window tkwin, CONST char *name));
static TkCursor * GetCursorFromObj _ANSI_ARGS_((Tk_Window tkwin,
Tcl_Obj *objPtr));
static void InitCursorObj _ANSI_ARGS_((Tcl_Obj *objPtr));
@@ -189,7 +189,7 @@ Tk_Cursor
Tk_GetCursor(interp, tkwin, string)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tk_Window tkwin; /* Window in which cursor will be used. */
- char *string; /* Description of cursor. See manual entry
+ Tk_Uid string; /* Description of cursor. See manual entry
* for details on legal syntax. */
{
TkCursor *cursorPtr = GetCursor(interp, tkwin, string);
@@ -230,7 +230,7 @@ static TkCursor *
GetCursor(interp, tkwin, string)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tk_Window tkwin; /* Window in which cursor will be used. */
- char *string; /* Description of cursor. See manual entry
+ CONST char *string; /* Description of cursor. See manual entry
* for details on legal syntax. */
{
Tcl_HashEntry *nameHashPtr;
@@ -318,8 +318,8 @@ Tk_GetCursorFromData(interp, tkwin, source, mask, width, height,
xHot, yHot, fg, bg)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tk_Window tkwin; /* Window in which cursor will be used. */
- char *source; /* Bitmap data for cursor shape. */
- char *mask; /* Bitmap data for cursor mask. */
+ CONST char *source; /* Bitmap data for cursor shape. */
+ CONST char *mask; /* Bitmap data for cursor mask. */
int width, height; /* Dimensions of cursor. */
int xHot, yHot; /* Location of hot-spot in cursor. */
Tk_Uid fg; /* Foreground color for cursor. */
@@ -418,7 +418,7 @@ Tk_GetCursorFromData(interp, tkwin, source, mask, width, height,
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfCursor(display, cursor)
Display *display; /* Display for which cursor was allocated. */
Tk_Cursor cursor; /* Identifier for cursor whose name is
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index c0d55bc..fd5aadd 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -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: tkDecls.h,v 1.22 2002/06/18 23:51:46 dkf Exp $
+ * RCS: @(#) $Id: tkDecls.h,v 1.23 2002/08/05 04:30:38 dgp Exp $
*/
#ifndef _TKDECLS
@@ -97,7 +97,7 @@ EXTERN void Tk_CanvasSetStippleOrigin _ANSI_ARGS_((
/* 18 */
EXTERN int Tk_CanvasTagsParseProc _ANSI_ARGS_((
ClientData clientData, Tcl_Interp * interp,
- Tk_Window tkwin, char * value,
+ Tk_Window tkwin, CONST char * value,
char * widgRec, int offset));
/* 19 */
EXTERN char * Tk_CanvasTagsPrintProc _ANSI_ARGS_((
@@ -131,16 +131,18 @@ EXTERN int Tk_ClipboardClear _ANSI_ARGS_((Tcl_Interp * interp,
/* 27 */
EXTERN int Tk_ConfigureInfo _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, Tk_ConfigSpec * specs,
- char * widgRec, char * argvName, int flags));
+ char * widgRec, CONST char * argvName,
+ int flags));
/* 28 */
EXTERN int Tk_ConfigureValue _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, Tk_ConfigSpec * specs,
- char * widgRec, char * argvName, int flags));
+ char * widgRec, CONST char * argvName,
+ int flags));
/* 29 */
EXTERN int Tk_ConfigureWidget _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, Tk_ConfigSpec * specs,
- int argc, char ** argv, char * widgRec,
- int flags));
+ int argc, CONST84 char ** argv,
+ char * widgRec, int flags));
/* 30 */
EXTERN void Tk_ConfigureWindow _ANSI_ARGS_((Tk_Window tkwin,
unsigned int valueMask,
@@ -156,8 +158,8 @@ EXTERN Tk_Window Tk_CoordsToWindow _ANSI_ARGS_((int rootX, int rootY,
/* 33 */
EXTERN unsigned long Tk_CreateBinding _ANSI_ARGS_((Tcl_Interp * interp,
Tk_BindingTable bindingTable,
- ClientData object, char * eventStr,
- char * command, int append));
+ ClientData object, CONST char * eventStr,
+ CONST char * command, int append));
/* 34 */
EXTERN Tk_BindingTable Tk_CreateBindingTable _ANSI_ARGS_((
Tcl_Interp * interp));
@@ -188,16 +190,17 @@ EXTERN void Tk_CreateSelHandler _ANSI_ARGS_((Tk_Window tkwin,
ClientData clientData, Atom format));
/* 42 */
EXTERN Tk_Window Tk_CreateWindow _ANSI_ARGS_((Tcl_Interp * interp,
- Tk_Window parent, char * name,
- char * screenName));
+ Tk_Window parent, CONST char * name,
+ CONST char * screenName));
/* 43 */
EXTERN Tk_Window Tk_CreateWindowFromPath _ANSI_ARGS_((
Tcl_Interp * interp, Tk_Window tkwin,
- char * pathName, char * screenName));
+ CONST char * pathName,
+ CONST char * screenName));
/* 44 */
EXTERN int Tk_DefineBitmap _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * name, char * source, int width,
- int height));
+ CONST char * name, CONST char * source,
+ int width, int height));
/* 45 */
EXTERN void Tk_DefineCursor _ANSI_ARGS_((Tk_Window window,
Tk_Cursor cursor));
@@ -208,7 +211,7 @@ EXTERN void Tk_DeleteAllBindings _ANSI_ARGS_((
/* 47 */
EXTERN int Tk_DeleteBinding _ANSI_ARGS_((Tcl_Interp * interp,
Tk_BindingTable bindingTable,
- ClientData object, char * eventStr));
+ ClientData object, CONST char * eventStr));
/* 48 */
EXTERN void Tk_DeleteBindingTable _ANSI_ARGS_((
Tk_BindingTable bindingTable));
@@ -224,14 +227,14 @@ EXTERN void Tk_DeleteGenericHandler _ANSI_ARGS_((
Tk_GenericProc * proc, ClientData clientData));
/* 52 */
EXTERN void Tk_DeleteImage _ANSI_ARGS_((Tcl_Interp * interp,
- char * name));
+ CONST char * name));
/* 53 */
EXTERN void Tk_DeleteSelHandler _ANSI_ARGS_((Tk_Window tkwin,
Atom selection, Atom target));
/* 54 */
EXTERN void Tk_DestroyWindow _ANSI_ARGS_((Tk_Window tkwin));
/* 55 */
-EXTERN char * Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin));
+EXTERN CONST84_RETURN char * Tk_DisplayName _ANSI_ARGS_((Tk_Window tkwin));
/* 56 */
EXTERN int Tk_DistanceToTextLayout _ANSI_ARGS_((
Tk_TextLayout layout, int x, int y));
@@ -270,7 +273,7 @@ EXTERN void Tk_Fill3DRectangle _ANSI_ARGS_((Tk_Window tkwin,
int borderWidth, int relief));
/* 64 */
EXTERN Tk_PhotoHandle Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp * interp,
- char * imageName));
+ CONST char * imageName));
/* 65 */
EXTERN Font Tk_FontId _ANSI_ARGS_((Tk_Font font));
/* 66 */
@@ -319,24 +322,24 @@ EXTERN void Tk_GetAllBindings _ANSI_ARGS_((Tcl_Interp * interp,
ClientData object));
/* 82 */
EXTERN int Tk_GetAnchor _ANSI_ARGS_((Tcl_Interp * interp,
- char * str, Tk_Anchor * anchorPtr));
+ CONST char * str, Tk_Anchor * anchorPtr));
/* 83 */
-EXTERN char * Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin,
+EXTERN CONST84_RETURN char * Tk_GetAtomName _ANSI_ARGS_((Tk_Window tkwin,
Atom atom));
/* 84 */
-EXTERN char * Tk_GetBinding _ANSI_ARGS_((Tcl_Interp * interp,
+EXTERN CONST84_RETURN char * Tk_GetBinding _ANSI_ARGS_((Tcl_Interp * interp,
Tk_BindingTable bindingTable,
- ClientData object, char * eventStr));
+ ClientData object, CONST char * eventStr));
/* 85 */
EXTERN Pixmap Tk_GetBitmap _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, CONST char * str));
/* 86 */
EXTERN Pixmap Tk_GetBitmapFromData _ANSI_ARGS_((
Tcl_Interp * interp, Tk_Window tkwin,
- char * source, int width, int height));
+ CONST char * source, int width, int height));
/* 87 */
EXTERN int Tk_GetCapStyle _ANSI_ARGS_((Tcl_Interp * interp,
- char * str, int * capPtr));
+ CONST char * str, int * capPtr));
/* 88 */
EXTERN XColor * Tk_GetColor _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, Tk_Uid name));
@@ -345,16 +348,16 @@ EXTERN XColor * Tk_GetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
XColor * colorPtr));
/* 90 */
EXTERN Colormap Tk_GetColormap _ANSI_ARGS_((Tcl_Interp * interp,
- Tk_Window tkwin, char * str));
+ Tk_Window tkwin, CONST char * str));
/* 91 */
EXTERN Tk_Cursor Tk_GetCursor _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, Tk_Uid str));
/* 92 */
EXTERN Tk_Cursor Tk_GetCursorFromData _ANSI_ARGS_((
Tcl_Interp * interp, Tk_Window tkwin,
- char * source, char * mask, int width,
- int height, int xHot, int yHot, Tk_Uid fg,
- Tk_Uid bg));
+ CONST char * source, CONST char * mask,
+ int width, int height, int xHot, int yHot,
+ Tk_Uid fg, Tk_Uid bg));
/* 93 */
EXTERN Tk_Font Tk_GetFont _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, CONST char * str));
@@ -370,26 +373,26 @@ EXTERN GC Tk_GetGC _ANSI_ARGS_((Tk_Window tkwin,
XGCValues * valuePtr));
/* 97 */
EXTERN Tk_Image Tk_GetImage _ANSI_ARGS_((Tcl_Interp * interp,
- Tk_Window tkwin, char * name,
+ Tk_Window tkwin, CONST char * name,
Tk_ImageChangedProc * changeProc,
ClientData clientData));
/* 98 */
EXTERN ClientData Tk_GetImageMasterData _ANSI_ARGS_((
- Tcl_Interp * interp, char * name,
+ Tcl_Interp * interp, CONST char * name,
Tk_ImageType ** typePtrPtr));
/* 99 */
EXTERN Tk_ItemType * Tk_GetItemTypes _ANSI_ARGS_((void));
/* 100 */
EXTERN int Tk_GetJoinStyle _ANSI_ARGS_((Tcl_Interp * interp,
- char * str, int * joinPtr));
+ CONST char * str, int * joinPtr));
/* 101 */
EXTERN int Tk_GetJustify _ANSI_ARGS_((Tcl_Interp * interp,
- char * str, Tk_Justify * justifyPtr));
+ CONST char * str, Tk_Justify * justifyPtr));
/* 102 */
EXTERN int Tk_GetNumMainWindows _ANSI_ARGS_((void));
/* 103 */
EXTERN Tk_Uid Tk_GetOption _ANSI_ARGS_((Tk_Window tkwin,
- char * name, char * className));
+ CONST char * name, CONST char * className));
/* 104 */
EXTERN int Tk_GetPixels _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, CONST char * str,
@@ -399,14 +402,14 @@ EXTERN Pixmap Tk_GetPixmap _ANSI_ARGS_((Display * display,
Drawable d, int width, int height, int depth));
/* 106 */
EXTERN int Tk_GetRelief _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, int * reliefPtr));
+ CONST char * name, int * reliefPtr));
/* 107 */
EXTERN void Tk_GetRootCoords _ANSI_ARGS_((Tk_Window tkwin,
int * xPtr, int * yPtr));
/* 108 */
EXTERN int Tk_GetScrollInfo _ANSI_ARGS_((Tcl_Interp * interp,
- int argc, char ** argv, double * dblPtr,
- int * intPtr));
+ int argc, CONST84 char ** argv,
+ double * dblPtr, int * intPtr));
/* 109 */
EXTERN int Tk_GetScreenMM _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, CONST char * str,
@@ -419,8 +422,8 @@ EXTERN int Tk_GetSelection _ANSI_ARGS_((Tcl_Interp * interp,
EXTERN Tk_Uid Tk_GetUid _ANSI_ARGS_((CONST char * str));
/* 112 */
EXTERN Visual * Tk_GetVisual _ANSI_ARGS_((Tcl_Interp * interp,
- Tk_Window tkwin, char * str, int * depthPtr,
- Colormap * colormapPtr));
+ Tk_Window tkwin, CONST char * str,
+ int * depthPtr, Colormap * colormapPtr));
/* 113 */
EXTERN void Tk_GetVRootGeometry _ANSI_ARGS_((Tk_Window tkwin,
int * xPtr, int * yPtr, int * widthPtr,
@@ -441,7 +444,7 @@ EXTERN void Tk_ImageChanged _ANSI_ARGS_((Tk_ImageMaster master,
EXTERN int Tk_Init _ANSI_ARGS_((Tcl_Interp * interp));
/* 119 */
EXTERN Atom Tk_InternAtom _ANSI_ARGS_((Tk_Window tkwin,
- char * name));
+ CONST char * name));
/* 120 */
EXTERN int Tk_IntersectTextLayout _ANSI_ARGS_((
Tk_TextLayout layout, int x, int y,
@@ -473,30 +476,32 @@ EXTERN void Tk_MoveWindow _ANSI_ARGS_((Tk_Window tkwin, int x,
EXTERN void Tk_MoveToplevelWindow _ANSI_ARGS_((Tk_Window tkwin,
int x, int y));
/* 130 */
-EXTERN char * Tk_NameOf3DBorder _ANSI_ARGS_((Tk_3DBorder border));
+EXTERN CONST84_RETURN char * Tk_NameOf3DBorder _ANSI_ARGS_((
+ Tk_3DBorder border));
/* 131 */
-EXTERN char * Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor));
+EXTERN CONST84_RETURN char * Tk_NameOfAnchor _ANSI_ARGS_((Tk_Anchor anchor));
/* 132 */
-EXTERN char * Tk_NameOfBitmap _ANSI_ARGS_((Display * display,
+EXTERN CONST84_RETURN char * Tk_NameOfBitmap _ANSI_ARGS_((Display * display,
Pixmap bitmap));
/* 133 */
-EXTERN char * Tk_NameOfCapStyle _ANSI_ARGS_((int cap));
+EXTERN CONST84_RETURN char * Tk_NameOfCapStyle _ANSI_ARGS_((int cap));
/* 134 */
-EXTERN char * Tk_NameOfColor _ANSI_ARGS_((XColor * colorPtr));
+EXTERN CONST84_RETURN char * Tk_NameOfColor _ANSI_ARGS_((XColor * colorPtr));
/* 135 */
-EXTERN char * Tk_NameOfCursor _ANSI_ARGS_((Display * display,
+EXTERN CONST84_RETURN char * Tk_NameOfCursor _ANSI_ARGS_((Display * display,
Tk_Cursor cursor));
/* 136 */
-EXTERN char * Tk_NameOfFont _ANSI_ARGS_((Tk_Font font));
+EXTERN CONST84_RETURN char * Tk_NameOfFont _ANSI_ARGS_((Tk_Font font));
/* 137 */
-EXTERN char * Tk_NameOfImage _ANSI_ARGS_((
+EXTERN CONST84_RETURN char * Tk_NameOfImage _ANSI_ARGS_((
Tk_ImageMaster imageMaster));
/* 138 */
-EXTERN char * Tk_NameOfJoinStyle _ANSI_ARGS_((int join));
+EXTERN CONST84_RETURN char * Tk_NameOfJoinStyle _ANSI_ARGS_((int join));
/* 139 */
-EXTERN char * Tk_NameOfJustify _ANSI_ARGS_((Tk_Justify justify));
+EXTERN CONST84_RETURN char * Tk_NameOfJustify _ANSI_ARGS_((
+ Tk_Justify justify));
/* 140 */
-EXTERN char * Tk_NameOfRelief _ANSI_ARGS_((int relief));
+EXTERN CONST84_RETURN char * Tk_NameOfRelief _ANSI_ARGS_((int relief));
/* 141 */
EXTERN Tk_Window Tk_NameToWindow _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * pathName, Tk_Window tkwin));
@@ -564,14 +569,14 @@ EXTERN Tk_RestrictProc * Tk_RestrictEvents _ANSI_ARGS_((
/* 159 */
EXTERN int Tk_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
/* 160 */
-EXTERN char * Tk_SetAppName _ANSI_ARGS_((Tk_Window tkwin,
- char * name));
+EXTERN CONST char * Tk_SetAppName _ANSI_ARGS_((Tk_Window tkwin,
+ CONST char * name));
/* 161 */
EXTERN void Tk_SetBackgroundFromBorder _ANSI_ARGS_((
Tk_Window tkwin, Tk_3DBorder border));
/* 162 */
EXTERN void Tk_SetClass _ANSI_ARGS_((Tk_Window tkwin,
- char * className));
+ CONST char * className));
/* 163 */
EXTERN void Tk_SetGrid _ANSI_ARGS_((Tk_Window tkwin,
int reqWidth, int reqHeight, int gridWidth,
@@ -833,7 +838,7 @@ EXTERN void Tk_DeleteClientMessageHandler _ANSI_ARGS_((
/* 241 */
EXTERN Tk_Window Tk_CreateAnonymousWindow _ANSI_ARGS_((
Tcl_Interp * interp, Tk_Window parent,
- char * screenName));
+ CONST char * screenName));
/* 242 */
EXTERN void Tk_SetClassProcs _ANSI_ARGS_((Tk_Window tkwin,
Tk_ClassProcs * procs,
@@ -861,16 +866,16 @@ EXTERN void Tk_PhotoPutZoomedBlock _ANSI_ARGS_((
EXTERN int Tk_CollapseMotionEvents _ANSI_ARGS_((
Display * display, int collapse));
/* 249 */
-EXTERN Tk_StyleEngine Tk_RegisterStyleEngine _ANSI_ARGS_((char * name,
- Tk_StyleEngine parent));
+EXTERN Tk_StyleEngine Tk_RegisterStyleEngine _ANSI_ARGS_((
+ CONST char * name, Tk_StyleEngine parent));
/* 250 */
-EXTERN Tk_StyleEngine Tk_GetStyleEngine _ANSI_ARGS_((char * name));
+EXTERN Tk_StyleEngine Tk_GetStyleEngine _ANSI_ARGS_((CONST char * name));
/* 251 */
EXTERN int Tk_RegisterStyledElement _ANSI_ARGS_((
Tk_StyleEngine engine,
Tk_ElementSpec * templatePtr));
/* 252 */
-EXTERN int Tk_GetElementId _ANSI_ARGS_((char * name));
+EXTERN int Tk_GetElementId _ANSI_ARGS_((CONST char * name));
/* 253 */
EXTERN Tk_Style Tk_CreateStyle _ANSI_ARGS_((CONST char * name,
Tk_StyleEngine engine, ClientData clientData));
@@ -941,7 +946,7 @@ typedef struct TkStubs {
int (*tk_CanvasPsStipple) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Canvas canvas, Pixmap bitmap)); /* 15 */
double (*tk_CanvasPsY) _ANSI_ARGS_((Tk_Canvas canvas, double y)); /* 16 */
void (*tk_CanvasSetStippleOrigin) _ANSI_ARGS_((Tk_Canvas canvas, GC gc)); /* 17 */
- int (*tk_CanvasTagsParseProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, Tk_Window tkwin, char * value, char * widgRec, int offset)); /* 18 */
+ int (*tk_CanvasTagsParseProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, Tk_Window tkwin, CONST char * value, char * widgRec, int offset)); /* 18 */
char * (*tk_CanvasTagsPrintProc) _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin, char * widgRec, int offset, Tcl_FreeProc ** freeProcPtr)); /* 19 */
Tk_Window (*tk_CanvasTkwin) _ANSI_ARGS_((Tk_Canvas canvas)); /* 20 */
void (*tk_CanvasWindowCoords) _ANSI_ARGS_((Tk_Canvas canvas, double x, double y, short * screenXPtr, short * screenYPtr)); /* 21 */
@@ -950,13 +955,13 @@ typedef struct TkStubs {
void (*tk_ClearSelection) _ANSI_ARGS_((Tk_Window tkwin, Atom selection)); /* 24 */
int (*tk_ClipboardAppend) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Atom target, Atom format, char* buffer)); /* 25 */
int (*tk_ClipboardClear) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin)); /* 26 */
- int (*tk_ConfigureInfo) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, char * argvName, int flags)); /* 27 */
- int (*tk_ConfigureValue) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, char * argvName, int flags)); /* 28 */
- int (*tk_ConfigureWidget) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, int argc, char ** argv, char * widgRec, int flags)); /* 29 */
+ int (*tk_ConfigureInfo) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, CONST char * argvName, int flags)); /* 27 */
+ int (*tk_ConfigureValue) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, char * widgRec, CONST char * argvName, int flags)); /* 28 */
+ int (*tk_ConfigureWidget) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_ConfigSpec * specs, int argc, CONST84 char ** argv, char * widgRec, int flags)); /* 29 */
void (*tk_ConfigureWindow) _ANSI_ARGS_((Tk_Window tkwin, unsigned int valueMask, XWindowChanges * valuePtr)); /* 30 */
Tk_TextLayout (*tk_ComputeTextLayout) _ANSI_ARGS_((Tk_Font font, CONST char * str, int numChars, int wrapLength, Tk_Justify justify, int flags, int * widthPtr, int * heightPtr)); /* 31 */
Tk_Window (*tk_CoordsToWindow) _ANSI_ARGS_((int rootX, int rootY, Tk_Window tkwin)); /* 32 */
- unsigned long (*tk_CreateBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, char * eventStr, char * command, int append)); /* 33 */
+ unsigned long (*tk_CreateBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr, CONST char * command, int append)); /* 33 */
Tk_BindingTable (*tk_CreateBindingTable) _ANSI_ARGS_((Tcl_Interp * interp)); /* 34 */
Tk_ErrorHandler (*tk_CreateErrorHandler) _ANSI_ARGS_((Display * display, int errNum, int request, int minorCode, Tk_ErrorProc * errorProc, ClientData clientData)); /* 35 */
void (*tk_CreateEventHandler) _ANSI_ARGS_((Tk_Window token, unsigned long mask, Tk_EventProc * proc, ClientData clientData)); /* 36 */
@@ -965,20 +970,20 @@ typedef struct TkStubs {
void (*tk_CreateItemType) _ANSI_ARGS_((Tk_ItemType * typePtr)); /* 39 */
void (*tk_CreatePhotoImageFormat) _ANSI_ARGS_((Tk_PhotoImageFormat * formatPtr)); /* 40 */
void (*tk_CreateSelHandler) _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Atom target, Tk_SelectionProc * proc, ClientData clientData, Atom format)); /* 41 */
- Tk_Window (*tk_CreateWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window parent, char * name, char * screenName)); /* 42 */
- Tk_Window (*tk_CreateWindowFromPath) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * pathName, char * screenName)); /* 43 */
- int (*tk_DefineBitmap) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, char * source, int width, int height)); /* 44 */
+ Tk_Window (*tk_CreateWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window parent, CONST char * name, CONST char * screenName)); /* 42 */
+ Tk_Window (*tk_CreateWindowFromPath) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * pathName, CONST char * screenName)); /* 43 */
+ int (*tk_DefineBitmap) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * source, int width, int height)); /* 44 */
void (*tk_DefineCursor) _ANSI_ARGS_((Tk_Window window, Tk_Cursor cursor)); /* 45 */
void (*tk_DeleteAllBindings) _ANSI_ARGS_((Tk_BindingTable bindingTable, ClientData object)); /* 46 */
- int (*tk_DeleteBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, char * eventStr)); /* 47 */
+ int (*tk_DeleteBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr)); /* 47 */
void (*tk_DeleteBindingTable) _ANSI_ARGS_((Tk_BindingTable bindingTable)); /* 48 */
void (*tk_DeleteErrorHandler) _ANSI_ARGS_((Tk_ErrorHandler handler)); /* 49 */
void (*tk_DeleteEventHandler) _ANSI_ARGS_((Tk_Window token, unsigned long mask, Tk_EventProc * proc, ClientData clientData)); /* 50 */
void (*tk_DeleteGenericHandler) _ANSI_ARGS_((Tk_GenericProc * proc, ClientData clientData)); /* 51 */
- void (*tk_DeleteImage) _ANSI_ARGS_((Tcl_Interp * interp, char * name)); /* 52 */
+ void (*tk_DeleteImage) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 52 */
void (*tk_DeleteSelHandler) _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Atom target)); /* 53 */
void (*tk_DestroyWindow) _ANSI_ARGS_((Tk_Window tkwin)); /* 54 */
- char * (*tk_DisplayName) _ANSI_ARGS_((Tk_Window tkwin)); /* 55 */
+ CONST84_RETURN char * (*tk_DisplayName) _ANSI_ARGS_((Tk_Window tkwin)); /* 55 */
int (*tk_DistanceToTextLayout) _ANSI_ARGS_((Tk_TextLayout layout, int x, int y)); /* 56 */
void (*tk_Draw3DPolygon) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint * pointPtr, int numPoints, int borderWidth, int leftRelief)); /* 57 */
void (*tk_Draw3DRectangle) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief)); /* 58 */
@@ -987,7 +992,7 @@ typedef struct TkStubs {
void (*tk_DrawTextLayout) _ANSI_ARGS_((Display * display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, int firstChar, int lastChar)); /* 61 */
void (*tk_Fill3DPolygon) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint * pointPtr, int numPoints, int borderWidth, int leftRelief)); /* 62 */
void (*tk_Fill3DRectangle) _ANSI_ARGS_((Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief)); /* 63 */
- Tk_PhotoHandle (*tk_FindPhoto) _ANSI_ARGS_((Tcl_Interp * interp, char * imageName)); /* 64 */
+ Tk_PhotoHandle (*tk_FindPhoto) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * imageName)); /* 64 */
Font (*tk_FontId) _ANSI_ARGS_((Tk_Font font)); /* 65 */
void (*tk_Free3DBorder) _ANSI_ARGS_((Tk_3DBorder border)); /* 66 */
void (*tk_FreeBitmap) _ANSI_ARGS_((Display * display, Pixmap bitmap)); /* 67 */
@@ -1005,44 +1010,44 @@ typedef struct TkStubs {
void (*tk_GeometryRequest) _ANSI_ARGS_((Tk_Window tkwin, int reqWidth, int reqHeight)); /* 79 */
Tk_3DBorder (*tk_Get3DBorder) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid colorName)); /* 80 */
void (*tk_GetAllBindings) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object)); /* 81 */
- int (*tk_GetAnchor) _ANSI_ARGS_((Tcl_Interp * interp, char * str, Tk_Anchor * anchorPtr)); /* 82 */
- char * (*tk_GetAtomName) _ANSI_ARGS_((Tk_Window tkwin, Atom atom)); /* 83 */
- char * (*tk_GetBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, char * eventStr)); /* 84 */
+ int (*tk_GetAnchor) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, Tk_Anchor * anchorPtr)); /* 82 */
+ CONST84_RETURN char * (*tk_GetAtomName) _ANSI_ARGS_((Tk_Window tkwin, Atom atom)); /* 83 */
+ CONST84_RETURN char * (*tk_GetBinding) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventStr)); /* 84 */
Pixmap (*tk_GetBitmap) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str)); /* 85 */
- Pixmap (*tk_GetBitmapFromData) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * source, int width, int height)); /* 86 */
- int (*tk_GetCapStyle) _ANSI_ARGS_((Tcl_Interp * interp, char * str, int * capPtr)); /* 87 */
+ Pixmap (*tk_GetBitmapFromData) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * source, int width, int height)); /* 86 */
+ int (*tk_GetCapStyle) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * capPtr)); /* 87 */
XColor * (*tk_GetColor) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid name)); /* 88 */
XColor * (*tk_GetColorByValue) _ANSI_ARGS_((Tk_Window tkwin, XColor * colorPtr)); /* 89 */
- Colormap (*tk_GetColormap) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * str)); /* 90 */
+ Colormap (*tk_GetColormap) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str)); /* 90 */
Tk_Cursor (*tk_GetCursor) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid str)); /* 91 */
- Tk_Cursor (*tk_GetCursorFromData) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * source, char * mask, int width, int height, int xHot, int yHot, Tk_Uid fg, Tk_Uid bg)); /* 92 */
+ Tk_Cursor (*tk_GetCursorFromData) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * source, CONST char * mask, int width, int height, int xHot, int yHot, Tk_Uid fg, Tk_Uid bg)); /* 92 */
Tk_Font (*tk_GetFont) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str)); /* 93 */
Tk_Font (*tk_GetFontFromObj) _ANSI_ARGS_((Tk_Window tkwin, Tcl_Obj * objPtr)); /* 94 */
void (*tk_GetFontMetrics) _ANSI_ARGS_((Tk_Font font, Tk_FontMetrics * fmPtr)); /* 95 */
GC (*tk_GetGC) _ANSI_ARGS_((Tk_Window tkwin, unsigned long valueMask, XGCValues * valuePtr)); /* 96 */
- Tk_Image (*tk_GetImage) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * name, Tk_ImageChangedProc * changeProc, ClientData clientData)); /* 97 */
- ClientData (*tk_GetImageMasterData) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tk_ImageType ** typePtrPtr)); /* 98 */
+ Tk_Image (*tk_GetImage) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * name, Tk_ImageChangedProc * changeProc, ClientData clientData)); /* 97 */
+ ClientData (*tk_GetImageMasterData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tk_ImageType ** typePtrPtr)); /* 98 */
Tk_ItemType * (*tk_GetItemTypes) _ANSI_ARGS_((void)); /* 99 */
- int (*tk_GetJoinStyle) _ANSI_ARGS_((Tcl_Interp * interp, char * str, int * joinPtr)); /* 100 */
- int (*tk_GetJustify) _ANSI_ARGS_((Tcl_Interp * interp, char * str, Tk_Justify * justifyPtr)); /* 101 */
+ int (*tk_GetJoinStyle) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * joinPtr)); /* 100 */
+ int (*tk_GetJustify) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, Tk_Justify * justifyPtr)); /* 101 */
int (*tk_GetNumMainWindows) _ANSI_ARGS_((void)); /* 102 */
- Tk_Uid (*tk_GetOption) _ANSI_ARGS_((Tk_Window tkwin, char * name, char * className)); /* 103 */
+ Tk_Uid (*tk_GetOption) _ANSI_ARGS_((Tk_Window tkwin, CONST char * name, CONST char * className)); /* 103 */
int (*tk_GetPixels) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, int * intPtr)); /* 104 */
Pixmap (*tk_GetPixmap) _ANSI_ARGS_((Display * display, Drawable d, int width, int height, int depth)); /* 105 */
- int (*tk_GetRelief) _ANSI_ARGS_((Tcl_Interp * interp, char * name, int * reliefPtr)); /* 106 */
+ int (*tk_GetRelief) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, int * reliefPtr)); /* 106 */
void (*tk_GetRootCoords) _ANSI_ARGS_((Tk_Window tkwin, int * xPtr, int * yPtr)); /* 107 */
- int (*tk_GetScrollInfo) _ANSI_ARGS_((Tcl_Interp * interp, int argc, char ** argv, double * dblPtr, int * intPtr)); /* 108 */
+ int (*tk_GetScrollInfo) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 char ** argv, double * dblPtr, int * intPtr)); /* 108 */
int (*tk_GetScreenMM) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, double * doublePtr)); /* 109 */
int (*tk_GetSelection) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc * proc, ClientData clientData)); /* 110 */
Tk_Uid (*tk_GetUid) _ANSI_ARGS_((CONST char * str)); /* 111 */
- Visual * (*tk_GetVisual) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * str, int * depthPtr, Colormap * colormapPtr)); /* 112 */
+ Visual * (*tk_GetVisual) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * str, int * depthPtr, Colormap * colormapPtr)); /* 112 */
void (*tk_GetVRootGeometry) _ANSI_ARGS_((Tk_Window tkwin, int * xPtr, int * yPtr, int * widthPtr, int * heightPtr)); /* 113 */
int (*tk_Grab) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, int grabGlobal)); /* 114 */
void (*tk_HandleEvent) _ANSI_ARGS_((XEvent * eventPtr)); /* 115 */
Tk_Window (*tk_IdToWindow) _ANSI_ARGS_((Display * display, Window window)); /* 116 */
void (*tk_ImageChanged) _ANSI_ARGS_((Tk_ImageMaster master, int x, int y, int width, int height, int imageWidth, int imageHeight)); /* 117 */
int (*tk_Init) _ANSI_ARGS_((Tcl_Interp * interp)); /* 118 */
- Atom (*tk_InternAtom) _ANSI_ARGS_((Tk_Window tkwin, char * name)); /* 119 */
+ Atom (*tk_InternAtom) _ANSI_ARGS_((Tk_Window tkwin, CONST char * name)); /* 119 */
int (*tk_IntersectTextLayout) _ANSI_ARGS_((Tk_TextLayout layout, int x, int y, int width, int height)); /* 120 */
void (*tk_MaintainGeometry) _ANSI_ARGS_((Tk_Window slave, Tk_Window master, int x, int y, int width, int height)); /* 121 */
Tk_Window (*tk_MainWindow) _ANSI_ARGS_((Tcl_Interp * interp)); /* 122 */
@@ -1053,17 +1058,17 @@ typedef struct TkStubs {
void (*tk_MoveResizeWindow) _ANSI_ARGS_((Tk_Window tkwin, int x, int y, int width, int height)); /* 127 */
void (*tk_MoveWindow) _ANSI_ARGS_((Tk_Window tkwin, int x, int y)); /* 128 */
void (*tk_MoveToplevelWindow) _ANSI_ARGS_((Tk_Window tkwin, int x, int y)); /* 129 */
- char * (*tk_NameOf3DBorder) _ANSI_ARGS_((Tk_3DBorder border)); /* 130 */
- char * (*tk_NameOfAnchor) _ANSI_ARGS_((Tk_Anchor anchor)); /* 131 */
- char * (*tk_NameOfBitmap) _ANSI_ARGS_((Display * display, Pixmap bitmap)); /* 132 */
- char * (*tk_NameOfCapStyle) _ANSI_ARGS_((int cap)); /* 133 */
- char * (*tk_NameOfColor) _ANSI_ARGS_((XColor * colorPtr)); /* 134 */
- char * (*tk_NameOfCursor) _ANSI_ARGS_((Display * display, Tk_Cursor cursor)); /* 135 */
- char * (*tk_NameOfFont) _ANSI_ARGS_((Tk_Font font)); /* 136 */
- char * (*tk_NameOfImage) _ANSI_ARGS_((Tk_ImageMaster imageMaster)); /* 137 */
- char * (*tk_NameOfJoinStyle) _ANSI_ARGS_((int join)); /* 138 */
- char * (*tk_NameOfJustify) _ANSI_ARGS_((Tk_Justify justify)); /* 139 */
- char * (*tk_NameOfRelief) _ANSI_ARGS_((int relief)); /* 140 */
+ CONST84_RETURN char * (*tk_NameOf3DBorder) _ANSI_ARGS_((Tk_3DBorder border)); /* 130 */
+ CONST84_RETURN char * (*tk_NameOfAnchor) _ANSI_ARGS_((Tk_Anchor anchor)); /* 131 */
+ CONST84_RETURN char * (*tk_NameOfBitmap) _ANSI_ARGS_((Display * display, Pixmap bitmap)); /* 132 */
+ CONST84_RETURN char * (*tk_NameOfCapStyle) _ANSI_ARGS_((int cap)); /* 133 */
+ CONST84_RETURN char * (*tk_NameOfColor) _ANSI_ARGS_((XColor * colorPtr)); /* 134 */
+ CONST84_RETURN char * (*tk_NameOfCursor) _ANSI_ARGS_((Display * display, Tk_Cursor cursor)); /* 135 */
+ CONST84_RETURN char * (*tk_NameOfFont) _ANSI_ARGS_((Tk_Font font)); /* 136 */
+ CONST84_RETURN char * (*tk_NameOfImage) _ANSI_ARGS_((Tk_ImageMaster imageMaster)); /* 137 */
+ CONST84_RETURN char * (*tk_NameOfJoinStyle) _ANSI_ARGS_((int join)); /* 138 */
+ CONST84_RETURN char * (*tk_NameOfJustify) _ANSI_ARGS_((Tk_Justify justify)); /* 139 */
+ CONST84_RETURN char * (*tk_NameOfRelief) _ANSI_ARGS_((int relief)); /* 140 */
Tk_Window (*tk_NameToWindow) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * pathName, Tk_Window tkwin)); /* 141 */
void (*tk_OwnSelection) _ANSI_ARGS_((Tk_Window tkwin, Atom selection, Tk_LostSelProc * proc, ClientData clientData)); /* 142 */
int (*tk_ParseArgv) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, int * argcPtr, CONST84 char ** argv, Tk_ArgvInfo * argTable, int flags)); /* 143 */
@@ -1083,9 +1088,9 @@ typedef struct TkStubs {
int (*tk_RestackWindow) _ANSI_ARGS_((Tk_Window tkwin, int aboveBelow, Tk_Window other)); /* 157 */
Tk_RestrictProc * (*tk_RestrictEvents) _ANSI_ARGS_((Tk_RestrictProc * proc, ClientData arg, ClientData * prevArgPtr)); /* 158 */
int (*tk_SafeInit) _ANSI_ARGS_((Tcl_Interp * interp)); /* 159 */
- char * (*tk_SetAppName) _ANSI_ARGS_((Tk_Window tkwin, char * name)); /* 160 */
+ CONST char * (*tk_SetAppName) _ANSI_ARGS_((Tk_Window tkwin, CONST char * name)); /* 160 */
void (*tk_SetBackgroundFromBorder) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border)); /* 161 */
- void (*tk_SetClass) _ANSI_ARGS_((Tk_Window tkwin, char * className)); /* 162 */
+ void (*tk_SetClass) _ANSI_ARGS_((Tk_Window tkwin, CONST char * className)); /* 162 */
void (*tk_SetGrid) _ANSI_ARGS_((Tk_Window tkwin, int reqWidth, int reqHeight, int gridWidth, int gridHeight)); /* 163 */
void (*tk_SetInternalBorder) _ANSI_ARGS_((Tk_Window tkwin, int width)); /* 164 */
void (*tk_SetWindowBackground) _ANSI_ARGS_((Tk_Window tkwin, unsigned long pixel)); /* 165 */
@@ -1164,7 +1169,7 @@ typedef struct TkStubs {
int (*tk_PostscriptPhoto) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PhotoImageBlock * blockPtr, Tk_PostscriptInfo psInfo, int width, int height)); /* 238 */
void (*tk_CreateClientMessageHandler) _ANSI_ARGS_((Tk_ClientMessageProc * proc)); /* 239 */
void (*tk_DeleteClientMessageHandler) _ANSI_ARGS_((Tk_ClientMessageProc * proc)); /* 240 */
- Tk_Window (*tk_CreateAnonymousWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window parent, char * screenName)); /* 241 */
+ Tk_Window (*tk_CreateAnonymousWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window parent, CONST char * screenName)); /* 241 */
void (*tk_SetClassProcs) _ANSI_ARGS_((Tk_Window tkwin, Tk_ClassProcs * procs, ClientData instanceData)); /* 242 */
void (*tk_SetInternalBorderEx) _ANSI_ARGS_((Tk_Window tkwin, int left, int right, int top, int bottom)); /* 243 */
void (*tk_SetMinimumRequestSize) _ANSI_ARGS_((Tk_Window tkwin, int minWidth, int minHeight)); /* 244 */
@@ -1172,10 +1177,10 @@ typedef struct TkStubs {
void (*tk_PhotoPutBlock) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int compRule)); /* 246 */
void (*tk_PhotoPutZoomedBlock) _ANSI_ARGS_((Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule)); /* 247 */
int (*tk_CollapseMotionEvents) _ANSI_ARGS_((Display * display, int collapse)); /* 248 */
- Tk_StyleEngine (*tk_RegisterStyleEngine) _ANSI_ARGS_((char * name, Tk_StyleEngine parent)); /* 249 */
- Tk_StyleEngine (*tk_GetStyleEngine) _ANSI_ARGS_((char * name)); /* 250 */
+ Tk_StyleEngine (*tk_RegisterStyleEngine) _ANSI_ARGS_((CONST char * name, Tk_StyleEngine parent)); /* 249 */
+ Tk_StyleEngine (*tk_GetStyleEngine) _ANSI_ARGS_((CONST char * name)); /* 250 */
int (*tk_RegisterStyledElement) _ANSI_ARGS_((Tk_StyleEngine engine, Tk_ElementSpec * templatePtr)); /* 251 */
- int (*tk_GetElementId) _ANSI_ARGS_((char * name)); /* 252 */
+ int (*tk_GetElementId) _ANSI_ARGS_((CONST char * name)); /* 252 */
Tk_Style (*tk_CreateStyle) _ANSI_ARGS_((CONST char * name, Tk_StyleEngine engine, ClientData clientData)); /* 253 */
Tk_Style (*tk_GetStyle) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 254 */
void (*tk_FreeStyle) _ANSI_ARGS_((Tk_Style style)); /* 255 */
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index a9bd94e..53e0d60 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.30 2002/07/25 21:19:01 hobbs Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.31 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkInt.h"
@@ -696,8 +696,8 @@ static void EntrySetValue _ANSI_ARGS_((Entry *entryPtr,
static void EntrySelectTo _ANSI_ARGS_((
Entry *entryPtr, int index));
static char * EntryTextVarProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static void EntryUpdateScrollbar _ANSI_ARGS_((Entry *entryPtr));
static int EntryValidate _ANSI_ARGS_((Entry *entryPtr,
char *cmd));
@@ -3288,7 +3288,7 @@ static char *
EntryTextVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about button. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Not used. */
+ CONST char *name1; /* Not used. */
CONST char *name2; /* Not used. */
int flags; /* Information about what happened. */
{
diff --git a/generic/tkFont.c b/generic/tkFont.c
index a40f981..31d94e5 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.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: tkFont.c,v 1.18 2002/07/17 14:37:55 dgp Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.19 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkPort.h"
@@ -1279,7 +1279,7 @@ SetFontFromAny(interp, objPtr)
*---------------------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfFont(tkfont)
Tk_Font tkfont; /* Font whose name is desired. */
{
@@ -1550,7 +1550,7 @@ Tk_PostscriptFontName(tkfont, dsPtr)
* corresponds to tkfont will be appended. */
{
TkFont *fontPtr;
- char *family, *weightString, *slantString;
+ Tk_Uid family, weightString, slantString;
char *src, *dest;
int upper, len;
@@ -2993,7 +2993,7 @@ GetAttributeInfoObj(interp, faPtr, objPtr)
* returned for all options. */
{
int i, index, start, end;
- char *str;
+ CONST char *str;
Tcl_Obj *optionPtr, *valuePtr, *resultPtr;
resultPtr = Tcl_GetObjResult(interp);
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index ec969d9..d5ed063 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.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: tkFrame.c,v 1.12 2002/02/19 16:30:26 dkf Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.13 2002/08/05 04:30:38 dgp Exp $
*/
#include "default.h"
@@ -484,7 +484,7 @@ CreateFrame(clientData, interp, objc, objv, type, appName)
Frame *framePtr;
Tk_OptionTable optionTable;
Tk_Window new;
- char *className, *screenName, *visualName, *colormapName, *arg, *useOption;
+ CONST char *className, *screenName, *visualName, *colormapName, *arg, *useOption;
int i, c, depth;
size_t length;
unsigned int mask;
diff --git a/generic/tkGet.c b/generic/tkGet.c
index 95d7a54..4d62c27 100644
--- a/generic/tkGet.c
+++ b/generic/tkGet.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: tkGet.c,v 1.9 2002/04/12 07:44:45 hobbs Exp $
+ * RCS: @(#) $Id: tkGet.c,v 1.10 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkInt.h"
@@ -107,7 +107,7 @@ Tk_GetAnchorFromObj(interp, objPtr, anchorPtr)
int
Tk_GetAnchor(interp, string, anchorPtr)
Tcl_Interp *interp; /* Use this for error reporting. */
- char *string; /* String describing a direction. */
+ CONST char *string; /* String describing a direction. */
Tk_Anchor *anchorPtr; /* Where to store Tk_Anchor corresponding
* to string. */
{
@@ -181,7 +181,7 @@ Tk_GetAnchor(interp, string, anchorPtr)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfAnchor(anchor)
Tk_Anchor anchor; /* Anchor for which identifying string
* is desired. */
@@ -223,7 +223,7 @@ Tk_NameOfAnchor(anchor)
int
Tk_GetJoinStyle(interp, string, joinPtr)
Tcl_Interp *interp; /* Use this for error reporting. */
- char *string; /* String describing a justification style. */
+ CONST char *string; /* String describing a justification style. */
int *joinPtr; /* Where to store join style corresponding
* to string. */
{
@@ -269,7 +269,7 @@ Tk_GetJoinStyle(interp, string, joinPtr)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfJoinStyle(join)
int join; /* Join style for which identifying string
* is desired. */
@@ -305,7 +305,7 @@ Tk_NameOfJoinStyle(join)
int
Tk_GetCapStyle(interp, string, capPtr)
Tcl_Interp *interp; /* Use this for error reporting. */
- char *string; /* String describing a justification style. */
+ CONST char *string; /* String describing a justification style. */
int *capPtr; /* Where to store cap style corresponding
* to string. */
{
@@ -351,7 +351,7 @@ Tk_GetCapStyle(interp, string, capPtr)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfCapStyle(cap)
int cap; /* Cap style for which identifying string
* is desired. */
@@ -424,7 +424,7 @@ Tk_GetJustifyFromObj(interp, objPtr, justifyPtr)
int
Tk_GetJustify(interp, string, justifyPtr)
Tcl_Interp *interp; /* Use this for error reporting. */
- char *string; /* String describing a justification style. */
+ CONST char *string; /* String describing a justification style. */
Tk_Justify *justifyPtr; /* Where to store Tk_Justify corresponding
* to string. */
{
@@ -470,7 +470,7 @@ Tk_GetJustify(interp, string, justifyPtr)
*--------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfJustify(justify)
Tk_Justify justify; /* Justification style for which
* identifying string is desired. */
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index 9934ec6..27f9dde 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.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: tkGrid.c,v 1.23 2002/06/22 09:15:51 hobbs Exp $
+ * RCS: @(#) $Id: tkGrid.c,v 1.24 2002/08/05 04:30:38 dgp Exp $
*/
#include "tkInt.h"
@@ -900,7 +900,7 @@ GridRowColumnConfigureCommand(tkwin, interp, objc, objv)
if (objc == 4) {
int minsize = 0, pad = 0, weight = 0;
- char *uniform = NULL;
+ Tk_Uid uniform = NULL;
Tcl_Obj *res = Tcl_NewListObj(0, NULL);
if (ok == TCL_OK) {
@@ -968,7 +968,7 @@ GridRowColumnConfigureCommand(tkwin, interp, objc, objv)
}
else if (index == ROWCOL_UNIFORM) {
if (objc == 5) {
- char *value;
+ Tk_Uid value;
value = (ok == TCL_OK) ? slotPtr[slot].uniform : "";
if (value == NULL) {
value = "";
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 2a2aef8..548be74 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.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: tkImage.c,v 1.16 2002/06/18 01:00:59 mdejong Exp $
+ * RCS: @(#) $Id: tkImage.c,v 1.17 2002/08/05 04:30:39 dgp Exp $
*/
#include "tkInt.h"
@@ -506,7 +506,7 @@ Tk_ImageChanged(imageMaster, x, y, width, height, imageWidth,
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tk_NameOfImage(imageMaster)
Tk_ImageMaster imageMaster; /* Token for image. */
{
@@ -544,7 +544,7 @@ Tk_GetImage(interp, tkwin, name, changeProc, clientData)
* can't be found. */
Tk_Window tkwin; /* Token for window in which image will
* be used. */
- char *name; /* Name of desired image. */
+ CONST char *name; /* Name of desired image. */
Tk_ImageChangedProc *changeProc;
/* Procedure to invoke when redisplay is
* needed because image's pixels or size
@@ -853,7 +853,7 @@ void
Tk_DeleteImage(interp, name)
Tcl_Interp *interp; /* Interpreter in which the image was
* created. */
- char *name; /* Name of image. */
+ CONST char *name; /* Name of image. */
{
Tcl_HashEntry *hPtr;
TkWindow *winPtr;
@@ -1004,7 +1004,7 @@ ClientData
Tk_GetImageMasterData(interp, name, typePtrPtr)
Tcl_Interp *interp; /* Interpreter in which the image was
* created. */
- char *name; /* Name of image. */
+ CONST char *name; /* Name of image. */
Tk_ImageType **typePtrPtr; /* Points to location to fill in with
* pointer to type information for image. */
{
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index 726f5da..d89663e 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.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: tkImgBmap.c,v 1.14 2002/01/25 21:09:37 dgp Exp $
+ * RCS: @(#) $Id: tkImgBmap.c,v 1.15 2002/08/05 04:30:39 dgp Exp $
*/
#include "tkInt.h"
@@ -254,7 +254,7 @@ ImgBmapConfigureMaster(masterPtr, objc, objv, flags)
BitmapInstance *instancePtr;
int maskWidth, maskHeight, dummy1, dummy2;
- char **argv = (char **) ckalloc((objc+1) * sizeof(char *));
+ CONST char **argv = (CONST char **) ckalloc((objc+1) * sizeof(char *));
for (dummy1 = 0; dummy1 < objc; dummy1++) {
argv[dummy1]=Tcl_GetString(objv[dummy1]);
}
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index acd8390..1ffed1b 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -16,7 +16,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.33 2002/07/11 13:01:30 dkf Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.34 2002/08/05 04:30:39 dgp Exp $
*/
#include "tkInt.h"
@@ -400,7 +400,7 @@ static char * ImgGetPhoto _ANSI_ARGS_((PhotoMaster *masterPtr,
Tk_PhotoImageBlock *blockPtr,
struct SubcommandOptions *optPtr));
static int IsValidPalette _ANSI_ARGS_((PhotoInstance *instancePtr,
- char *palette));
+ CONST char *palette));
static int CountBits _ANSI_ARGS_((pixel mask));
static void GetColorTable _ANSI_ARGS_((PhotoInstance *instancePtr));
static void FreeColorTable _ANSI_ARGS_((ColorTable *colorPtr,
@@ -1824,7 +1824,7 @@ ImgPhotoConfigureMaster(interp, masterPtr, objc, objv, flags)
* such as TK_CONFIG_ARGV_ONLY. */
{
PhotoInstance *instancePtr;
- char *oldFileString, *oldPaletteString;
+ CONST char *oldFileString, *oldPaletteString;
Tcl_Obj *oldData, *data = NULL, *oldFormat, *format = NULL;
int length, i, j;
double oldGamma;
@@ -1832,11 +1832,11 @@ ImgPhotoConfigureMaster(interp, masterPtr, objc, objv, flags)
Tcl_Channel chan;
Tk_PhotoImageFormat *imageFormat;
int imageWidth, imageHeight;
- char **args;
+ CONST char **args;
int oldformat;
Tcl_Obj *tempdata, *tempformat;
- args = (char **) ckalloc((objc + 1) * sizeof(char *));
+ args = (CONST char **) ckalloc((objc + 1) * sizeof(char *));
for (i = 0, j = 0; i < objc; i++,j++) {
args[j] = Tcl_GetStringFromObj(objv[i], &length);
if ((length > 1) && (args[j][0] == '-')) {
@@ -2940,7 +2940,7 @@ static int
IsValidPalette(instancePtr, palette)
PhotoInstance *instancePtr; /* Instance to which the palette
* specification is to be applied. */
- char *palette; /* Palette specification string. */
+ CONST char *palette; /* Palette specification string. */
{
int nRed, nGreen, nBlue, mono, numColors;
char *endp;
@@ -3926,7 +3926,7 @@ Tk_PhotoHandle
Tk_FindPhoto(interp, imageName)
Tcl_Interp *interp; /* Interpreter (application) in which image
* exists. */
- char *imageName; /* Name of the desired photo image. */
+ CONST char *imageName; /* Name of the desired photo image. */
{
ClientData clientData;
Tk_ImageType *typePtr;
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 992b5b1..5b3ca57 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -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: tkInt.decls,v 1.28 2002/06/18 23:51:46 dkf Exp $
+# RCS: @(#) $Id: tkInt.decls,v 1.29 2002/08/05 04:30:39 dgp Exp $
library tk
@@ -73,14 +73,14 @@ declare 10 generic {
declare 11 generic {
unsigned long TkCreateBindingProcedure (Tcl_Interp *interp, \
Tk_BindingTable bindingTable, \
- ClientData object, char *eventString, \
+ ClientData object, CONST char *eventString, \
TkBindEvalProc *evalProc, TkBindFreeProc *freeProc, \
ClientData clientData)
}
declare 12 generic {
TkCursor * TkCreateCursorFromData (Tk_Window tkwin, \
- char *source, char *mask, int width, int height, \
+ CONST char *source, CONST char *mask, int width, int height, \
int xHot, int yHot, XColor fg, XColor bg)
}
@@ -92,7 +92,7 @@ declare 13 generic {
declare 14 generic {
Tk_Window TkCreateMainWindow (Tcl_Interp *interp, \
- char *screenName, char *baseName)
+ CONST char *screenName, char *baseName)
}
declare 15 generic {
@@ -178,7 +178,7 @@ declare 32 generic {
}
declare 33 generic {
- CONST char * TkGetDefaultScreenName (Tcl_Interp *interp, \
+ CONST84_RETURN char * TkGetDefaultScreenName (Tcl_Interp *interp, \
CONST char *screenName)
}
@@ -358,7 +358,7 @@ declare 74 generic {
}
declare 75 generic {
- int TkpUseWindow (Tcl_Interp *interp, Tk_Window tkwin, char *string)
+ int TkpUseWindow (Tcl_Interp *interp, Tk_Window tkwin, CONST char *string)
}
declare 76 generic {
@@ -520,7 +520,7 @@ declare 110 generic {
declare 111 generic {
Tcl_Obj * TkpGetSystemDefault (Tk_Window tkwin, \
- char *dbName, char *className)
+ CONST char *dbName, CONST char *className)
}
declare 112 generic {
@@ -866,7 +866,7 @@ declare 31 win {
declare 32 win {
Tcl_Obj * TkWinGetMenuSystemDefault (Tk_Window tkwin, \
- char *dbName, char *className)
+ CONST char *dbName, CONST char *className)
}
declare 33 win {
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 4799737..c497d96 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.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: tkInt.h,v 1.52 2002/07/25 21:35:22 pspjuth Exp $
+ * RCS: $Id: tkInt.h,v 1.53 2002/08/05 04:30:39 dgp Exp $
*/
#ifndef _TKINT
@@ -643,7 +643,7 @@ typedef struct TkMainInfo {
*/
typedef struct {
- char *source; /* Bits for bitmap. */
+ CONST char *source; /* Bits for bitmap. */
int width, height; /* Dimensions of bitmap. */
int native; /* 0 means generic (X style) bitmap,
* 1 means native style bitmap. */
@@ -1051,12 +1051,12 @@ EXTERN int Tk_ScaleObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
EXTERN int Tk_ScrollbarCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int Tk_SelectionObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
EXTERN int Tk_SendCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int Tk_SendObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
@@ -1064,7 +1064,7 @@ EXTERN int Tk_SpinboxObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
EXTERN int Tk_TextCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int Tk_TkObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
@@ -1093,10 +1093,10 @@ EXTERN void TkRegisterObjTypes _ANSI_ARGS_((void));
EXTERN int TkCreateMenuCmd _ANSI_ARGS_((Tcl_Interp *interp));
EXTERN int TkDeadAppCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkpTestembedCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkCanvasGetCoordObj _ANSI_ARGS_((Tcl_Interp *interp,
Tk_Canvas canvas, Tcl_Obj *obj,
double *doublePtr));
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index 7a3a325..c72ca15 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.19 2002/06/18 23:51:46 dkf Exp $
+ * RCS: @(#) $Id: tkIntDecls.h,v 1.20 2002/08/05 04:30:39 dgp Exp $
*/
#ifndef _TKINTDECLS
@@ -71,22 +71,22 @@ EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp * interp,
EXTERN unsigned long TkCreateBindingProcedure _ANSI_ARGS_((
Tcl_Interp * interp,
Tk_BindingTable bindingTable,
- ClientData object, char * eventString,
+ ClientData object, CONST char * eventString,
TkBindEvalProc * evalProc,
TkBindFreeProc * freeProc,
ClientData clientData));
/* 12 */
EXTERN TkCursor * TkCreateCursorFromData _ANSI_ARGS_((Tk_Window tkwin,
- char * source, char * mask, int width,
- int height, int xHot, int yHot, XColor fg,
- XColor bg));
+ CONST char * source, CONST char * mask,
+ int width, int height, int xHot, int yHot,
+ XColor fg, XColor bg));
/* 13 */
EXTERN int TkCreateFrame _ANSI_ARGS_((ClientData clientData,
Tcl_Interp * interp, int argc, char ** argv,
int toplevel, char * appName));
/* 14 */
EXTERN Tk_Window TkCreateMainWindow _ANSI_ARGS_((Tcl_Interp * interp,
- char * screenName, char * baseName));
+ CONST char * screenName, char * baseName));
/* 15 */
EXTERN Time TkCurrentTime _ANSI_ARGS_((TkDisplay * dispPtr));
/* 16 */
@@ -141,7 +141,7 @@ EXTERN void TkGetButtPoints _ANSI_ARGS_((double p1[],
EXTERN TkCursor * TkGetCursorByName _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, Tk_Uid string));
/* 33 */
-EXTERN CONST char * TkGetDefaultScreenName _ANSI_ARGS_((
+EXTERN CONST84_RETURN char * TkGetDefaultScreenName _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * screenName));
/* 34 */
EXTERN TkDisplay * TkGetDisplay _ANSI_ARGS_((Display * display));
@@ -263,7 +263,7 @@ EXTERN void TkpSetMainMenubar _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Window tkwin, char * menuName));
/* 75 */
EXTERN int TkpUseWindow _ANSI_ARGS_((Tcl_Interp * interp,
- Tk_Window tkwin, char * string));
+ Tk_Window tkwin, CONST char * string));
/* 76 */
EXTERN int TkpWindowWasRecentlyDeleted _ANSI_ARGS_((Window win,
TkDisplay * dispPtr));
@@ -365,7 +365,7 @@ EXTERN void TkpGetSubFonts _ANSI_ARGS_((Tcl_Interp * interp,
Tk_Font tkfont));
/* 111 */
EXTERN Tcl_Obj * TkpGetSystemDefault _ANSI_ARGS_((Tk_Window tkwin,
- char * dbName, char * className));
+ CONST char * dbName, CONST char * className));
/* 112 */
EXTERN void TkpMenuThreadInit _ANSI_ARGS_((void));
#ifdef __WIN32__
@@ -519,10 +519,10 @@ typedef struct TkIntStubs {
int (*tkClipInit) _ANSI_ARGS_((Tcl_Interp * interp, TkDisplay * dispPtr)); /* 8 */
void (*tkComputeAnchor) _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, int padX, int padY, int innerWidth, int innerHeight, int * xPtr, int * yPtr)); /* 9 */
int (*tkCopyAndGlobalEval) _ANSI_ARGS_((Tcl_Interp * interp, char * script)); /* 10 */
- unsigned long (*tkCreateBindingProcedure) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, char * eventString, TkBindEvalProc * evalProc, TkBindFreeProc * freeProc, ClientData clientData)); /* 11 */
- TkCursor * (*tkCreateCursorFromData) _ANSI_ARGS_((Tk_Window tkwin, char * source, char * mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg)); /* 12 */
+ unsigned long (*tkCreateBindingProcedure) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, CONST char * eventString, TkBindEvalProc * evalProc, TkBindFreeProc * freeProc, ClientData clientData)); /* 11 */
+ TkCursor * (*tkCreateCursorFromData) _ANSI_ARGS_((Tk_Window tkwin, CONST char * source, CONST char * mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg)); /* 12 */
int (*tkCreateFrame) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int argc, char ** argv, int toplevel, char * appName)); /* 13 */
- Tk_Window (*tkCreateMainWindow) _ANSI_ARGS_((Tcl_Interp * interp, char * screenName, char * baseName)); /* 14 */
+ Tk_Window (*tkCreateMainWindow) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * screenName, char * baseName)); /* 14 */
Time (*tkCurrentTime) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 15 */
void (*tkDeleteAllImages) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 16 */
void (*tkDoConfigureNotify) _ANSI_ARGS_((TkWindow * winPtr)); /* 17 */
@@ -541,7 +541,7 @@ typedef struct TkIntStubs {
char * (*tkGetBitmapData) _ANSI_ARGS_((Tcl_Interp * interp, char * string, char * fileName, int * widthPtr, int * heightPtr, int * hotXPtr, int * hotYPtr)); /* 30 */
void (*tkGetButtPoints) _ANSI_ARGS_((double p1[], double p2[], double width, int project, double m1[], double m2[])); /* 31 */
TkCursor * (*tkGetCursorByName) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tk_Uid string)); /* 32 */
- CONST char * (*tkGetDefaultScreenName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * screenName)); /* 33 */
+ CONST84_RETURN char * (*tkGetDefaultScreenName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * screenName)); /* 33 */
TkDisplay * (*tkGetDisplay) _ANSI_ARGS_((Display * display)); /* 34 */
int (*tkGetDisplayOf) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], Tk_Window * tkwinPtr)); /* 35 */
TkWindow * (*tkGetFocusWin) _ANSI_ARGS_((TkWindow * winPtr)); /* 36 */
@@ -583,7 +583,7 @@ typedef struct TkIntStubs {
int (*tkPositionInTree) _ANSI_ARGS_((TkWindow * winPtr, TkWindow * treePtr)); /* 72 */
void (*tkpRedirectKeyEvent) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr)); /* 73 */
void (*tkpSetMainMenubar) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * menuName)); /* 74 */
- int (*tkpUseWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, char * string)); /* 75 */
+ int (*tkpUseWindow) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, CONST char * string)); /* 75 */
int (*tkpWindowWasRecentlyDeleted) _ANSI_ARGS_((Window win, TkDisplay * dispPtr)); /* 76 */
void (*tkQueueEventForAllChildren) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr)); /* 77 */
int (*tkReadBitmapFile) _ANSI_ARGS_((Display* display, Drawable d, CONST char* filename, unsigned int* width_return, unsigned int* height_return, Pixmap* bitmap_return, int* x_hot_return, int* y_hot_return)); /* 78 */
@@ -619,7 +619,7 @@ typedef struct TkIntStubs {
int (*tkGetWindowFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr, Tk_Window * windowPtr)); /* 108 */
char * (*tkpGetString) _ANSI_ARGS_((TkWindow * winPtr, XEvent * eventPtr, Tcl_DString * dsPtr)); /* 109 */
void (*tkpGetSubFonts) _ANSI_ARGS_((Tcl_Interp * interp, Tk_Font tkfont)); /* 110 */
- Tcl_Obj * (*tkpGetSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, char * dbName, char * className)); /* 111 */
+ Tcl_Obj * (*tkpGetSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, CONST char * dbName, CONST char * className)); /* 111 */
void (*tkpMenuThreadInit) _ANSI_ARGS_((void)); /* 112 */
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
void *reserved113;
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index 07e4e9b..765372e 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.12 2002/05/27 19:49:32 mdejong Exp $
+ * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.13 2002/08/05 04:30:39 dgp Exp $
*/
#ifndef _TKINTPLATDECLS
@@ -150,8 +150,8 @@ EXTERN void TkWinSetForegroundWindow _ANSI_ARGS_((
EXTERN void TkWinDialogDebug _ANSI_ARGS_((int debug));
/* 32 */
EXTERN Tcl_Obj * TkWinGetMenuSystemDefault _ANSI_ARGS_((
- Tk_Window tkwin, char * dbName,
- char * className));
+ Tk_Window tkwin, CONST char * dbName,
+ CONST char * className));
/* 33 */
EXTERN int TkWinGetPlatformId _ANSI_ARGS_((void));
#endif /* __WIN32__ */
@@ -344,7 +344,7 @@ typedef struct TkIntPlatStubs {
void (*tkWinXInit) _ANSI_ARGS_((HINSTANCE hInstance)); /* 29 */
void (*tkWinSetForegroundWindow) _ANSI_ARGS_((TkWindow * winPtr)); /* 30 */
void (*tkWinDialogDebug) _ANSI_ARGS_((int debug)); /* 31 */
- Tcl_Obj * (*tkWinGetMenuSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, char * dbName, char * className)); /* 32 */
+ Tcl_Obj * (*tkWinGetMenuSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, CONST char * dbName, CONST char * className)); /* 32 */
int (*tkWinGetPlatformId) _ANSI_ARGS_((void)); /* 33 */
#endif /* __WIN32__ */
#ifdef MAC_TCL
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 03d130d..d11396f 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.27 2002/06/21 02:38:54 hobbs Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.28 2002/08/05 04:30:39 dgp Exp $
*/
#include "tkPort.h"
@@ -442,8 +442,8 @@ static void ListboxWorldChanged _ANSI_ARGS_((
static int NearestListboxElement _ANSI_ARGS_((Listbox *listPtr,
int y));
static char * ListboxListVarProc _ANSI_ARGS_ ((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static void MigrateHashEntries _ANSI_ARGS_ ((Tcl_HashTable *table,
int first, int last, int offset));
/*
@@ -3303,7 +3303,7 @@ static char *
ListboxListVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about button. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Not used. */
+ CONST char *name1; /* Not used. */
CONST char *name2; /* Not used. */
int flags; /* Information about what happened. */
{
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 846d7a0..7ed2d94 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.18 2002/04/12 07:28:06 hobbs Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.19 2002/08/05 04:30:40 dgp Exp $
*/
/*
@@ -360,8 +360,8 @@ static void MenuCmdDeletedProc _ANSI_ARGS_((
static TkMenuEntry * MenuNewEntry _ANSI_ARGS_((TkMenu *menuPtr, int index,
int type));
static char * MenuVarProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static int MenuWidgetObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
@@ -2468,7 +2468,7 @@ static char *
MenuVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about menu entry. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* First part of variable's name. */
+ CONST char *name1; /* First part of variable's name. */
CONST char *name2; /* Second part of variable's name. */
int flags; /* Describes what just happened. */
{
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index f6a46bf..0d22be5 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.11 2002/03/20 22:55:16 dgp Exp $
+ * RCS: @(#) $Id: tkMenubutton.c,v 1.12 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkMenubutton.h"
@@ -176,7 +176,7 @@ static void MenuButtonImageProc _ANSI_ARGS_((ClientData clientData,
int imgHeight));
static char * MenuButtonTextVarProc _ANSI_ARGS_((
ClientData clientData, Tcl_Interp *interp,
- char *name1, CONST char *name2, int flags));
+ CONST char *name1, CONST char *name2, int flags));
static int MenuButtonWidgetObjCmd _ANSI_ARGS_((
ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[]));
@@ -867,7 +867,7 @@ static char *
MenuButtonTextVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about button. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
+ CONST char *name1; /* Name of variable. */
CONST char *name2; /* Second part of variable name. */
int flags; /* Information about what happened. */
{
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index 7e7a00e..b32ecfc 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.13 2002/03/20 22:55:16 dgp Exp $
+ * RCS: @(#) $Id: tkMessage.c,v 1.14 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkPort.h"
@@ -176,8 +176,8 @@ static void MessageCmdDeletedProc _ANSI_ARGS_((
static void MessageEventProc _ANSI_ARGS_((ClientData clientData,
XEvent *eventPtr));
static char * MessageTextVarProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static int MessageWidgetObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
@@ -847,7 +847,7 @@ static char *
MessageTextVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about message. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
+ CONST char *name1; /* Name of variable. */
CONST char *name2; /* Second part of variable name. */
int flags; /* Information about what happened. */
{
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index 86bb5ff..b92ae05 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.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: tkOldConfig.c,v 1.11 2002/03/20 02:59:30 hobbs Exp $
+ * RCS: @(#) $Id: tkOldConfig.c,v 1.12 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkPort.h"
@@ -36,12 +36,12 @@ static int DoConfig _ANSI_ARGS_((Tcl_Interp *interp,
Tk_Window tkwin, Tk_ConfigSpec *specPtr,
Tk_Uid value, int valueIsUid, char *widgRec));
static Tk_ConfigSpec * FindConfigSpec _ANSI_ARGS_((Tcl_Interp *interp,
- Tk_ConfigSpec *specs, char *argvName,
+ Tk_ConfigSpec *specs, CONST char *argvName,
int needFlags, int hateFlags));
static char * FormatConfigInfo _ANSI_ARGS_((Tcl_Interp *interp,
Tk_Window tkwin, Tk_ConfigSpec *specPtr,
char *widgRec));
-static char * FormatConfigValue _ANSI_ARGS_((Tcl_Interp *interp,
+static CONST char * FormatConfigValue _ANSI_ARGS_((Tcl_Interp *interp,
Tk_Window tkwin, Tk_ConfigSpec *specPtr,
char *widgRec, char *buffer,
Tcl_FreeProc **freeProcPtr));
@@ -74,7 +74,7 @@ Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags)
* set up X resources). */
Tk_ConfigSpec *specs; /* Describes legal options. */
int argc; /* Number of elements in argv. */
- char **argv; /* Command-line options. */
+ CONST char **argv; /* Command-line options. */
char *widgRec; /* Record whose fields are to be
* modified. Values must be properly
* initialized. */
@@ -134,7 +134,7 @@ Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags)
*/
for ( ; argc > 0; argc -= 2, argv += 2) {
- char *arg;
+ CONST char *arg;
if (flags & TK_CONFIG_OBJS) {
arg = Tcl_GetStringFromObj((Tcl_Obj *) *argv, NULL);
@@ -255,7 +255,7 @@ FindConfigSpec(interp, specs, argvName, needFlags, hateFlags)
Tcl_Interp *interp; /* Used for reporting errors. */
Tk_ConfigSpec *specs; /* Pointer to table of configuration
* specifications for a widget. */
- char *argvName; /* Name (suitable for use in a "config"
+ CONST char *argvName; /* Name (suitable for use in a "config"
* command) identifying particular option. */
int needFlags; /* Flags that must be present in matching
* entry. */
@@ -351,7 +351,7 @@ DoConfig(interp, tkwin, specPtr, value, valueIsUid, widgRec)
Tk_Window tkwin; /* Window containing widget (needed to
* set up X resources). */
Tk_ConfigSpec *specPtr; /* Specifier to apply. */
- char *value; /* Value to use to fill in widgRec. */
+ Tk_Uid value; /* Value to use to fill in widgRec. */
int valueIsUid; /* Non-zero means value is a Tk_Uid;
* zero means it's an ordinary string. */
char *widgRec; /* Record whose fields are to be
@@ -618,7 +618,7 @@ Tk_ConfigureInfo(interp, tkwin, specs, widgRec, argvName, flags)
Tk_ConfigSpec *specs; /* Describes legal options. */
char *widgRec; /* Record whose fields contain current
* values for options. */
- char *argvName; /* If non-NULL, indicates a single option
+ CONST char *argvName; /* If non-NULL, indicates a single option
* whose info is to be returned. Otherwise
* info is returned for all options. */
int flags; /* Used to specify additional flags
@@ -766,7 +766,7 @@ FormatConfigInfo(interp, tkwin, specPtr, widgRec)
*----------------------------------------------------------------------
*/
-static char *
+static CONST char *
FormatConfigValue(interp, tkwin, specPtr, widgRec, buffer, freeProcPtr)
Tcl_Interp *interp; /* Interpreter for use in real conversions. */
Tk_Window tkwin; /* Window corresponding to widget. */
@@ -780,7 +780,7 @@ FormatConfigValue(interp, tkwin, specPtr, widgRec, buffer, freeProcPtr)
* of procedure to free the result, or NULL
* if result is static. */
{
- char *ptr, *result;
+ CONST char *ptr, *result;
*freeProcPtr = NULL;
ptr = widgRec + specPtr->offset;
@@ -920,7 +920,7 @@ Tk_ConfigureValue(interp, tkwin, specs, widgRec, argvName, flags)
Tk_ConfigSpec *specs; /* Describes legal options. */
char *widgRec; /* Record whose fields contain current
* values for options. */
- char *argvName; /* Gives the command-line name for the
+ CONST char *argvName; /* Gives the command-line name for the
* option whose value is to be returned. */
int flags; /* Used to specify additional flags
* that must be present in config specs
@@ -928,6 +928,9 @@ Tk_ConfigureValue(interp, tkwin, specs, widgRec, argvName, flags)
{
Tk_ConfigSpec *specPtr;
int needFlags, hateFlags;
+ Tcl_FreeProc *freeProc;
+ CONST char *result;
+ char buffer[200];
needFlags = flags & ~(TK_CONFIG_USER_BIT - 1);
if (Tk_Depth(tkwin) <= 1) {
@@ -939,13 +942,14 @@ Tk_ConfigureValue(interp, tkwin, specs, widgRec, argvName, flags)
if (specPtr == NULL) {
return TCL_ERROR;
}
- interp->result = FormatConfigValue(interp, tkwin, specPtr, widgRec,
- interp->result, &interp->freeProc);
- /*
- * Don't let the interp->result be NULL.
- */
- if (interp->result == NULL) {
- interp->result = "";
+ result = FormatConfigValue(interp, tkwin, specPtr, widgRec, buffer, &freeProc);
+ Tcl_SetResult(interp, (char *) result, TCL_VOLATILE);
+ if (freeProc != NULL) {
+ if ((freeProc == TCL_DYNAMIC) || (freeProc == (Tcl_FreeProc *) free)) {
+ ckfree((char *)result);
+ } else {
+ (*freeProc)((char *)result);
+ }
}
return TCL_OK;
}
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 227ae40..7f1b007 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.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: tkOption.c,v 1.14 2002/06/19 19:37:54 mdejong Exp $
+ * RCS: @(#) $Id: tkOption.c,v 1.15 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkPort.h"
@@ -422,8 +422,8 @@ Tk_Uid
Tk_GetOption(tkwin, name, className)
Tk_Window tkwin; /* Token for window that option is
* associated with. */
- char *name; /* Name of option. */
- char *className; /* Class of option. NULL means there
+ CONST char *name; /* Name of option. */
+ CONST char *className; /* Class of option. NULL means there
* is no class for this option: just
* check for name. */
{
@@ -713,7 +713,7 @@ Tk_OptionObjCmd(clientData, interp, objc, objv)
value = Tk_GetOption(window, Tcl_GetString(objv[3]),
Tcl_GetString(objv[4]));
if (value != NULL) {
- Tcl_SetResult(interp, value, TCL_STATIC);
+ Tcl_SetResult(interp, (char *)value, TCL_STATIC);
}
break;
}
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index 10ab308..d7f7282 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.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: tkRectOval.c,v 1.8 2001/07/03 06:03:44 hobbs Exp $
+ * RCS: @(#) $Id: tkRectOval.c,v 1.9 2002/08/05 04:30:40 dgp Exp $
*/
#include <stdio.h>
@@ -423,8 +423,8 @@ ConfigureRectOval(interp, canvas, itemPtr, objc, objv, flags)
tkwin = Tk_CanvasTkwin(canvas);
- if (Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, (char **) objv,
- (char *) rectOvalPtr, flags|TK_CONFIG_OBJS) != TCL_OK) {
+ if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc,
+ (CONST char **) objv, (char *) rectOvalPtr, flags|TK_CONFIG_OBJS)) {
return TCL_ERROR;
}
state = itemPtr->state;
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 3d4135c..9741fde 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -18,7 +18,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.16 2002/03/20 22:55:16 dgp Exp $
+ * RCS: @(#) $Id: tkScale.c,v 1.17 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkPort.h"
@@ -171,8 +171,8 @@ static void ScaleCmdDeletedProc _ANSI_ARGS_((
static void ScaleEventProc _ANSI_ARGS_((ClientData clientData,
XEvent *eventPtr));
static char * ScaleVarProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, char *name1, CONST char *name2,
- int flags));
+ Tcl_Interp *interp, CONST char *name1,
+ CONST char *name2, int flags));
static int ScaleWidgetObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
@@ -1185,7 +1185,7 @@ static char *
ScaleVarProc(clientData, interp, name1, name2, flags)
ClientData clientData; /* Information about button. */
Tcl_Interp *interp; /* Interpreter containing variable. */
- char *name1; /* Name of variable. */
+ CONST char *name1; /* Name of variable. */
CONST char *name2; /* Second part of variable name. */
int flags; /* Information about what happened. */
{
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c
index 71e4e21..dcbb999 100644
--- a/generic/tkScrollbar.c
+++ b/generic/tkScrollbar.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: tkScrollbar.c,v 1.5 2000/11/22 01:49:38 ericm Exp $
+ * RCS: @(#) $Id: tkScrollbar.c,v 1.6 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkPort.h"
@@ -102,12 +102,12 @@ Tk_ConfigSpec tkpScrollbarConfigSpecs[] = {
*/
static int ConfigureScrollbar _ANSI_ARGS_((Tcl_Interp *interp,
- TkScrollbar *scrollPtr, int argc, char **argv,
+ TkScrollbar *scrollPtr, int argc, CONST char **argv,
int flags));
static void ScrollbarCmdDeletedProc _ANSI_ARGS_((
ClientData clientData));
static int ScrollbarWidgetCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *, int argc, char **argv));
+ Tcl_Interp *, int argc, CONST char **argv));
/*
*--------------------------------------------------------------
@@ -133,7 +133,7 @@ Tk_ScrollbarCmd(clientData, interp, argc, argv)
* interpreter. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
Tk_Window tkwin = (Tk_Window) clientData;
register TkScrollbar *scrollPtr;
@@ -231,7 +231,7 @@ ScrollbarWidgetCmd(clientData, interp, argc, argv)
* widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
register TkScrollbar *scrollPtr = (TkScrollbar *) clientData;
int result = TCL_OK;
@@ -538,7 +538,7 @@ ConfigureScrollbar(interp, scrollPtr, argc, argv, flags)
* may not already have values for
* some fields. */
int argc; /* Number of valid entries in argv. */
- char **argv; /* Arguments. */
+ CONST char **argv; /* Arguments. */
int flags; /* Flags to pass to
* Tk_ConfigureWidget. */
{
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index ed718a3..6aad314 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.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: tkSelect.c,v 1.10 2002/01/17 05:13:11 dgp Exp $
+ * RCS: @(#) $Id: tkSelect.c,v 1.11 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -1488,7 +1488,7 @@ TkSelDefaultSelection(infoPtr, target, buffer, maxBytes, typePtr)
if (target == dispPtr->targetsAtom) {
register TkSelHandler *selPtr;
- char *atomString;
+ CONST char *atomString;
int length, atomLength;
if (maxBytes < 50) {
@@ -1517,7 +1517,7 @@ TkSelDefaultSelection(infoPtr, target, buffer, maxBytes, typePtr)
if (target == dispPtr->applicationAtom) {
int length;
- char *name = winPtr->mainPtr->winPtr->nameUid;
+ Tk_Uid name = winPtr->mainPtr->winPtr->nameUid;
length = strlen(name);
if (maxBytes <= length) {
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index 30ad2f8..81fb120 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.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: tkStyle.c,v 1.2 2002/06/26 22:53:13 davygrvy Exp $
+ * RCS: @(#) $Id: tkStyle.c,v 1.3 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -128,7 +128,8 @@ static Tcl_ThreadDataKey dataKey;
*/
/* TODO: sort alpha. */
-static int CreateElement _ANSI_ARGS_((char *name, int create));
+static int CreateElement _ANSI_ARGS_((CONST char *name,
+ int create));
static void DupStyleObjProc _ANSI_ARGS_((Tcl_Obj *srcObjPtr,
Tcl_Obj *dupObjPtr));
static void FreeElement _ANSI_ARGS_((Element *elementPtr));
@@ -316,7 +317,7 @@ TkStylePkgFree(mainPtr)
Tk_StyleEngine
Tk_RegisterStyleEngine(name, parent)
- char *name; /* Name of the engine to create. NULL or empty
+ CONST char *name; /* Name of the engine to create. NULL or empty
* means the default system engine. */
Tk_StyleEngine parent; /* The engine's parent. NULL means the default
* system engine. */
@@ -467,7 +468,7 @@ FreeStyleEngine(enginePtr)
Tk_StyleEngine
Tk_GetStyleEngine(name)
- char *name; /* Name of the engine to retrieve. NULL or
+ CONST char *name; /* Name of the engine to retrieve. NULL or
* empty means the default system engine. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
@@ -615,7 +616,7 @@ FreeStyledElement(elementPtr)
static int
CreateElement(name, create)
- char *name; /* Name of the element. */
+ CONST char *name; /* Name of the element. */
int create; /* Boolean, whether the element is being created
* explicitly (being registered) or implicitly (by a
* derived element). */
@@ -702,7 +703,7 @@ CreateElement(name, create)
int
Tk_GetElementId(name)
- char *name; /* Name of the element. */
+ CONST char *name; /* Name of the element. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
diff --git a/generic/tkTest.c b/generic/tkTest.c
index d58aac1..8104f2e 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.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: tkTest.c,v 1.18 2002/07/15 16:56:32 dgp Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.19 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -157,9 +157,9 @@ static int CBindingEvalProc _ANSI_ARGS_((ClientData clientData,
static void CBindingFreeProc _ANSI_ARGS_((ClientData clientData));
int Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp));
static int ImageCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TestcbindCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TestbitmapObjCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj * CONST objv[]));
@@ -173,17 +173,17 @@ static int TestcursorObjCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj * CONST objv[]));
static int TestdeleteappsCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TestfontObjCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *CONST objv[]));
static int TestmakeexistCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TestmenubarCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
#if defined(__WIN32__) || defined(MAC_TCL)
static int TestmetricsCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
#endif
static int TestobjconfigObjCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int objc,
@@ -200,14 +200,14 @@ static void CustomOptionRestore _ANSI_ARGS_((ClientData clientData,
static void CustomOptionFree _ANSI_ARGS_((ClientData clientData,
Tk_Window tkwin, char *internalPtr));
static int TestpropCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TestsendCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TesttextCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
#if !(defined(__WIN32__) || defined(MAC_TCL))
static int TestwrapperCmd _ANSI_ARGS_((ClientData dummy,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
#endif
static void TrivialCmdDeletedProc _ANSI_ARGS_((
ClientData clientData));
@@ -340,7 +340,7 @@ TestcbindCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
TkWindow *winPtr;
Tk_Window tkwin;
@@ -589,7 +589,7 @@ TestdeleteappsCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
NewApp *nextPtr;
@@ -1700,7 +1700,7 @@ ImageCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
TImageMaster *timPtr = (TImageMaster *) clientData;
int x, y, width, height;
@@ -1923,7 +1923,7 @@ TestmakeexistCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
Tk_Window mainWin = (Tk_Window) clientData;
int i;
@@ -1964,7 +1964,7 @@ TestmenubarCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
#ifdef __UNIX__
Tk_Window mainWin = (Tk_Window) clientData;
@@ -2032,7 +2032,7 @@ TestmetricsCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
char buf[TCL_INTEGER_SPACE];
@@ -2062,7 +2062,7 @@ TestmetricsCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
Tk_Window tkwin = (Tk_Window) clientData;
TkWindow *winPtr;
@@ -2117,7 +2117,7 @@ TestpropCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
Tk_Window mainWin = (Tk_Window) clientData;
int result, actualFormat;
@@ -2196,7 +2196,7 @@ TestsendCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
TkWindow *winPtr = (TkWindow *) clientData;
@@ -2254,14 +2254,21 @@ TestsendCmd(clientData, interp, argc, argv)
if (argv[4][0] == 0) {
XDeleteProperty(winPtr->dispPtr->display, w, propName);
} else {
- for (p = argv[4]; *p != 0; p++) {
+ Tcl_DString tmp;
+
+ Tcl_DStringInit(&tmp);
+ for (p = Tcl_DStringAppend(&tmp, argv[4], strlen(argv[4]));
+ *p != 0; p++) {
if (*p == '\n') {
*p = 0;
}
}
+
XChangeProperty(winPtr->dispPtr->display,
w, propName, XA_STRING, 8, PropModeReplace,
- (unsigned char *) argv[4], p-argv[4]);
+ (unsigned char *) Tcl_DStringValue(&tmp),
+ p-Tcl_DStringValue(&tmp));
+ Tcl_DStringFree(&tmp);
}
}
} else if (strcmp(argv[1], "serial") == 0) {
@@ -2301,7 +2308,7 @@ TesttextCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
TkText *textPtr;
size_t len;
@@ -2382,7 +2389,7 @@ TestwrapperCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
TkWindow *winPtr, *wrapperPtr;
Tk_Window tkwin;
diff --git a/generic/tkText.c b/generic/tkText.c
index bc9f98a..d78738b 100644
--- a/generic/tkText.c
+++ b/generic/tkText.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: tkText.c,v 1.29 2002/07/24 18:31:10 hobbs Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.30 2002/08/05 04:30:40 dgp Exp $
*/
#include "default.h"
@@ -163,8 +163,8 @@ int tkTextDebug = 0;
*/
static int WrapModeParseProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, Tk_Window tkwin, char *value,
- char *widgRec, int offset));
+ Tcl_Interp *interp, Tk_Window tkwin,
+ CONST char *value, char *widgRec, int offset));
static char * WrapModePrintProc _ANSI_ARGS_((ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr));
@@ -198,7 +198,7 @@ WrapModeParseProc(clientData, interp, tkwin, value, widgRec, offset)
ClientData clientData; /* some flags.*/
Tcl_Interp *interp; /* Used for reporting errors. */
Tk_Window tkwin; /* Window containing canvas widget. */
- char *value; /* Value of option (list of tag
+ CONST char *value; /* Value of option (list of tag
* names). */
char *widgRec; /* Pointer to record for item. */
int offset; /* Offset into item. */
@@ -285,13 +285,14 @@ WrapModePrintProc(clientData, tkwin, widgRec, offset, freeProcPtr)
*/
static int ConfigureText _ANSI_ARGS_((Tcl_Interp *interp,
- TkText *textPtr, int argc, char **argv, int flags));
+ TkText *textPtr, int argc, CONST char **argv,
+ int flags));
static int DeleteChars _ANSI_ARGS_((TkText *textPtr,
- char *index1String, char *index2String,
+ CONST char *index1String, CONST char *index2String,
TkTextIndex *indexPtr1, TkTextIndex *indexPtr2));
static void DestroyText _ANSI_ARGS_((char *memPtr));
static void InsertChars _ANSI_ARGS_((TkText *textPtr,
- TkTextIndex *indexPtr, char *string));
+ TkTextIndex *indexPtr, CONST char *string));
static void TextBlinkProc _ANSI_ARGS_((ClientData clientData));
static void TextCmdDeletedProc _ANSI_ARGS_((
ClientData clientData));
@@ -302,21 +303,22 @@ static int TextFetchSelection _ANSI_ARGS_((ClientData clientData,
static int TextIndexSortProc _ANSI_ARGS_((CONST VOID *first,
CONST VOID *second));
static int TextSearchCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TextEditCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static int TextWidgetCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static void TextWorldChanged _ANSI_ARGS_((
ClientData instanceData));
static int TextDumpCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
static void DumpLine _ANSI_ARGS_((Tcl_Interp *interp,
TkText *textPtr, int what, TkTextLine *linePtr,
- int start, int end, int lineno, char *command));
+ int start, int end, int lineno,
+ CONST char *command));
static int DumpSegment _ANSI_ARGS_((Tcl_Interp *interp, char *key,
- char *value, char * command, TkTextIndex *index,
- int what));
+ char *value, CONST char * command,
+ TkTextIndex *index, int what));
static int TextEditUndo _ANSI_ARGS_((TkText *textPtr));
static int TextEditRedo _ANSI_ARGS_((TkText *textPtr));
static void TextGetText _ANSI_ARGS_((TkTextIndex * index1,
@@ -357,7 +359,7 @@ Tk_TextCmd(clientData, interp, argc, argv)
* interpreter. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
Tk_Window tkwin = (Tk_Window) clientData;
Tk_Window new;
@@ -471,7 +473,7 @@ TextWidgetCmd(clientData, interp, argc, argv)
ClientData clientData; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
register TkText *textPtr = (TkText *) clientData;
int c, result = TCL_OK;
@@ -519,7 +521,7 @@ TextWidgetCmd(clientData, interp, argc, argv)
} else if ((c == 'c') && (strncmp(argv[1], "compare", length) == 0)
&& (length >= 3)) {
int relation, value;
- char *p;
+ CONST char *p;
if (argc != 5) {
Tcl_AppendResult(interp, "wrong # args: should be \"",
@@ -607,7 +609,7 @@ TextWidgetCmd(clientData, interp, argc, argv)
* Simple case requires no predetermination of indices.
*/
result = DeleteChars(textPtr, argv[2],
- (argc == 4) ? argv[3] : (char *) NULL, NULL, NULL);
+ (argc == 4) ? argv[3] : NULL, NULL, NULL);
} else {
/*
* Multi-index pair case requires that we prevalidate the
@@ -1022,7 +1024,7 @@ ConfigureText(interp, textPtr, argc, argv, flags)
register TkText *textPtr; /* Information about widget; may or may
* not already have values for some fields. */
int argc; /* Number of valid entries in argv. */
- char **argv; /* Arguments. */
+ CONST char **argv; /* Arguments. */
int flags; /* Flags to pass to Tk_ConfigureWidget. */
{
int oldExport = textPtr->exportSelection;
@@ -1358,7 +1360,7 @@ InsertChars(textPtr, indexPtr, string)
TkText *textPtr; /* Overall information about text widget. */
TkTextIndex *indexPtr; /* Where to insert new characters. May be
* modified and/or invalidated. */
- char *string; /* Null-terminated string containing new
+ CONST char *string; /* Null-terminated string containing new
* information to add to text. */
{
int lineIndex, resetView, offset;
@@ -1488,9 +1490,9 @@ InsertChars(textPtr, indexPtr, string)
static int
DeleteChars(textPtr, index1String, index2String, indexPtr1, indexPtr2)
TkText *textPtr; /* Overall information about text widget. */
- char *index1String; /* String describing location of first
+ CONST char *index1String; /* String describing location of first
* character to delete. */
- char *index2String; /* String describing location of last
+ CONST char *index2String; /* String describing location of last
* character to delete. NULL means just
* delete the one character given by
* index1String. */
@@ -1971,14 +1973,14 @@ TextSearchCmd(textPtr, interp, argc, argv)
TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
int backwards, exact, searchElide, c, i, argsLeft, noCase, leftToScan;
size_t length;
int numLines, startingLine, startingByte, lineNum, firstByte, lastByte;
int code, matchLength, matchByte, passes, stopLine, searchWholeText;
int patLength;
- char *arg, *pattern, *varName, *p, *startOfLine;
+ CONST char *arg, *pattern, *varName, *p, *startOfLine;
char buffer[20];
TkTextIndex index, stopIndex;
Tcl_DString line, patDString;
@@ -2064,8 +2066,8 @@ TextSearchCmd(textPtr, interp, argc, argv)
if (noCase && exact) {
Tcl_DStringInit(&patDString);
Tcl_DStringAppend(&patDString, pattern, -1);
+ Tcl_UtfToLower(Tcl_DStringValue(&patDString));
pattern = Tcl_DStringValue(&patDString);
- Tcl_UtfToLower(pattern);
}
Tcl_DStringInit(&line);
@@ -2490,7 +2492,7 @@ TextDumpCmd(textPtr, interp, argc, argv)
register TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "dump". */
{
@@ -2500,7 +2502,7 @@ TextDumpCmd(textPtr, interp, argc, argv)
int what = 0; /* bitfield to select segment types */
int atEnd; /* True if dumping up to logical end */
TkTextLine *linePtr;
- char *command = NULL; /* Script callback to apply to segments */
+ CONST char *command = NULL; /* Script callback to apply to segments */
#define TK_DUMP_TEXT 0x1
#define TK_DUMP_MARK 0x2
#define TK_DUMP_TAG 0x4
@@ -2613,7 +2615,7 @@ DumpLine(interp, textPtr, what, linePtr, startByte, endByte, lineno, command)
TkTextLine *linePtr; /* The current line */
int startByte, endByte; /* Byte range to dump */
int lineno; /* Line number for indices dump */
- char *command; /* Script to apply to the segment */
+ CONST char *command; /* Script to apply to the segment */
{
int offset;
TkTextSegment *segPtr;
@@ -2707,13 +2709,13 @@ DumpSegment(interp, key, value, command, index, what)
Tcl_Interp *interp;
char *key; /* Segment type key */
char *value; /* Segment value */
- char *command; /* Script callback */
+ CONST char *command; /* Script callback */
TkTextIndex *index; /* index with line/byte position info */
int what; /* Look for TK_DUMP_INDEX bit */
{
char buffer[TCL_INTEGER_SPACE*2];
TkTextPrintIndex(index, buffer);
- if (command == (char *) NULL) {
+ if (command == NULL) {
Tcl_AppendElement(interp, key);
Tcl_AppendElement(interp, value);
Tcl_AppendElement(interp, buffer);
@@ -2725,7 +2727,7 @@ DumpSegment(interp, key, value, command, index, what)
argv[0] = key;
argv[1] = value;
argv[2] = buffer;
- argv[3] = (char *) NULL;
+ argv[3] = NULL;
list = Tcl_Merge(3, argv);
result = Tcl_VarEval(interp, command, " ", list, (char *) NULL);
ckfree(list);
@@ -2823,7 +2825,7 @@ TextEditCmd(textPtr, interp, argc, argv)
TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ CONST char **argv; /* Argument strings. */
{
int c, setModified;
size_t length;
diff --git a/generic/tkText.h b/generic/tkText.h
index 0937b8f..3d93532 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -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: tkText.h,v 1.11 2002/06/21 23:09:54 hobbs Exp $
+ * RCS: @(#) $Id: tkText.h,v 1.12 2002/08/05 04:30:40 dgp Exp $
*/
#ifndef _TKTEXT
@@ -795,7 +795,7 @@ EXTERN TkTextLine * TkBTreeFindLine _ANSI_ARGS_((TkTextBTree tree,
EXTERN TkTextTag ** TkBTreeGetTags _ANSI_ARGS_((TkTextIndex *indexPtr,
int *numTagsPtr));
EXTERN void TkBTreeInsertChars _ANSI_ARGS_((TkTextIndex *indexPtr,
- char *string));
+ CONST char *string));
EXTERN int TkBTreeLineIndex _ANSI_ARGS_((TkTextLine *linePtr));
EXTERN void TkBTreeLinkSegment _ANSI_ARGS_((TkTextSegment *segPtr,
TkTextIndex *indexPtr));
@@ -836,7 +836,7 @@ EXTERN void TkTextFreeDInfo _ANSI_ARGS_((TkText *textPtr));
EXTERN void TkTextFreeTag _ANSI_ARGS_((TkText *textPtr,
TkTextTag *tagPtr));
EXTERN int TkTextGetIndex _ANSI_ARGS_((Tcl_Interp *interp,
- TkText *textPtr, char *string,
+ TkText *textPtr, CONST char *string,
TkTextIndex *indexPtr));
EXTERN TkTextTabArray * TkTextGetTabs _ANSI_ARGS_((Tcl_Interp *interp,
Tk_Window tkwin, char *string));
@@ -872,9 +872,9 @@ EXTERN TkTextIndex * TkTextMakeByteIndex _ANSI_ARGS_((TkTextBTree tree,
int lineIndex, int byteIndex,
TkTextIndex *indexPtr));
EXTERN int TkTextMarkCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkTextMarkNameToIndex _ANSI_ARGS_((TkText *textPtr,
- char *name, TkTextIndex *indexPtr));
+ CONST char *name, TkTextIndex *indexPtr));
EXTERN void TkTextMarkSegToIndex _ANSI_ARGS_((TkText *textPtr,
TkTextSegment *markPtr, TkTextIndex *indexPtr));
EXTERN void TkTextEventuallyRepick _ANSI_ARGS_((TkText *textPtr));
@@ -891,30 +891,30 @@ EXTERN void TkTextRedrawTag _ANSI_ARGS_((TkText *textPtr,
TkTextTag *tagPtr, int withTag));
EXTERN void TkTextRelayoutWindow _ANSI_ARGS_((TkText *textPtr));
EXTERN int TkTextScanCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkTextSeeCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkTextSegToOffset _ANSI_ARGS_((
CONST TkTextSegment *segPtr,
CONST TkTextLine *linePtr));
-EXTERN TkTextSegment * TkTextSetMark _ANSI_ARGS_((TkText *textPtr, char *name,
- TkTextIndex *indexPtr));
+EXTERN TkTextSegment * TkTextSetMark _ANSI_ARGS_((TkText *textPtr,
+ CONST char *name, TkTextIndex *indexPtr));
EXTERN void TkTextSetYView _ANSI_ARGS_((TkText *textPtr,
TkTextIndex *indexPtr, int pickPlace));
EXTERN int TkTextTagCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkTextImageCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkTextImageIndex _ANSI_ARGS_((TkText *textPtr,
- char *name, TkTextIndex *indexPtr));
+ CONST char *name, TkTextIndex *indexPtr));
EXTERN int TkTextWindowCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkTextWindowIndex _ANSI_ARGS_((TkText *textPtr,
- char *name, TkTextIndex *indexPtr));
+ CONST char *name, TkTextIndex *indexPtr));
EXTERN int TkTextXviewCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
EXTERN int TkTextYviewCmd _ANSI_ARGS_((TkText *textPtr,
- Tcl_Interp *interp, int argc, char **argv));
+ Tcl_Interp *interp, int argc, CONST char **argv));
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index 07a209b..4f8ac7d 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.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: tkTextBTree.c,v 1.5 2000/01/06 02:18:58 hobbs Exp $
+ * RCS: @(#) $Id: tkTextBTree.c,v 1.6 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -393,7 +393,7 @@ TkBTreeInsertChars(indexPtr, string)
* index is no longer valid because
* of changes to the segment
* structure. */
- char *string; /* Pointer to bytes to insert (may
+ CONST char *string; /* Pointer to bytes to insert (may
* contain newlines, must be null-
* terminated). */
{
@@ -410,7 +410,7 @@ TkBTreeInsertChars(indexPtr, string)
register TkTextSegment *segPtr;
TkTextLine *newLinePtr;
int chunkSize; /* # characters in current chunk. */
- register char *eol; /* Pointer to character just after last
+ register CONST char *eol; /* Pointer to character just after last
* one in current chunk. */
int changeToLineCount; /* Counts change to total number of
* lines in file. */
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 71dd997..11f9552 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.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: tkTextDisp.c,v 1.12 2002/06/15 04:44:02 dgp Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.13 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkPort.h"
@@ -3299,7 +3299,7 @@ TkTextSeeCmd(textPtr, interp, argc, argv)
TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "see". */
{
@@ -3421,7 +3421,7 @@ TkTextXviewCmd(textPtr, interp, argc, argv)
TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "xview". */
{
@@ -3609,7 +3609,7 @@ TkTextYviewCmd(textPtr, interp, argc, argv)
TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "yview". */
{
@@ -3775,7 +3775,7 @@ TkTextScanCmd(textPtr, interp, argc, argv)
register TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "scan". */
{
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 0708a94..b594aba 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.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: tkTextImage.c,v 1.4 1999/12/14 06:52:33 hobbs Exp $
+ * RCS: @(#) $Id: tkTextImage.c,v 1.5 2002/08/05 04:30:40 dgp Exp $
*/
#include "tk.h"
@@ -38,8 +38,8 @@
*/
static int AlignParseProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, Tk_Window tkwin, char *value,
- char *widgRec, int offset));
+ Tcl_Interp *interp, Tk_Window tkwin,
+ CONST char *value, char *widgRec, int offset));
static char * AlignPrintProc _ANSI_ARGS_((ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr));
@@ -52,7 +52,7 @@ static void EmbImageBboxProc _ANSI_ARGS_((TkTextDispChunk *chunkPtr,
int *xPtr, int *yPtr, int *widthPtr,
int *heightPtr));
static int EmbImageConfigure _ANSI_ARGS_((TkText *textPtr,
- TkTextSegment *eiPtr, int argc, char **argv));
+ TkTextSegment *eiPtr, int argc, CONST char **argv));
static int EmbImageDeleteProc _ANSI_ARGS_((TkTextSegment *segPtr,
TkTextLine *linePtr, int treeGone));
static void EmbImageDisplayProc _ANSI_ARGS_((
@@ -132,7 +132,7 @@ TkTextImageCmd(textPtr, interp, argc, argv)
register TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "image". */
{
@@ -303,7 +303,7 @@ EmbImageConfigure(textPtr, eiPtr, argc, argv)
* contains embedded image. */
TkTextSegment *eiPtr; /* Embedded image to be configured. */
int argc; /* Number of strings in argv. */
- char **argv; /* Array of strings describing configuration
+ CONST char **argv; /* Array of strings describing configuration
* options. */
{
Tk_Image image;
@@ -423,7 +423,7 @@ AlignParseProc(clientData, interp, tkwin, value, widgRec, offset)
ClientData clientData; /* Not used.*/
Tcl_Interp *interp; /* Used for reporting errors. */
Tk_Window tkwin; /* Window for text widget. */
- char *value; /* Value of option. */
+ CONST char *value; /* Value of option. */
char *widgRec; /* Pointer to TkTextEmbWindow
* structure. */
int offset; /* Offset into item (ignored). */
@@ -844,7 +844,7 @@ EmbImageBboxProc(chunkPtr, index, y, lineHeight, baseline, xPtr, yPtr,
int
TkTextImageIndex(textPtr, name, indexPtr)
TkText *textPtr; /* Text widget containing image. */
- char *name; /* Name of image. */
+ CONST char *name; /* Name of image. */
TkTextIndex *indexPtr; /* Index information gets stored here. */
{
Tcl_HashEntry *hPtr;
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index b130d32..26576ed 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.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: tkTextIndex.c,v 1.5 2002/06/22 08:21:51 hobbs Exp $
+ * RCS: @(#) $Id: tkTextIndex.c,v 1.6 2002/08/05 04:30:40 dgp Exp $
*/
#include "default.h"
@@ -28,9 +28,9 @@
* Forward declarations for procedures defined later in this file:
*/
-static char * ForwBack _ANSI_ARGS_((char *string,
+static CONST char * ForwBack _ANSI_ARGS_((CONST char *string,
TkTextIndex *indexPtr));
-static char * StartEnd _ANSI_ARGS_(( char *string,
+static CONST char * StartEnd _ANSI_ARGS_((CONST char *string,
TkTextIndex *indexPtr));
/*
@@ -314,7 +314,7 @@ int
TkTextGetIndex(interp, textPtr, string, indexPtr)
Tcl_Interp *interp; /* Use this for error reporting. */
TkText *textPtr; /* Information about text widget. */
- char *string; /* Textual description of position. */
+ CONST char *string; /* Textual description of position. */
TkTextIndex *indexPtr; /* Index structure to fill in. */
{
char *p, *end, *endOfBase;
@@ -324,6 +324,8 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
TkTextIndex first, last;
int wantLast, result;
char c;
+ CONST char *cp;
+ Tcl_DString copy;
/*
*---------------------------------------------------------------------
@@ -354,7 +356,8 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
* funny characters like "@" or "+1c".
*/
- p = strrchr(string, '.');
+ Tcl_DStringInit(&copy);
+ p = strrchr(Tcl_DStringAppend(&copy, string, -1), '.');
if (p != NULL) {
if ((p[1] == 'f') && (strncmp(p+1, "first", 5) == 0)) {
wantLast = 0;
@@ -366,7 +369,7 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
goto tryxy;
}
*p = 0;
- hPtr = Tcl_FindHashEntry(&textPtr->tagTable, string);
+ hPtr = Tcl_FindHashEntry(&textPtr->tagTable, Tcl_DStringValue(&copy));
*p = '.';
if (hPtr == NULL) {
goto tryxy;
@@ -382,6 +385,7 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
"text doesn't contain any characters tagged with \"",
Tcl_GetHashKey(&textPtr->tagTable, hPtr), "\"",
(char *) NULL);
+ Tcl_DStringFree(&copy);
return TCL_ERROR;
}
*indexPtr = search.curIndex;
@@ -401,14 +405,14 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
int x, y;
- p = string+1;
- x = strtol(p, &end, 0);
- if ((end == p) || (*end != ',')) {
+ cp = string+1;
+ x = strtol(cp, &end, 0);
+ if ((end == cp) || (*end != ',')) {
goto error;
}
- p = end+1;
- y = strtol(p, &end, 0);
- if (end == p) {
+ cp = end+1;
+ y = strtol(cp, &end, 0);
+ if (end == cp) {
goto error;
}
TkTextPixelIndex(textPtr, x, y, indexPtr);
@@ -442,7 +446,7 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
goto gotBase;
}
- for (p = string; *p != 0; p++) {
+ for (p = Tcl_DStringValue(&copy); *p != 0; p++) {
if (isspace(UCHAR(*p)) || (*p == '+') || (*p == '-')) {
break;
}
@@ -455,14 +459,15 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
c = *endOfBase;
*endOfBase = 0;
- result = TkTextWindowIndex(textPtr, string, indexPtr);
+ result = TkTextWindowIndex(textPtr, Tcl_DStringValue(&copy), indexPtr);
*endOfBase = c;
if (result != 0) {
goto gotBase;
}
}
if ((string[0] == 'e')
- && (strncmp(string, "end", (size_t) (endOfBase-string)) == 0)) {
+ && (strncmp(string, "end",
+ (size_t) (endOfBase-Tcl_DStringValue(&copy))) == 0)) {
/*
* Base position is end of text.
*/
@@ -477,7 +482,8 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
c = *endOfBase;
*endOfBase = 0;
- result = TkTextMarkNameToIndex(textPtr, string, indexPtr);
+ result = TkTextMarkNameToIndex(textPtr, Tcl_DStringValue(&copy),
+ indexPtr);
*endOfBase = c;
if (result == TCL_OK) {
goto gotBase;
@@ -489,7 +495,7 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
c = *endOfBase;
*endOfBase = 0;
- result = TkTextImageIndex(textPtr, string, indexPtr);
+ result = TkTextImageIndex(textPtr, Tcl_DStringValue(&copy), indexPtr);
*endOfBase = c;
if (result != 0) {
goto gotBase;
@@ -507,27 +513,29 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
*/
gotBase:
- p = endOfBase;
+ cp = endOfBase;
while (1) {
- while (isspace(UCHAR(*p))) {
- p++;
+ while (isspace(UCHAR(*cp))) {
+ cp++;
}
- if (*p == 0) {
+ if (*cp == 0) {
break;
}
- if ((*p == '+') || (*p == '-')) {
- p = ForwBack(p, indexPtr);
+ if ((*cp == '+') || (*cp == '-')) {
+ cp = ForwBack(cp, indexPtr);
} else {
- p = StartEnd(p, indexPtr);
+ cp = StartEnd(cp, indexPtr);
}
- if (p == NULL) {
+ if (cp == NULL) {
goto error;
}
}
+ Tcl_DStringFree(&copy);
return TCL_OK;
error:
+ Tcl_DStringFree(&copy);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "bad text index \"", string, "\"",
(char *) NULL);
@@ -647,16 +655,16 @@ TkTextIndexCmp(index1Ptr, index2Ptr)
*---------------------------------------------------------------------------
*/
-static char *
+static CONST char *
ForwBack(string, indexPtr)
- char *string; /* String to parse for additional info
+ CONST char *string; /* String to parse for additional info
* about modifier (count and units).
* Points to "+" or "-" that starts
* modifier. */
TkTextIndex *indexPtr; /* Index to update as specified in string. */
{
- register char *p;
- char *end, *units;
+ register CONST char *p, *units;
+ char *end;
int count, lineIndex;
size_t length;
@@ -1087,15 +1095,15 @@ TkTextIndexBackChars(srcPtr, charCount, dstPtr)
*----------------------------------------------------------------------
*/
-static char *
+static CONST char *
StartEnd(string, indexPtr)
- char *string; /* String to parse for additional info
+ CONST char *string; /* String to parse for additional info
* about modifier (count and units).
* Points to first character of modifer
* word. */
TkTextIndex *indexPtr; /* Index to mdoify based on string. */
{
- char *p;
+ CONST char *p;
int c, offset;
size_t length;
register TkTextSegment *segPtr;
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c
index 3e97d7f..4378112 100644
--- a/generic/tkTextMark.c
+++ b/generic/tkTextMark.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: tkTextMark.c,v 1.5 2002/04/05 08:43:22 hobbs Exp $
+ * RCS: @(#) $Id: tkTextMark.c,v 1.6 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -42,9 +42,9 @@ static int MarkLayoutProc _ANSI_ARGS_((TkText *textPtr,
int noCharsYet, TkWrapMode wrapMode,
TkTextDispChunk *chunkPtr));
static int MarkFindNext _ANSI_ARGS_((Tcl_Interp *interp,
- TkText *textPtr, char *markName));
+ TkText *textPtr, CONST char *markName));
static int MarkFindPrev _ANSI_ARGS_((Tcl_Interp *interp,
- TkText *textPtr, char *markName));
+ TkText *textPtr, CONST char *markName));
/*
@@ -99,7 +99,7 @@ TkTextMarkCmd(textPtr, interp, argc, argv)
register TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "mark". */
{
@@ -235,7 +235,7 @@ TkTextMarkCmd(textPtr, interp, argc, argv)
TkTextSegment *
TkTextSetMark(textPtr, name, indexPtr)
TkText *textPtr; /* Text widget in which to create mark. */
- char *name; /* Name of mark to set. */
+ CONST char *name; /* Name of mark to set. */
TkTextIndex *indexPtr; /* Where to set mark. */
{
Tcl_HashEntry *hPtr;
@@ -350,7 +350,7 @@ TkTextMarkSegToIndex(textPtr, markPtr, indexPtr)
int
TkTextMarkNameToIndex(textPtr, name, indexPtr)
TkText *textPtr; /* Text widget containing mark. */
- char *name; /* Name of mark. */
+ CONST char *name; /* Name of mark. */
TkTextIndex *indexPtr; /* Index information gets stored here. */
{
Tcl_HashEntry *hPtr;
@@ -647,7 +647,7 @@ static int
MarkFindNext(interp, textPtr, string)
Tcl_Interp *interp; /* For error reporting */
TkText *textPtr; /* The widget */
- char *string; /* The starting index or mark name */
+ CONST char *string; /* The starting index or mark name */
{
TkTextIndex index;
Tcl_HashEntry *hPtr;
@@ -721,7 +721,7 @@ static int
MarkFindPrev(interp, textPtr, string)
Tcl_Interp *interp; /* For error reporting */
TkText *textPtr; /* The widget */
- char *string; /* The starting index or mark name */
+ CONST char *string; /* The starting index or mark name */
{
TkTextIndex index;
Tcl_HashEntry *hPtr;
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index 8f1d71f..81fc5cb 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.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: tkTextTag.c,v 1.7 2002/01/25 21:09:37 dgp Exp $
+ * RCS: @(#) $Id: tkTextTag.c,v 1.8 2002/08/05 04:30:40 dgp Exp $
*/
#include "default.h"
@@ -76,7 +76,7 @@ static Tk_ConfigSpec tagConfigSpecs[] = {
static void ChangeTagPriority _ANSI_ARGS_((TkText *textPtr,
TkTextTag *tagPtr, int prio));
static TkTextTag * FindTag _ANSI_ARGS_((Tcl_Interp *interp,
- TkText *textPtr, char *tagName));
+ TkText *textPtr, CONST char *tagName));
static void SortTags _ANSI_ARGS_((int numTags,
TkTextTag **tagArrayPtr));
static int TagSortProc _ANSI_ARGS_((CONST VOID *first,
@@ -105,7 +105,7 @@ TkTextTagCmd(textPtr, interp, argc, argv)
register TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "tag". */
{
@@ -245,7 +245,7 @@ TkTextTagCmd(textPtr, interp, argc, argv)
return TCL_ERROR;
}
} else if (argc == 5) {
- char *command;
+ CONST char *command;
command = Tk_GetBinding(interp, textPtr->bindingTable,
(ClientData) tagPtr, argv[4]);
@@ -264,7 +264,7 @@ TkTextTagCmd(textPtr, interp, argc, argv)
Tcl_ResetResult(interp);
}
} else {
- Tcl_SetResult(interp, command, TCL_STATIC);
+ Tcl_SetResult(interp, (char *) command, TCL_STATIC);
}
} else {
Tk_GetAllBindings(interp, textPtr->bindingTable,
@@ -890,7 +890,7 @@ FindTag(interp, textPtr, tagName)
* if NULL, then don't record an error
* message. */
TkText *textPtr; /* Widget in which tag is being used. */
- char *tagName; /* Name of desired tag. */
+ CONST char *tagName; /* Name of desired tag. */
{
Tcl_HashEntry *hPtr;
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index 6466f68..6137b14 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.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: tkTextWind.c,v 1.5 2002/06/14 22:25:12 jenglish Exp $
+ * RCS: @(#) $Id: tkTextWind.c,v 1.6 2002/08/05 04:30:40 dgp Exp $
*/
#include "tk.h"
@@ -55,8 +55,8 @@ static Tk_GeomMgr textGeomType = {
*/
static int AlignParseProc _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, Tk_Window tkwin, char *value,
- char *widgRec, int offset));
+ Tcl_Interp *interp, Tk_Window tkwin,
+ CONST char *value, char *widgRec, int offset));
static char * AlignPrintProc _ANSI_ARGS_((ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr));
@@ -69,7 +69,7 @@ static void EmbWinBboxProc _ANSI_ARGS_((TkTextDispChunk *chunkPtr,
int *xPtr, int *yPtr, int *widthPtr,
int *heightPtr));
static int EmbWinConfigure _ANSI_ARGS_((TkText *textPtr,
- TkTextSegment *ewPtr, int argc, char **argv));
+ TkTextSegment *ewPtr, int argc, CONST char **argv));
static void EmbWinDelayedUnmap _ANSI_ARGS_((
ClientData clientData));
static int EmbWinDeleteProc _ANSI_ARGS_((TkTextSegment *segPtr,
@@ -155,7 +155,7 @@ TkTextWindowCmd(textPtr, interp, argc, argv)
register TkText *textPtr; /* Information about text widget. */
Tcl_Interp *interp; /* Current interpreter. */
int argc; /* Number of arguments. */
- char **argv; /* Argument strings. Someone else has already
+ CONST char **argv; /* Argument strings. Someone else has already
* parsed this command enough to know that
* argv[1] is "window". */
{
@@ -327,7 +327,7 @@ EmbWinConfigure(textPtr, ewPtr, argc, argv)
* contains embedded window. */
TkTextSegment *ewPtr; /* Embedded window to be configured. */
int argc; /* Number of strings in argv. */
- char **argv; /* Array of strings describing configuration
+ CONST char **argv; /* Array of strings describing configuration
* options. */
{
Tk_Window oldWindow;
@@ -435,7 +435,7 @@ AlignParseProc(clientData, interp, tkwin, value, widgRec, offset)
ClientData clientData; /* Not used.*/
Tcl_Interp *interp; /* Used for reporting errors. */
Tk_Window tkwin; /* Window for text widget. */
- char *value; /* Value of option. */
+ CONST char *value; /* Value of option. */
char *widgRec; /* Pointer to TkTextEmbWindow
* structure. */
int offset; /* Offset into item (ignored). */
@@ -1158,7 +1158,7 @@ EmbWinDelayedUnmap(clientData)
int
TkTextWindowIndex(textPtr, name, indexPtr)
TkText *textPtr; /* Text widget containing window. */
- char *name; /* Name of window. */
+ CONST char *name; /* Name of window. */
TkTextIndex *indexPtr; /* Index information gets stored here. */
{
Tcl_HashEntry *hPtr;
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 8cde5a9..415b0f6 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.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: tkUtil.c,v 1.11 2001/09/26 20:25:17 pspjuth Exp $
+ * RCS: @(#) $Id: tkUtil.c,v 1.12 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -630,7 +630,7 @@ int
Tk_GetScrollInfo(interp, argc, argv, dblPtr, intPtr)
Tcl_Interp *interp; /* Used for error reporting. */
int argc; /* # arguments for command. */
- char **argv; /* Arguments for command. */
+ CONST char **argv; /* Arguments for command. */
double *dblPtr; /* Filled in with argument "moveto"
* option, if any. */
int *intPtr; /* Filled in with number of pages
diff --git a/generic/tkVisual.c b/generic/tkVisual.c
index 39b627a..766862e 100644
--- a/generic/tkVisual.c
+++ b/generic/tkVisual.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: tkVisual.c,v 1.3 1999/04/16 01:51:25 stanton Exp $
+ * RCS: @(#) $Id: tkVisual.c,v 1.4 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkInt.h"
@@ -92,7 +92,7 @@ Tk_GetVisual(interp, tkwin, string, depthPtr, colormapPtr)
* reporting. */
Tk_Window tkwin; /* Window in which visual will be
* used. */
- char *string; /* String describing visual. See
+ CONST char *string; /* String describing visual. See
* manual entry for details. */
int *depthPtr; /* The depth of the returned visual
* is stored here. */
@@ -106,7 +106,7 @@ Tk_GetVisual(interp, tkwin, string, depthPtr, colormapPtr)
long mask;
Visual *visual;
int length, c, numVisuals, prio, bestPrio, i;
- char *p;
+ CONST char *p;
VisualDictionary *dictPtr;
TkColormap *cmapPtr;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
@@ -369,7 +369,7 @@ Tk_GetColormap(interp, tkwin, string)
* reporting. */
Tk_Window tkwin; /* Window where colormap will be
* used. */
- char *string; /* String that identifies colormap:
+ CONST char *string; /* String that identifies colormap:
* either "new" or the name of
* another window. */
{
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 1cd3f7f..a237953 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.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: tkWindow.c,v 1.51 2002/07/25 21:35:22 pspjuth Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.52 2002/08/05 04:30:40 dgp Exp $
*/
#include "tkPort.h"
@@ -159,7 +159,7 @@ static TkCmd commands[] = {
{"::tk::unsupported::MacWindowStyle",
TkUnsupported1Cmd, NULL, 1, 1},
#endif
- {(char *) NULL, (int (*) _ANSI_ARGS_((ClientData, Tcl_Interp *, int, char **))) NULL, NULL, 0}
+ {(char *) NULL, (int (*) _ANSI_ARGS_((ClientData, Tcl_Interp *, int, CONST char **))) NULL, NULL, 0}
};
/*
@@ -202,8 +202,8 @@ static Tk_ArgvInfo argTable[] = {
*/
static Tk_Window CreateTopLevelWindow _ANSI_ARGS_((Tcl_Interp *interp,
- Tk_Window parent, char *name, char *screenName,
- unsigned int flags));
+ Tk_Window parent, CONST char *name,
+ CONST char *screenName, unsigned int flags));
static void DeleteWindowsExitProc _ANSI_ARGS_((
ClientData clientData));
static TkDisplay * GetScreen _ANSI_ARGS_((Tcl_Interp *interp,
@@ -211,7 +211,7 @@ static TkDisplay * GetScreen _ANSI_ARGS_((Tcl_Interp *interp,
static int Initialize _ANSI_ARGS_((Tcl_Interp *interp));
static int NameWindow _ANSI_ARGS_((Tcl_Interp *interp,
TkWindow *winPtr, TkWindow *parentPtr,
- char *name));
+ CONST char *name));
static void UnlinkWindow _ANSI_ARGS_((TkWindow *winPtr));
/*
@@ -302,10 +302,10 @@ CreateTopLevelWindow(interp, parent, name, screenName, flags)
Tk_Window parent; /* Token for logical parent of new window
* (used for naming, options, etc.). May
* be NULL. */
- char *name; /* Name for new window; if parent is
+ CONST char *name; /* Name for new window; if parent is
* non-NULL, must be unique among parent's
* children. */
- char *screenName; /* Name of screen on which to create
+ CONST char *screenName; /* Name of screen on which to create
* window. NULL means use DISPLAY environment
* variable to determine. Empty string means
* use parent's screen, or DISPLAY if no
@@ -704,7 +704,7 @@ NameWindow(interp, winPtr, parentPtr, name)
register TkWindow *winPtr; /* Window that is to be named and inserted. */
TkWindow *parentPtr; /* Pointer to logical parent for winPtr
* (used for naming, options, etc.). */
- char *name; /* Name for winPtr; must be unique among
+ CONST char *name; /* Name for winPtr; must be unique among
* parentPtr's children. */
{
#define FIXED_SIZE 200
@@ -821,7 +821,7 @@ NameWindow(interp, winPtr, parentPtr, name)
Tk_Window
TkCreateMainWindow(interp, screenName, baseName)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
- char *screenName; /* Name of screen on which to create
+ CONST char *screenName; /* Name of screen on which to create
* window. Empty or NULL string means
* use DISPLAY environment variable. */
char *baseName; /* Base name for application; usually of the
@@ -971,9 +971,9 @@ Tk_CreateWindow(interp, parent, name, screenName)
* the interp's result is assumed to be
* initialized by the caller. */
Tk_Window parent; /* Token for parent of new window. */
- char *name; /* Name for new window. Must be unique
+ CONST char *name; /* Name for new window. Must be unique
* among parent's children. */
- char *screenName; /* If NULL, new window will be internal on
+ CONST char *screenName; /* If NULL, new window will be internal on
* same screen as its parent. If non-NULL,
* gives name of screen on which to create
* new window; window will be a top-level
@@ -1039,7 +1039,7 @@ Tk_CreateAnonymousWindow(interp, parent, screenName)
* the interp's result is assumed to be
* initialized by the caller. */
Tk_Window parent; /* Token for parent of new window. */
- char *screenName; /* If NULL, new window will be internal on
+ CONST char *screenName; /* If NULL, new window will be internal on
* same screen as its parent. If non-NULL,
* gives name of screen on which to create
* new window; window will be a top-level
@@ -1111,11 +1111,11 @@ Tk_CreateWindowFromPath(interp, tkwin, pathName, screenName)
* initialized by the caller. */
Tk_Window tkwin; /* Token for any window in application
* that is to contain new window. */
- char *pathName; /* Path name for new window within the
+ CONST char *pathName; /* Path name for new window within the
* application of tkwin. The parent of
* this window must already exist, but
* the window itself must not exist. */
- char *screenName; /* If NULL, new window will be on same
+ CONST char *screenName; /* If NULL, new window will be on same
* screen as its parent. If non-NULL,
* gives name of screen on which to create
* new window; window will be a top-level
@@ -2164,7 +2164,7 @@ TkDoConfigureNotify(winPtr)
void
Tk_SetClass(tkwin, className)
Tk_Window tkwin; /* Token for window to assign class. */
- char *className; /* New class for tkwin. */
+ CONST char *className; /* New class for tkwin. */
{
register TkWindow *winPtr = (TkWindow *) tkwin;
@@ -2314,7 +2314,7 @@ Tk_IdToWindow(display, window)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tk_DisplayName(tkwin)
Tk_Window tkwin; /* Window whose display name is desired. */
{