Tcl Source Code

Artifact [490739f167]
Login

Artifact 490739f167521cb2f4bf5953db83d74b2f2496d9:

Attachment "index.patch" to ticket [504671ffff] added by dgp 2002-01-17 07:04:34.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.795
diff -u -u -r1.795 ChangeLog
--- ChangeLog	2002/01/16 06:02:33	1.795
+++ ChangeLog	2002/01/16 23:58:52
@@ -1,5 +1,53 @@
 2002-01-16  Don Porter <[email protected]>
 
+	* doc/FileSystem.3:
+	* doc/GetCwd.3:
+	* doc/GetIndex.3:
+	* generic/tcl.decls (Tcl_GetIndexFromObj, Tcl_GetIndexFromObjStruct,
+	  Tcl_GetCwd, Tcl_FSFileAttrStrings, Tcl_FSGetNativePath,
+	  Tcl_FSGetTranslatedStringPath):
+	* generic/tcl.h (Tcl_FSFileAttrStringsProc):
+	* generic/tclFCmd.c (TclFileAttrsCmd):
+	* generic/tclIOUtil.c (Tcl_GetCwd,NativeFileAttrStrings,
+	  Tcl_FSFileAttrStrings,Tcl_FSGetTranslatedStringPath,
+	  Tcl_FSGetNativePath):
+	* generic/tclIndexObj.c (Tcl_GetIndexFromObj,Tcl_GetIndexFromObjStruct):
+	More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that were
+	overlooked before.  
+	***POTENTIAL INCOMPATIBILITY*** 
+	Includes a source incompatibility in the tablePtr arguments of
+	the Tcl_GetIndexFromObj* routines.
+	* generic/tclDecls.h: make genstubs
+
+	* generic/tclBinary.c (Tcl_BinaryObjCmd):
+	* generic/tclClock.c (Tcl_ClockObjCmd):
+	* generic/tclCmdAH.c (Tcl_EncodingObjCmd, Tcl_FileObjCmd):
+	* generic/tclCmdIL.c (Tcl_InfoObjCmd,Tcl_LsearchObjCmd,Tcl_LsortObjCmd):
+	* generic/tclCmdMZ.c (Tcl_TraceObjCmd,Tcl_RegexpObjCmd,Tcl_RegsubObjCmd,
+	  Tcl_StringObjCmd,Tcl_SubstObjCmd,Tcl_SwitchObjCmd,
+	  TclTraceCommandObjCmd,TclTraceVariableObjCmd):
+	* generic/tclCompCmds.c (TclCompileStringCmd):
+	* generic/tclEvent.c (Tcl_UpdateObjCmd):
+	* generic/tclFileName.c (Tcl_GlobObjCmd):
+	* generic/tclIO.c (Tcl_FileEventObjCmd):
+	* generic/tclIOCmd.c (Tcl_SeekObjCmd,Tcl_ExecObjCmd,Tcl_SocketObjCmd,
+	  Tcl_FcopyObjCmd):
+	* generic/tclInterp.c (Tcl_InterpObjCmd,SlaveObjCmd):
+	* generic/tclNamesp.c (Tcl_NamespaceObjCmd):
+	* generic/tclPkg.c (Tcl_PackageObjCmd):
+	* generic/tclTest.c (Tcltest_Init,TestencodingObjCmd,TestgetplatformCmd,
+	  TestlocaleCmd,TestregexpObjCmd,TestsaveresultCmd,
+	  TestGetIndexFromObjStructObjCmd,TestReportFileAttrStrings):
+	* generic/tclTestObj.c (TestindexObjCmd,TeststringObjCmd):
+	* generic/tclTimer.c (Tcl_AfterObjCmd):
+	* generic/tclVar.c (Tcl_ArrayObjCmd):
+	* mac/tclMacFCmd.c (SetFileFinderAttributes):
+	* unix/tclUnixChan.c (TclpOpenFileChannel):
+	* unix/tclUnixFCmd.c (tclpFileAttrStrings):
+	* unix/tclUnixFile.c (TclpObjAccess,TclpObjChdir,TclpObjStat,
+	  TclpObjLstat):
+	* win/tclWinFCmd.c (tclpFileAttrStrings): Updated callers.
+
 	* generic/tcl.decls (Tcl_RecordAndEval):
 	* generic/tclDecls.h: make genstubs
 	* generic/tclHistory.c (Tcl_RecordAndEval): Updated APIs in
Index: doc/FileSystem.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/FileSystem.3,v
retrieving revision 1.15
diff -u -u -r1.15 FileSystem.3
--- doc/FileSystem.3	2002/01/15 21:19:06	1.15
+++ doc/FileSystem.3	2002/01/16 23:58:52
@@ -69,7 +69,7 @@
 int
 \fBTcl_FSFileAttrsSet\fR(\fIinterp, int index, pathPtr, Tcl_Obj *objPtr\fR)
 .sp
-char**      
+CONST char**      
 \fBTcl_FSFileAttrStrings\fR(\fIpathPtr, objPtrRef\fR)
 .sp
 int
@@ -114,13 +114,13 @@
 Tcl_Obj* 
 \fBTcl_FSGetTranslatedPath\fR(\fIinterp, pathPtr\fR)
 .sp
-char* 
+CONST char* 
 \fBTcl_FSGetTranslatedStringPath\fR(\fIinterp, pathPtr\fR)
 .sp
 Tcl_Obj*
 \fBTcl_FSNewNativePath\fR(\fIfsPtr, clientData\fR)
 .sp
-char* 
+CONST char* 
 \fBTcl_FSGetNativePath\fR(\fIpathPtr\fR)
 .sp
 Tcl_Obj*
@@ -950,7 +950,7 @@
 methods.
 .PP
 .CS
-typedef char** Tcl_FSFileAttrStringsProc(
+typedef CONST char** Tcl_FSFileAttrStringsProc(
 	Tcl_Obj *\fIpathPtr\fR, 
 	Tcl_Obj** \fIobjPtrRef\fR);
 .CE
Index: doc/GetCwd.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/GetCwd.3,v
retrieving revision 1.2
diff -u -u -r1.2 GetCwd.3
--- doc/GetCwd.3	1999/04/16 00:46:31	1.2
+++ doc/GetCwd.3	2002/01/16 23:58:52
@@ -15,7 +15,7 @@
 .nf
 \fB#include <tcl.h>\fR
 .sp
-char *
+CONST char *
 \fBTcl_GetCwd\fR(\fIinterp\fR, \fIbufferPtr\fR)
 .sp
 int
Index: doc/GetIndex.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/GetIndex.3,v
retrieving revision 1.7
diff -u -u -r1.7 GetIndex.3
--- doc/GetIndex.3	2002/01/14 15:07:39	1.7
+++ doc/GetIndex.3	2002/01/16 23:58:52
@@ -25,7 +25,7 @@
 msg, flags, indexPtr\fR)
 .VE
 .SH ARGUMENTS
-.AS "char * CONST" *tablePtr
+.AS "CONST char" **tablePtr
 .AP Tcl_Interp *interp in
 Interpreter to use for error reporting; if NULL, then no message is
 provided on errors.
@@ -33,7 +33,7 @@
 The string value of this object is used to search through \fItablePtr\fR.
 The internal representation is modified to hold the index of the matching
 table entry.
-.AP "char * CONST" *tablePtr in
+.AP "CONST char" **tablePtr in
 An array of null-terminated strings.  The end of the array is marked
 by a NULL string pointer.
 .VS
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.72
diff -u -u -r1.72 tcl.decls
--- generic/tcl.decls	2002/01/16 06:02:33	1.72
+++ generic/tcl.decls	2002/01/16 23:58:52
@@ -154,7 +154,7 @@
 }
 declare 36 generic {
     int Tcl_GetIndexFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, \
-	    char * CONST *tablePtr, CONST char *msg, int flags, int *indexPtr)
+	    CONST char **tablePtr, CONST char *msg, int flags, int *indexPtr)
 }
 declare 37 generic {
     int Tcl_GetInt(Tcl_Interp *interp, CONST char *str, int *intPtr)
@@ -1084,7 +1084,7 @@
 }
 declare 304 generic {
     int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr, \
-	    char * CONST *tablePtr, int offset, CONST char *msg, int flags, \
+	    CONST char **tablePtr, int offset, CONST char *msg, int flags, \
 	    int *indexPtr)
 }
 declare 305 generic {
@@ -1290,7 +1290,7 @@
 # These 4 functions are obsolete, use Tcl_FSGetCwd, Tcl_FSChdir,
 # Tcl_FSAccess and Tcl_FSStat
 declare 365 generic {
-    char *Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr)
+    CONST char *Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr)
 }
 declare 366 generic {
    int Tcl_Chdir(CONST char *dirName)
@@ -1600,7 +1600,7 @@
 			    Tcl_Obj *objPtr)
 }
 declare 453 generic {
-    char** Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)
+    CONST char ** Tcl_FSFileAttrStrings(Tcl_Obj *pathPtr, Tcl_Obj **objPtrRef)
 }
 declare 454 generic {
     int Tcl_FSStat(Tcl_Obj *pathPtr, struct stat *buf)
@@ -1649,7 +1649,7 @@
     Tcl_Obj* Tcl_FSNewNativePath(Tcl_Obj* fromFilesystem, ClientData clientData)
 }
 declare 469 generic {
-    char* Tcl_FSGetNativePath(Tcl_Obj* pathObjPtr)
+    CONST char* Tcl_FSGetNativePath(Tcl_Obj* pathObjPtr)
 }
 declare 470 generic {
     Tcl_Obj* Tcl_FSFileSystemInfo(Tcl_Obj* pathObjPtr)
@@ -1670,7 +1670,8 @@
     ClientData Tcl_FSData(Tcl_Filesystem *fsPtr)
 }
 declare 476 generic {
-    char* Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, Tcl_Obj* pathPtr)
+    CONST char* Tcl_FSGetTranslatedStringPath(Tcl_Interp *interp, \
+	    Tcl_Obj* pathPtr)
 }
 declare 477 generic {
     Tcl_Filesystem* Tcl_FSGetFileSystemForPath(Tcl_Obj* pathObjPtr)
Index: generic/tcl.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.h,v
retrieving revision 1.109
diff -u -u -r1.109 tcl.h
--- generic/tcl.h	2002/01/15 21:19:07	1.109
+++ generic/tcl.h	2002/01/16 23:58:53
@@ -1530,7 +1530,7 @@
 typedef int (Tcl_FSFileAttrsGetProc) _ANSI_ARGS_((Tcl_Interp *interp,
 			    int index, Tcl_Obj *pathPtr,
 			    Tcl_Obj **objPtrRef));
-typedef char** (Tcl_FSFileAttrStringsProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, 
+typedef CONST char** (Tcl_FSFileAttrStringsProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, 
 			    Tcl_Obj** objPtrRef));
 typedef int (Tcl_FSFileAttrsSetProc) _ANSI_ARGS_((Tcl_Interp *interp,
 			    int index, Tcl_Obj *pathPtr,
Index: generic/tclBinary.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBinary.c,v
retrieving revision 1.10
diff -u -u -r1.10 tclBinary.c
--- generic/tclBinary.c	2001/12/28 23:36:31	1.10
+++ generic/tclBinary.c	2002/01/16 23:58:53
@@ -582,7 +582,7 @@
 				 * cursor has visited.*/
     char *errorString, *errorValue, *str;
     int offset, size, length, index;
-    static char *options[] = { 
+    static CONST char *options[] = { 
 	"format",	"scan",		NULL 
     };
     enum options { 
Index: generic/tclClock.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclClock.c,v
retrieving revision 1.12
diff -u -u -r1.12 tclClock.c
--- generic/tclClock.c	2001/11/21 02:36:20	1.12
+++ generic/tclClock.c	2002/01/16 23:58:53
@@ -67,13 +67,13 @@
     Tcl_Obj *baseObjPtr = NULL;
     char *scanStr;
     
-    static char *switches[] =
+    static CONST char *switches[] =
 	{"clicks", "format", "scan", "seconds", (char *) NULL};
     enum command { COMMAND_CLICKS, COMMAND_FORMAT, COMMAND_SCAN,
 		       COMMAND_SECONDS
     };
-    static char *formatSwitches[] = {"-format", "-gmt", (char *) NULL};
-    static char *scanSwitches[] = {"-base", "-gmt", (char *) NULL};
+    static CONST char *formatSwitches[] = {"-format", "-gmt", (char *) NULL};
+    static CONST char *scanSwitches[] = {"-base", "-gmt", (char *) NULL};
 
     resultPtr = Tcl_GetObjResult(interp);
     if (objc < 2) {
Index: generic/tclCmdAH.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCmdAH.c,v
retrieving revision 1.17
diff -u -u -r1.17 tclCmdAH.c
--- generic/tclCmdAH.c	2002/01/03 18:23:47	1.17
+++ generic/tclCmdAH.c	2002/01/16 23:58:53
@@ -427,7 +427,7 @@
     Tcl_DString ds;
     Tcl_Obj *resultPtr;
 
-    static char *optionStrings[] = {
+    static CONST char *optionStrings[] = {
 	"convertfrom", "convertto", "names", "system",
 	NULL
     };
@@ -786,7 +786,7 @@
  * This list of constants should match the fileOption string array below.
  */
 
-    static char *fileOptions[] = {
+    static CONST char *fileOptions[] = {
 	"atime",	"attributes",	"channels",	"copy",
 	"delete",
 	"dirname",	"executable",	"exists",	"extension",
Index: generic/tclCmdIL.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCmdIL.c,v
retrieving revision 1.36
diff -u -u -r1.36 tclCmdIL.c
--- generic/tclCmdIL.c	2001/11/14 23:17:03	1.36
+++ generic/tclCmdIL.c	2002/01/16 23:58:54
@@ -373,7 +373,7 @@
     int objc;			/* Number of arguments. */
     Tcl_Obj *CONST objv[];	/* Argument objects. */
 {
-    static char *subCmds[] = {
+    static CONST char *subCmds[] = {
             "args", "body", "cmdcount", "commands",
 	     "complete", "default", "exists", "functions", "globals",
 	     "hostname", "level", "library", "loaded",
@@ -2743,7 +2743,7 @@
     int dataType, isIncreasing, lower, upper, patInt, objInt;
     double patDouble, objDouble;
     Tcl_Obj *patObj, **listv;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"-ascii", "-decreasing", "-dictionary", "-exact", "-increasing", 
 	    "-integer", "-glob", "-real", "-regexp", "-sorted", NULL
     };
@@ -3105,7 +3105,7 @@
     SortInfo sortInfo;                  /* Information about this sort that
                                          * needs to be passed to the 
                                          * comparison function */
-    static char *switches[] = {
+    static CONST char *switches[] = {
 	"-ascii", "-command", "-decreasing", "-dictionary", "-increasing",
 	"-index", "-integer", "-real", "-unique", (char *) NULL
     };
Index: generic/tclCmdMZ.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCmdMZ.c,v
retrieving revision 1.53
diff -u -u -r1.53 tclCmdMZ.c
--- generic/tclCmdMZ.c	2001/12/20 23:33:27	1.53
+++ generic/tclCmdMZ.c	2002/01/16 23:58:54
@@ -58,7 +58,7 @@
  * In the future we may provide an API to add to the list of
  * supported trace types.
  */
-static char *traceTypeOptions[] = {
+static CONST char *traceTypeOptions[] = {
     "command", "variable", (char*) NULL
 };
 static Tcl_TraceTypeObjCmd* traceSubCmds[] = {
@@ -145,7 +145,7 @@
     Tcl_RegExp regExpr;
     Tcl_Obj *objPtr, *resultPtr;
     Tcl_RegExpInfo info;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"-all",		"-about",	"-indices",	"-inline",
 	"-expanded",	"-line",	"-linestop",	"-lineanchor",
 	"-nocase",	"-start",	"--",		(char *) NULL
@@ -471,7 +471,7 @@
     Tcl_Obj *resultPtr, *subPtr, *objPtr;
     Tcl_UniChar ch, *wsrc, *wfirstChar, *wstring, *wsubspec, *wend;
 
-    static char *options[] = {
+    static CONST char *options[] = {
 	"-all",		"-nocase",	"-expanded",
 	"-line",	"-linestop",	"-lineanchor",	"-start",
 	"--",		NULL
@@ -1027,7 +1027,7 @@
     Tcl_Obj *resultPtr;
     char *string1, *string2;
     int length1, length2;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"bytelength",	"compare",	"equal",	"first",
 	"index",	"is",		"last",		"length",
 	"map",		"match",	"range",	"repeat",
@@ -1361,7 +1361,7 @@
 	    int i, failat = 0, result = 1, strict = 0;
 	    Tcl_Obj *objPtr, *failVarObj = NULL;
 
-	    static char *isOptions[] = {
+	    static CONST char *isOptions[] = {
 		"alnum",	"alpha",	"ascii",	"control",
 		"boolean",	"digit",	"double",	"false",
 		"graph",	"integer",	"lower",	"print",
@@ -2262,7 +2262,7 @@
     int objc;				/* Number of arguments. */
     Tcl_Obj *CONST objv[];       	/* Argument objects. */
 {
-    static char *substOptions[] = {
+    static CONST char *substOptions[] = {
 	"-nobackslashes", "-nocommands", "-novariables", (char *) NULL
     };
     enum substOptions {
@@ -2486,7 +2486,7 @@
     char *string, *pattern;
     Tcl_Obj *stringObj;
     Tcl_Obj *CONST *savedObjv = objv;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"-exact",	"-glob",	"-regexp",	"--", 
 	NULL
     };
@@ -2752,7 +2752,7 @@
     char *name, *flagOps, *command, *p;
     size_t length;
     /* Main sub commands to 'trace' */
-    static char *traceOptions[] = {
+    static CONST char *traceOptions[] = {
 	"add", "list", "remove", 
 #ifndef TCL_REMOVE_OBSOLETE_TRACES
 	"variable", "vdelete", "vinfo", 
@@ -2992,7 +2992,7 @@
     char *name, *command;
     size_t length;
     enum traceOptions { TRACE_ADD, TRACE_LIST, TRACE_REMOVE };
-    static char *opStrings[] = { "delete", "rename", (char *) NULL };
+    static CONST char *opStrings[] = { "delete", "rename", (char *) NULL };
     enum operations { TRACE_CMD_DELETE, TRACE_CMD_RENAME };
     
     switch ((enum traceOptions) optionIndex) {
@@ -3158,7 +3158,7 @@
     char *name, *command;
     size_t length;
     enum traceOptions { TRACE_ADD, TRACE_LIST, TRACE_REMOVE };
-    static char *opStrings[] = { "array", "read", "unset", "write",
+    static CONST char *opStrings[] = { "array", "read", "unset", "write",
 				     (char *) NULL };
     enum operations { TRACE_VAR_ARRAY, TRACE_VAR_READ, TRACE_VAR_UNSET,
 			  TRACE_VAR_WRITE };
Index: generic/tclCompCmds.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCompCmds.c,v
retrieving revision 1.19
diff -u -u -r1.19 tclCompCmds.c
--- generic/tclCompCmds.c	2001/12/11 19:45:52	1.19
+++ generic/tclCompCmds.c	2002/01/16 23:58:55
@@ -2402,7 +2402,7 @@
     int index;
     int code;
     
-    static char *options[] = {
+    static CONST char *options[] = {
 	"bytelength",	"compare",	"equal",	"first",
 	"index",	"is",		"last",		"length",
 	"map",		"match",	"range",	"repeat",
Index: generic/tclDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclDecls.h,v
retrieving revision 1.72
diff -u -u -r1.72 tclDecls.h
--- generic/tclDecls.h	2002/01/16 06:02:34	1.72
+++ generic/tclDecls.h	2002/01/16 23:58:55
@@ -137,7 +137,7 @@
 				double * doublePtr));
 /* 36 */
 EXTERN int		Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp * interp, 
-				Tcl_Obj * objPtr, char * CONST * tablePtr, 
+				Tcl_Obj * objPtr, CONST char ** tablePtr, 
 				CONST char * msg, int flags, int * indexPtr));
 /* 37 */
 EXTERN int		Tcl_GetInt _ANSI_ARGS_((Tcl_Interp * interp, 
@@ -982,7 +982,7 @@
 /* 304 */
 EXTERN int		Tcl_GetIndexFromObjStruct _ANSI_ARGS_((
 				Tcl_Interp * interp, Tcl_Obj * objPtr, 
-				char * CONST * tablePtr, int offset, 
+				CONST char ** tablePtr, int offset, 
 				CONST char * msg, int flags, int * indexPtr));
 /* 305 */
 EXTERN VOID *		Tcl_GetThreadData _ANSI_ARGS_((
@@ -1158,7 +1158,7 @@
 				char * string, int numBytes, 
 				Tcl_Parse * parsePtr, int append));
 /* 365 */
-EXTERN char *		Tcl_GetCwd _ANSI_ARGS_((Tcl_Interp * interp, 
+EXTERN CONST char *	Tcl_GetCwd _ANSI_ARGS_((Tcl_Interp * interp, 
 				Tcl_DString * cwdPtr));
 /* 366 */
 EXTERN int		Tcl_Chdir _ANSI_ARGS_((CONST char * dirName));
@@ -1431,7 +1431,7 @@
 				int index, Tcl_Obj * pathPtr, 
 				Tcl_Obj * objPtr));
 /* 453 */
-EXTERN char**		Tcl_FSFileAttrStrings _ANSI_ARGS_((Tcl_Obj * pathPtr, 
+EXTERN CONST char **	Tcl_FSFileAttrStrings _ANSI_ARGS_((Tcl_Obj * pathPtr, 
 				Tcl_Obj ** objPtrRef));
 /* 454 */
 EXTERN int		Tcl_FSStat _ANSI_ARGS_((Tcl_Obj * pathPtr, 
@@ -1479,7 +1479,7 @@
 				Tcl_Obj* fromFilesystem, 
 				ClientData clientData));
 /* 469 */
-EXTERN char*		Tcl_FSGetNativePath _ANSI_ARGS_((Tcl_Obj* pathObjPtr));
+EXTERN CONST char*	Tcl_FSGetNativePath _ANSI_ARGS_((Tcl_Obj* pathObjPtr));
 /* 470 */
 EXTERN Tcl_Obj*		Tcl_FSFileSystemInfo _ANSI_ARGS_((
 				Tcl_Obj* pathObjPtr));
@@ -1495,7 +1495,7 @@
 /* 475 */
 EXTERN ClientData	Tcl_FSData _ANSI_ARGS_((Tcl_Filesystem * fsPtr));
 /* 476 */
-EXTERN char*		Tcl_FSGetTranslatedStringPath _ANSI_ARGS_((
+EXTERN CONST char*	Tcl_FSGetTranslatedStringPath _ANSI_ARGS_((
 				Tcl_Interp * interp, Tcl_Obj* pathPtr));
 /* 477 */
 EXTERN Tcl_Filesystem*	Tcl_FSGetFileSystemForPath _ANSI_ARGS_((
@@ -1576,7 +1576,7 @@
     unsigned char * (*tcl_GetByteArrayFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 33 */
     int (*tcl_GetDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, double * doublePtr)); /* 34 */
     int (*tcl_GetDoubleFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr)); /* 35 */
-    int (*tcl_GetIndexFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, char * CONST * tablePtr, CONST char * msg, int flags, int * indexPtr)); /* 36 */
+    int (*tcl_GetIndexFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char ** tablePtr, CONST char * msg, int flags, int * indexPtr)); /* 36 */
     int (*tcl_GetInt) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * intPtr)); /* 37 */
     int (*tcl_GetIntFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr)); /* 38 */
     int (*tcl_GetLongFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr)); /* 39 */
@@ -1876,7 +1876,7 @@
     Tcl_Encoding (*tcl_GetEncoding) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 301 */
     char * (*tcl_GetEncodingName) _ANSI_ARGS_((Tcl_Encoding encoding)); /* 302 */
     void (*tcl_GetEncodingNames) _ANSI_ARGS_((Tcl_Interp * interp)); /* 303 */
-    int (*tcl_GetIndexFromObjStruct) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, char * CONST * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr)); /* 304 */
+    int (*tcl_GetIndexFromObjStruct) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CONST char ** tablePtr, int offset, CONST char * msg, int flags, int * indexPtr)); /* 304 */
     VOID * (*tcl_GetThreadData) _ANSI_ARGS_((Tcl_ThreadDataKey * keyPtr, int size)); /* 305 */
     Tcl_Obj * (*tcl_GetVar2Ex) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags)); /* 306 */
     ClientData (*tcl_InitNotifier) _ANSI_ARGS_((void)); /* 307 */
@@ -1937,7 +1937,7 @@
     int (*tcl_ParseExpr) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int numBytes, Tcl_Parse * parsePtr)); /* 362 */
     int (*tcl_ParseQuotedString) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int numBytes, Tcl_Parse * parsePtr, int append, char ** termPtr)); /* 363 */
     int (*tcl_ParseVarName) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int numBytes, Tcl_Parse * parsePtr, int append)); /* 364 */
-    char * (*tcl_GetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 365 */
+    CONST char * (*tcl_GetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 365 */
     int (*tcl_Chdir) _ANSI_ARGS_((CONST char * dirName)); /* 366 */
     int (*tcl_Access) _ANSI_ARGS_((CONST char * path, int mode)); /* 367 */
     int (*tcl_Stat) _ANSI_ARGS_((CONST char * path, struct stat * bufPtr)); /* 368 */
@@ -2025,7 +2025,7 @@
     int (*tcl_FSUtime) _ANSI_ARGS_((Tcl_Obj * pathPtr, struct utimbuf * tval)); /* 450 */
     int (*tcl_FSFileAttrsGet) _ANSI_ARGS_((Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef)); /* 451 */
     int (*tcl_FSFileAttrsSet) _ANSI_ARGS_((Tcl_Interp * interp, int index, Tcl_Obj * pathPtr, Tcl_Obj * objPtr)); /* 452 */
-    char** (*tcl_FSFileAttrStrings) _ANSI_ARGS_((Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef)); /* 453 */
+    CONST char ** (*tcl_FSFileAttrStrings) _ANSI_ARGS_((Tcl_Obj * pathPtr, Tcl_Obj ** objPtrRef)); /* 453 */
     int (*tcl_FSStat) _ANSI_ARGS_((Tcl_Obj * pathPtr, struct stat * buf)); /* 454 */
     int (*tcl_FSAccess) _ANSI_ARGS_((Tcl_Obj * pathPtr, int mode)); /* 455 */
     Tcl_Channel (*tcl_FSOpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions)); /* 456 */
@@ -2041,14 +2041,14 @@
     Tcl_Obj* (*tcl_FSGetTranslatedPath) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj* pathPtr)); /* 466 */
     int (*tcl_FSEvalFile) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * fileName)); /* 467 */
     Tcl_Obj* (*tcl_FSNewNativePath) _ANSI_ARGS_((Tcl_Obj* fromFilesystem, ClientData clientData)); /* 468 */
-    char* (*tcl_FSGetNativePath) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 469 */
+    CONST char* (*tcl_FSGetNativePath) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 469 */
     Tcl_Obj* (*tcl_FSFileSystemInfo) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 470 */
     Tcl_Obj* (*tcl_FSPathSeparator) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 471 */
     Tcl_Obj* (*tcl_FSListVolumes) _ANSI_ARGS_((void)); /* 472 */
     int (*tcl_FSRegister) _ANSI_ARGS_((ClientData clientData, Tcl_Filesystem * fsPtr)); /* 473 */
     int (*tcl_FSUnregister) _ANSI_ARGS_((Tcl_Filesystem * fsPtr)); /* 474 */
     ClientData (*tcl_FSData) _ANSI_ARGS_((Tcl_Filesystem * fsPtr)); /* 475 */
-    char* (*tcl_FSGetTranslatedStringPath) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj* pathPtr)); /* 476 */
+    CONST char* (*tcl_FSGetTranslatedStringPath) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj* pathPtr)); /* 476 */
     Tcl_Filesystem* (*tcl_FSGetFileSystemForPath) _ANSI_ARGS_((Tcl_Obj* pathObjPtr)); /* 477 */
     Tcl_PathType (*tcl_FSGetPathType) _ANSI_ARGS_((Tcl_Obj * pathObjPtr)); /* 478 */
     int (*tcl_OutputBuffered) _ANSI_ARGS_((Tcl_Channel chan)); /* 479 */
Index: generic/tclEvent.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclEvent.c,v
retrieving revision 1.17
diff -u -u -r1.17 tclEvent.c
--- generic/tclEvent.c	2002/01/07 23:09:13	1.17
+++ generic/tclEvent.c	2002/01/16 23:58:55
@@ -1050,7 +1050,7 @@
 {
     int optionIndex;
     int flags = 0;		/* Initialized to avoid compiler warning. */
-    static char *updateOptions[] = {"idletasks", (char *) NULL};
+    static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
     enum updateOptions {REGEXP_IDLETASKS};
 
     if (objc == 1) {
Index: generic/tclFCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclFCmd.c,v
retrieving revision 1.14
diff -u -u -r1.14 tclFCmd.c
--- generic/tclFCmd.c	2001/10/15 10:30:07	1.14
+++ generic/tclFCmd.c	2002/01/16 23:58:56
@@ -810,7 +810,7 @@
     Tcl_Obj *CONST objv[];	/* The command line objects. */
 {
     int result;
-    char ** attributeStrings;
+    CONST char ** attributeStrings;
     Tcl_Obj* objStrings = NULL;
     int numObjStrings = -1;
     Tcl_Obj *filePtr;
@@ -842,7 +842,8 @@
 	if (Tcl_ListObjLength(interp, objStrings, &numObjStrings) != TCL_OK) {
 	    goto end;
 	}
-	attributeStrings = (char**)ckalloc((1+numObjStrings)*sizeof(char*));
+	attributeStrings = (CONST char **)
+		ckalloc ((1+numObjStrings) * sizeof(char*));
 	for (index = 0; index < numObjStrings; index++) {
 	    Tcl_ListObjIndex(interp, objStrings, index, &objPtr);
 	    attributeStrings[index] = Tcl_GetString(objPtr);
Index: generic/tclFileName.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclFileName.c,v
retrieving revision 1.25
diff -u -u -r1.25 tclFileName.c
--- generic/tclFileName.c	2001/10/16 05:31:18	1.25
+++ generic/tclFileName.c	2002/01/16 23:58:56
@@ -1548,7 +1548,7 @@
     Tcl_Obj *typePtr, *resultPtr, *look;
     Tcl_Obj *pathOrDir = NULL;
     Tcl_DString prefix;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"-directory", "-join", "-nocomplain", "-path", "-tails", 
 	"-types", "--", NULL
     };
Index: generic/tclIO.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIO.c,v
retrieving revision 1.45
diff -u -u -r1.45 tclIO.c
--- generic/tclIO.c	2002/01/15 21:19:07	1.45
+++ generic/tclIO.c	2002/01/16 23:58:57
@@ -7148,7 +7148,7 @@
     char *chanName;
     int modeIndex;			/* Index of mode argument. */
     int mask;
-    static char *modeOptions[] = {"readable", "writable", NULL};
+    static CONST char *modeOptions[] = {"readable", "writable", NULL};
     static int maskArray[] = {TCL_READABLE, TCL_WRITABLE};
 
     if ((objc != 3) && (objc != 4)) {
Index: generic/tclIOCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIOCmd.c,v
retrieving revision 1.10
diff -u -u -r1.10 tclIOCmd.c
--- generic/tclIOCmd.c	2001/09/19 00:50:23	1.10
+++ generic/tclIOCmd.c	2002/01/16 23:58:57
@@ -429,7 +429,9 @@
     int result;				/* Of calling Tcl_Seek. */
     char *chanName;
     int optionIndex;
-    static char *originOptions[] = {"start", "current", "end", (char *) NULL};
+    static CONST char *originOptions[] = {
+	"start", "current", "end", (char *) NULL
+    };
     static int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END};
 
     if ((objc != 3) && (objc != 4)) {
@@ -736,7 +738,7 @@
     Tcl_Channel chan;
     char *argStorage[NUM_ARGS];
     int argc, background, i, index, keepNewline, result, skip, length;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"-keepnewline",	"--",		NULL
     };
     enum options {
@@ -1305,7 +1307,7 @@
     int objc;				/* Number of arguments. */
     Tcl_Obj *CONST objv[];		/* Argument objects. */
 {
-    static char *socketOptions[] = {
+    static CONST char *socketOptions[] = {
 	"-async", "-myaddr", "-myport","-server", (char *) NULL
     };
     enum socketOptions {
@@ -1500,7 +1502,7 @@
     int mode, i;
     int toRead, index;
     Tcl_Obj *cmdPtr;
-    static char* switches[] = { "-size", "-command", NULL };
+    static CONST char* switches[] = { "-size", "-command", NULL };
     enum { FcopySize, FcopyCommand };
 
     if ((objc < 3) || (objc > 7) || (objc == 4) || (objc == 6)) {
Index: generic/tclIOUtil.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIOUtil.c,v
retrieving revision 1.29
diff -u -u -r1.29 tclIOUtil.c
--- generic/tclIOUtil.c	2002/01/15 21:19:07	1.29
+++ generic/tclIOUtil.c	2002/01/16 23:58:58
@@ -70,7 +70,7 @@
  * them in tclInt.h, because they are not (and should not be) used
  * anywhere else.
  */
-extern char *			tclpFileAttrStrings[];
+extern CONST char *		tclpFileAttrStrings[];
 extern CONST TclFileAttrProcs	tclpFileAttrProcs[];
 
 /* 
@@ -141,7 +141,7 @@
 }
 
 /* Obsolete */
-char *
+CONST char *
 Tcl_GetCwd(interp, cwdPtr)
     Tcl_Interp *interp;
     Tcl_DString *cwdPtr;
@@ -1937,7 +1937,7 @@
  *----------------------------------------------------------------------
  */
 
-static char**
+static CONST char**
 NativeFileAttrStrings(pathPtr, objPtrRef)
     Tcl_Obj *pathPtr;
     Tcl_Obj** objPtrRef;
@@ -2036,7 +2036,7 @@
  *----------------------------------------------------------------------
  */
 
-char**
+CONST char **
 Tcl_FSFileAttrStrings(pathPtr, objPtrRef)
     Tcl_Obj* pathPtr;
     Tcl_Obj** objPtrRef;
@@ -3806,7 +3806,7 @@
  *
  *---------------------------------------------------------------------------
  */
-char*
+CONST char*
 Tcl_FSGetTranslatedStringPath(interp, pathPtr)
 Tcl_Interp *interp;
 Tcl_Obj* pathPtr;
@@ -4038,11 +4038,11 @@
  *---------------------------------------------------------------------------
  */
 
-char* 
+CONST char* 
 Tcl_FSGetNativePath(pathObjPtr)
     Tcl_Obj* pathObjPtr;
 {
-    return (char*)Tcl_FSGetInternalRep(pathObjPtr, &nativeFilesystem);
+    return (CONST char *)Tcl_FSGetInternalRep(pathObjPtr, &nativeFilesystem);
 }
 
 /*
Index: generic/tclIndexObj.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIndexObj.c,v
retrieving revision 1.11
diff -u -u -r1.11 tclIndexObj.c
--- generic/tclIndexObj.c	2002/01/14 15:07:39	1.11
+++ generic/tclIndexObj.c	2002/01/16 23:58:58
@@ -76,7 +76,7 @@
 Tcl_GetIndexFromObj(interp, objPtr, tablePtr, msg, flags, indexPtr)
     Tcl_Interp *interp; 	/* Used for error reporting if not NULL. */
     Tcl_Obj *objPtr;		/* Object containing the string to lookup. */
-    char * CONST *tablePtr;	/* Array of strings to compare against the
+    CONST char **tablePtr;	/* Array of strings to compare against the
 				 * value of objPtr; last entry must be NULL
 				 * and there must not be duplicate entries. */
     CONST char *msg;		/* Identifying word to use in error messages. */
@@ -135,7 +135,7 @@
 	indexPtr)
     Tcl_Interp *interp; 	/* Used for error reporting if not NULL. */
     Tcl_Obj *objPtr;		/* Object containing the string to lookup. */
-    char * CONST *tablePtr;	/* The first string in the table. The second
+    CONST char **tablePtr;	/* The first string in the table. The second
 				 * string will be at this address plus the
 				 * offset, the third plus the offset again,
 				 * etc. The last entry must be NULL
@@ -146,8 +146,9 @@
     int *indexPtr;		/* Place to store resulting integer index. */
 {
     int index, length, i, numAbbrev;
-    char *key, *p1, *p2;
-    char * CONST *entryPtr;
+    char *key, *p1;
+    CONST char *p2;
+    CONST char * CONST *entryPtr;
     Tcl_Obj *resultPtr;
 
     /*
@@ -178,7 +179,7 @@
     }
     
     for (entryPtr = tablePtr, i = 0; *entryPtr != NULL; 
-	    entryPtr = (char **) ((char *) entryPtr + offset), i++) {
+	    entryPtr = (CONST char **) ((char *)entryPtr + offset), i++) {
 	for (p1 = key, p2 = *entryPtr; *p1 == *p2; p1++, p2++) {
 	    if (*p1 == 0) {
 		index = i;
@@ -223,9 +224,10 @@
 	Tcl_AppendStringsToObj(resultPtr,
 		(numAbbrev > 1) ? "ambiguous " : "bad ", msg, " \"",
 		key, "\": must be ", *tablePtr, (char *) NULL);
-	for (entryPtr = (char **) ((char *) tablePtr + offset), count = 0;
+	for (entryPtr = (CONST char **)((char *)tablePtr + offset), count = 0;
 		*entryPtr != NULL;
-		entryPtr = (char **) ((char *) entryPtr + offset), count++) {
+		entryPtr = (CONST char **)((char *)entryPtr + offset),
+		count++) {
 	    if ((*((char **) ((char *) entryPtr + offset))) == NULL) {
 		Tcl_AppendStringsToObj(resultPtr,
 			(count > 0) ? ", or " : " or ", *entryPtr,
Index: generic/tclInterp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInterp.c,v
retrieving revision 1.9
diff -u -u -r1.9 tclInterp.c
--- generic/tclInterp.c	2002/01/16 06:02:34	1.9
+++ generic/tclInterp.c	2002/01/16 23:58:58
@@ -347,7 +347,7 @@
     Tcl_Obj *CONST objv[];		/* Argument objects. */
 {
     int index;
-    static char *options[] = {
+    static CONST char *options[] = {
         "alias",	"aliases",	"create",	"delete", 
 	"eval",		"exists",	"expose",	"hide", 
 	"hidden",	"issafe",	"invokehidden",	"marktrusted", 
@@ -419,7 +419,7 @@
 	    int i, last, safe;
 	    Tcl_Obj *slavePtr;
 	    char buf[16 + TCL_INTEGER_SPACE];
-	    static char *options[] = {
+	    static CONST char *options[] = {
 		"-safe",	"--",		NULL
 	    };
 	    enum option {
@@ -582,7 +582,7 @@
 	case OPT_INVOKEHID: {
 	    int i, index, global;
 	    Tcl_Interp *slaveInterp;
-	    static char *hiddenOptions[] = {
+	    static CONST char *hiddenOptions[] = {
 		"-global",	"--",		NULL
 	    };
 	    enum hiddenOption {
@@ -1829,7 +1829,7 @@
 {
     Tcl_Interp *slaveInterp;
     int index;
-    static char *options[] = {
+    static CONST char *options[] = {
         "alias",	"aliases",	"eval",		"expose",
         "hide",		"hidden",	"issafe",	"invokehidden",
         "marktrusted",	NULL
@@ -1918,7 +1918,7 @@
 	}
         case OPT_INVOKEHIDDEN: {
 	    int global, i, index;
-	    static char *hiddenOptions[] = {
+	    static CONST char *hiddenOptions[] = {
 		"-global",	"--",		NULL
 	    };
 	    enum hiddenOption {
Index: generic/tclNamesp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclNamesp.c,v
retrieving revision 1.25
diff -u -u -r1.25 tclNamesp.c
--- generic/tclNamesp.c	2001/06/28 12:43:33	1.25
+++ generic/tclNamesp.c	2002/01/16 23:58:59
@@ -2464,7 +2464,7 @@
     register int objc;			/* Number of arguments. */
     register Tcl_Obj *CONST objv[];	/* Argument objects. */
 {
-    static char *subCmds[] = {
+    static CONST char *subCmds[] = {
 	"children", "code", "current", "delete",
 	"eval", "exists", "export", "forget", "import",
 	"inscope", "origin", "parent", "qualifiers",
Index: generic/tclPkg.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclPkg.c,v
retrieving revision 1.7
diff -u -u -r1.7 tclPkg.c
--- generic/tclPkg.c	2001/08/06 19:13:29	1.7
+++ generic/tclPkg.c	2002/01/16 23:58:59
@@ -470,7 +470,7 @@
     int objc;				/* Number of arguments. */
     Tcl_Obj *CONST objv[];	/* Argument objects. */
 {
-    static char *pkgOptions[] = {
+    static CONST char *pkgOptions[] = {
 	"forget", "ifneeded", "names", "present", "provide", "require",
 	"unknown", "vcompare", "versions", "vsatisfies", (char *) NULL
     };
Index: generic/tclTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclTest.c,v
retrieving revision 1.37
diff -u -u -r1.37 tclTest.c
--- generic/tclTest.c	2002/01/15 21:19:07	1.37
+++ generic/tclTest.c	2002/01/16 23:59:00
@@ -427,7 +427,7 @@
     Tcl_Obj *listPtr;
     Tcl_Obj **objv;
     int objc, index;
-    static char *specialOptions[] = {
+    static CONST char *specialOptions[] = {
 	"-appinitprocerror", "-appinitprocdeleteinterp",
 	"-appinitprocclosestderr", "-appinitprocsetrcfile", (char *) NULL
     };
@@ -1496,7 +1496,7 @@
     int index, length;
     char *string;
     TclEncoding *encodingPtr;
-    static char *optionStrings[] = {
+    static CONST char *optionStrings[] = {
 	"create",	"delete",	"path",
 	NULL
     };
@@ -1945,7 +1945,7 @@
     int argc;				/* Number of arguments. */
     char **argv;			/* Argument strings. */
 {
-    static char *platformStrings[] = { "unix", "mac", "windows" };
+    static CONST char *platformStrings[] = { "unix", "mac", "windows" };
     TclPlatformType *platform;
 
 #ifdef __WIN32__
@@ -2204,7 +2204,7 @@
     int index;
     char *locale;
 
-    static char *optionStrings[] = {
+    static CONST char *optionStrings[] = {
     	"ctype", "numeric", "time", "collate", "monetary", 
 	"all",	NULL
     };
@@ -2702,7 +2702,7 @@
     char *string;
     Tcl_Obj *objPtr;
     Tcl_RegExpInfo info;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"-indices",	"-nocase",	"-about",	"-expanded",
 	"-line",	"-linestop",	"-lineanchor",
 	"-xflags",
@@ -3966,7 +3966,7 @@
     int discard, result, index;
     Tcl_SavedResult state;
     Tcl_Obj *objPtr;
-    static char *optionStrings[] = {
+    static CONST char *optionStrings[] = {
 	"append", "dynamic", "free", "object", "small", NULL
     };
     enum options {
@@ -5317,7 +5317,9 @@
     int objc;				/* Number of arguments. */
     Tcl_Obj *CONST objv[];		/* Argument objects. */
 {
-    char *ary[] = { "a", "b", "c", "d", "e", "f", (char *)NULL,(char *)NULL };
+    CONST char *ary[] = {
+	"a", "b", "c", "d", "e", "f", (char *)NULL,(char *)NULL
+    };
     int idx,target;
 
     if (objc != 3) {
@@ -5632,7 +5634,7 @@
     return Tcl_FSRemoveDirectory(TestReportGetNativePath(path), recursive, 
 				 errorPtr);
 }
-static char**
+static CONST char**
 TestReportFileAttrStrings(fileName, objPtrRef)
     Tcl_Obj* fileName;
     Tcl_Obj** objPtrRef;
Index: generic/tclTestObj.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclTestObj.c,v
retrieving revision 1.8
diff -u -u -r1.8 tclTestObj.c
--- generic/tclTestObj.c	2001/11/14 23:17:04	1.8
+++ generic/tclTestObj.c	2002/01/16 23:59:00
@@ -404,8 +404,8 @@
     Tcl_Obj *CONST objv[];	/* Argument objects. */
 {
     int allowAbbrev, index, index2, setError, i, result;
-    char **argv;
-    static char *tablePtr[] = {"a", "b", "check", (char *) NULL};
+    CONST char **argv;
+    static CONST char *tablePtr[] = {"a", "b", "check", (char *) NULL};
 
     if ((objc == 3) && (strcmp(Tcl_GetString(objv[1]),
 	    "check") == 0)) {
@@ -442,7 +442,7 @@
 	return TCL_ERROR;
     }
 
-    argv = (char **) ckalloc((unsigned) ((objc-3) * sizeof(char *)));
+    argv = (CONST char **) ckalloc((unsigned) ((objc-3) * sizeof(char *)));
     for (i = 4; i < objc; i++) {
 	argv[i-4] = Tcl_GetString(objv[i]);
     }
@@ -895,7 +895,7 @@
 #define MAX_STRINGS 11
     char *index, *string, *strings[MAX_STRINGS+1];
     TestString *strPtr;
-    static char *options[] = {
+    static CONST char *options[] = {
 	"append", "appendstrings", "get", "get2", "length", "length2",
 	"set", "set2", "setlength", "ualloc", (char *) NULL
     };
Index: generic/tclTimer.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclTimer.c,v
retrieving revision 1.4
diff -u -u -r1.4 tclTimer.c
--- generic/tclTimer.c	2001/11/21 02:36:20	1.4
+++ generic/tclTimer.c	2002/01/16 23:59:00
@@ -735,7 +735,9 @@
     char *argString;
     int index;
     char buf[16 + TCL_INTEGER_SPACE];
-    static char *afterSubCmds[] = {"cancel", "idle", "info", (char *) NULL};
+    static CONST char *afterSubCmds[] = {
+	"cancel", "idle", "info", (char *) NULL
+    };
     enum afterSubCmds {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO};
     ThreadSpecificData *tsdPtr = InitTimer();
 
Index: generic/tclVar.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclVar.c,v
retrieving revision 1.44
diff -u -u -r1.44 tclVar.c
--- generic/tclVar.c	2001/12/07 13:55:59	1.44
+++ generic/tclVar.c	2002/01/16 23:59:01
@@ -3152,7 +3152,7 @@
     enum {ARRAY_ANYMORE, ARRAY_DONESEARCH,  ARRAY_EXISTS, ARRAY_GET,
 	  ARRAY_NAMES, ARRAY_NEXTELEMENT, ARRAY_SET, ARRAY_SIZE,
 	  ARRAY_STARTSEARCH, ARRAY_STATISTICS, ARRAY_UNSET}; 
-    static char *arrayOptions[] = {
+    static CONST char *arrayOptions[] = {
 	"anymore", "donesearch", "exists", "get", "names", "nextelement",
 	"set", "size", "startsearch", "statistics", "unset", (char *) NULL
     };
@@ -3418,7 +3418,7 @@
 	    char *name;
 	    Tcl_Obj *namePtr;
 	    int mode, matched = 0;
-	    static char *options[] = {
+	    static CONST char *options[] = {
 		"-exact", "-glob", "-regexp", (char *) NULL
 	    };
 	    enum options { OPT_EXACT, OPT_GLOB, OPT_REGEXP };
Index: mac/tclMacFCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/mac/tclMacFCmd.c,v
retrieving revision 1.11
diff -u -u -r1.11 tclMacFCmd.c
--- mac/tclMacFCmd.c	2001/11/23 01:27:29	1.11
+++ mac/tclMacFCmd.c	2002/01/16 23:59:02
@@ -57,7 +57,7 @@
  * Global variables for the file attributes code.
  */
 
-char *tclpFileAttrStrings[] = {"-creator", "-hidden", "-readonly",
+CONST char *tclpFileAttrStrings[] = {"-creator", "-hidden", "-readonly",
 	"-type", (char *) NULL};
 CONST TclFileAttrProcs tclpFileAttrProcs[] = {
 	{GetFileFinderAttributes, SetFileFinderAttributes},
Index: unix/tclUnixChan.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixChan.c,v
retrieving revision 1.25
diff -u -u -r1.25 tclUnixChan.c
--- unix/tclUnixChan.c	2002/01/15 21:19:07	1.25
+++ unix/tclUnixChan.c	2002/01/16 23:59:02
@@ -1307,7 +1307,7 @@
 {
     int fd, seekFlag, mode, channelPermissions;
     FileState *fsPtr;
-    char *native, *translation;
+    CONST char *native, *translation;
     char channelName[16 + TCL_INTEGER_SPACE];
     Tcl_ChannelType *channelTypePtr;
 #ifdef DEPRECATED
Index: unix/tclUnixFCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixFCmd.c,v
retrieving revision 1.13
diff -u -u -r1.13 tclUnixFCmd.c
--- unix/tclUnixFCmd.c	2001/09/28 11:10:56	1.13
+++ unix/tclUnixFCmd.c	2002/01/16 23:59:03
@@ -110,7 +110,7 @@
     UNIX_PERMISSIONS_ATTRIBUTE
 };
 
-char *tclpFileAttrStrings[] = {
+CONST char *tclpFileAttrStrings[] = {
     "-group",
     "-owner",
     "-permissions",
Index: unix/tclUnixFile.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixFile.c,v
retrieving revision 1.13
diff -u -u -r1.13 tclUnixFile.c
--- unix/tclUnixFile.c	2001/10/29 14:25:03	1.13
+++ unix/tclUnixFile.c	2002/01/16 23:59:03
@@ -496,7 +496,7 @@
     Tcl_Obj *pathPtr;        /* Path of file to access */
     int mode;                /* Permission setting. */
 {
-    char *path = Tcl_FSGetNativePath(pathPtr);
+    CONST char *path = Tcl_FSGetNativePath(pathPtr);
     if (path == NULL) {
 	return -1;
     } else {
@@ -524,7 +524,7 @@
 TclpObjChdir(pathPtr)
     Tcl_Obj *pathPtr;          /* Path to new working directory */
 {
-    char *path = Tcl_FSGetNativePath(pathPtr);
+    CONST char *path = Tcl_FSGetNativePath(pathPtr);
     if (path == NULL) {
 	return -1;
     } else {
@@ -553,7 +553,7 @@
     Tcl_Obj *pathPtr;		/* Path of file to stat */
     struct stat *bufPtr;	/* Filled with results of stat call. */
 {
-    char *path = Tcl_FSGetNativePath(pathPtr);
+    CONST char *path = Tcl_FSGetNativePath(pathPtr);
     if (path == NULL) {
 	return -1;
     } else {
@@ -685,7 +685,7 @@
     Tcl_Obj *pathPtr;		/* Path of file to stat */
     struct stat *bufPtr;	/* Filled with results of stat call. */
 {
-    char *path = Tcl_FSGetNativePath(pathPtr);
+    CONST char *path = Tcl_FSGetNativePath(pathPtr);
     if (path == NULL) {
 	return -1;
     } else {
Index: win/tclWinFCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinFCmd.c,v
retrieving revision 1.17
diff -u -u -r1.17 tclWinFCmd.c
--- win/tclWinFCmd.c	2001/11/28 03:19:08	1.17
+++ win/tclWinFCmd.c	2002/01/16 23:59:03
@@ -60,12 +60,12 @@
 	0, FILE_ATTRIBUTE_READONLY, 0, FILE_ATTRIBUTE_SYSTEM};
 
 
-char *tclpFileAttrStrings[] = {
+CONST char *tclpFileAttrStrings[] = {
 	"-archive", "-hidden", "-longname", "-readonly",
 	"-shortname", "-system", (char *) NULL
 };
 
-const TclFileAttrProcs tclpFileAttrProcs[] = {
+CONST TclFileAttrProcs tclpFileAttrProcs[] = {
 	{GetWinFileAttributes, SetWinFileAttributes},
 	{GetWinFileAttributes, SetWinFileAttributes},
 	{GetWinFileLongName, CannotSetAttribute},