Index: doc/Concat.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/Concat.3,v
retrieving revision 1.2
diff -u -r1.2 Concat.3
--- doc/Concat.3	1998/09/14 18:39:46	1.2
+++ doc/Concat.3	2001/09/24 20:17:04
@@ -21,7 +21,7 @@
 .SH ARGUMENTS
 .AP int argc in
 Number of strings.
-.AP char *argv[] in
+.AP "char * CONST" argv[] in
 Array of strings to concatenate.  Must have \fIargc\fR entries.
 .BE
 
Index: doc/DString.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/DString.3,v
retrieving revision 1.5
diff -u -r1.5 DString.3
--- doc/DString.3	2000/04/14 23:01:50	1.5
+++ doc/DString.3	2001/09/24 20:17:04
@@ -18,10 +18,10 @@
 .sp
 \fBTcl_DStringInit\fR(\fIdsPtr\fR)
 .sp
-char *
+CONST char *
 \fBTcl_DStringAppend\fR(\fIdsPtr, string, length\fR)
 .sp
-char *
+CONST char *
 \fBTcl_DStringAppendElement\fR(\fIdsPtr, string\fR)
 .sp
 \fBTcl_DStringStartSublist\fR(\fIdsPtr\fR)
Index: doc/SplitList.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/SplitList.3,v
retrieving revision 1.4
diff -u -r1.4 SplitList.3
--- doc/SplitList.3	2000/07/24 00:03:02	1.4
+++ doc/SplitList.3	2001/09/24 20:17:05
@@ -49,10 +49,10 @@
 a NULL entry.
 .AP int argc in
 Number of elements in \fIargv\fR.
-.AP char **argv in
+.AP "char * CONST" *argv in
 Array of strings to merge together into a single list.
 Each string will become a separate element of the list.
-.AP char *src in
+.AP "CONST char" *src in
 String that is to become an element of a list.
 .AP int *flagsPtr in
 Pointer to word to fill in with information about \fIsrc\fR.
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.58
diff -u -r1.58 tcl.decls
--- generic/tcl.decls	2001/09/13 11:56:19	1.58
+++ generic/tcl.decls	2001/09/24 20:17:06
@@ -306,7 +306,7 @@
     int Tcl_CommandComplete(char *cmd)
 }
 declare 83 generic {
-    char * Tcl_Concat(int argc, char **argv)
+    char * Tcl_Concat(int argc, char * CONST *argv)
 }
 declare 84 generic {
     int Tcl_ConvertElement(CONST char *src, char *dst, int flags)
@@ -430,10 +430,12 @@
     void Tcl_DoWhenIdle(Tcl_IdleProc *proc, ClientData clientData)
 }
 declare 117 generic {
-    char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *str, int length)
+    CONST char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *str, \
+	    int length)
 }
 declare 118 generic {
-    char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, CONST char *string)
+    CONST char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, \
+	    CONST char *string)
 }
 declare 119 generic {
     void Tcl_DStringEndSublist(Tcl_DString *dsPtr)
@@ -680,7 +682,7 @@
     Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket)
 }
 declare 192 generic {
-    char * Tcl_Merge(int argc, char **argv)
+    char * Tcl_Merge(int argc, char * CONST *argv)
 }
 declare 193 generic {
     Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr)
Index: generic/tclDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclDecls.h,v
retrieving revision 1.58
diff -u -r1.58 tclDecls.h
--- generic/tclDecls.h	2001/09/13 11:56:19	1.58
+++ generic/tclDecls.h	2001/09/24 20:17:08
@@ -273,7 +273,8 @@
 /* 82 */
 EXTERN int		Tcl_CommandComplete _ANSI_ARGS_((char * cmd));
 /* 83 */
-EXTERN char *		Tcl_Concat _ANSI_ARGS_((int argc, char ** argv));
+EXTERN char *		Tcl_Concat _ANSI_ARGS_((int argc, 
+				char * CONST * argv));
 /* 84 */
 EXTERN int		Tcl_ConvertElement _ANSI_ARGS_((CONST char * src, 
 				char * dst, int flags));
@@ -400,10 +401,10 @@
 EXTERN void		Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc * proc, 
 				ClientData clientData));
 /* 117 */
-EXTERN char *		Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr, 
+EXTERN CONST char *	Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr, 
 				CONST char * str, int length));
 /* 118 */
-EXTERN char *		Tcl_DStringAppendElement _ANSI_ARGS_((
+EXTERN CONST char *	Tcl_DStringAppendElement _ANSI_ARGS_((
 				Tcl_DString * dsPtr, CONST char * string));
 /* 119 */
 EXTERN void		Tcl_DStringEndSublist _ANSI_ARGS_((
@@ -611,7 +612,7 @@
 EXTERN Tcl_Channel	Tcl_MakeTcpClientChannel _ANSI_ARGS_((
 				ClientData tcpSocket));
 /* 192 */
-EXTERN char *		Tcl_Merge _ANSI_ARGS_((int argc, char ** argv));
+EXTERN char *		Tcl_Merge _ANSI_ARGS_((int argc, char * CONST * argv));
 /* 193 */
 EXTERN Tcl_HashEntry *	Tcl_NextHashEntry _ANSI_ARGS_((
 				Tcl_HashSearch * searchPtr));
@@ -1614,7 +1615,7 @@
     void (*tcl_CancelIdleCall) _ANSI_ARGS_((Tcl_IdleProc * idleProc, ClientData clientData)); /* 80 */
     int (*tcl_Close) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 81 */
     int (*tcl_CommandComplete) _ANSI_ARGS_((char * cmd)); /* 82 */
-    char * (*tcl_Concat) _ANSI_ARGS_((int argc, char ** argv)); /* 83 */
+    char * (*tcl_Concat) _ANSI_ARGS_((int argc, char * CONST * argv)); /* 83 */
     int (*tcl_ConvertElement) _ANSI_ARGS_((CONST char * src, char * dst, int flags)); /* 84 */
     int (*tcl_ConvertCountedElement) _ANSI_ARGS_((CONST char * src, int length, char * dst, int flags)); /* 85 */
     int (*tcl_CreateAlias) _ANSI_ARGS_((Tcl_Interp * slave, char * slaveCmd, Tcl_Interp * target, char * targetCmd, int argc, char ** argv)); /* 86 */
@@ -1656,8 +1657,8 @@
     void (*tcl_DontCallWhenDeleted) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 114 */
     int (*tcl_DoOneEvent) _ANSI_ARGS_((int flags)); /* 115 */
     void (*tcl_DoWhenIdle) _ANSI_ARGS_((Tcl_IdleProc * proc, ClientData clientData)); /* 116 */
-    char * (*tcl_DStringAppend) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * str, int length)); /* 117 */
-    char * (*tcl_DStringAppendElement) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * string)); /* 118 */
+    CONST char * (*tcl_DStringAppend) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * str, int length)); /* 117 */
+    CONST char * (*tcl_DStringAppendElement) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * string)); /* 118 */
     void (*tcl_DStringEndSublist) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 119 */
     void (*tcl_DStringFree) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 120 */
     void (*tcl_DStringGetResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * dsPtr)); /* 121 */
@@ -1739,7 +1740,7 @@
     Tcl_Channel (*tcl_MakeFileChannel) _ANSI_ARGS_((ClientData handle, int mode)); /* 189 */
     int (*tcl_MakeSafe) _ANSI_ARGS_((Tcl_Interp * interp)); /* 190 */
     Tcl_Channel (*tcl_MakeTcpClientChannel) _ANSI_ARGS_((ClientData tcpSocket)); /* 191 */
-    char * (*tcl_Merge) _ANSI_ARGS_((int argc, char ** argv)); /* 192 */
+    char * (*tcl_Merge) _ANSI_ARGS_((int argc, char * CONST * argv)); /* 192 */
     Tcl_HashEntry * (*tcl_NextHashEntry) _ANSI_ARGS_((Tcl_HashSearch * searchPtr)); /* 193 */
     void (*tcl_NotifyChannel) _ANSI_ARGS_((Tcl_Channel channel, int mask)); /* 194 */
     Tcl_Obj * (*tcl_ObjGetVar2) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags)); /* 195 */
Index: generic/tclEncoding.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclEncoding.c,v
retrieving revision 1.7
diff -u -r1.7 tclEncoding.c
--- generic/tclEncoding.c	2001/07/31 19:12:06	1.7
+++ generic/tclEncoding.c	2001/09/24 20:17:09
@@ -1282,7 +1282,7 @@
 {
     char *argv[3];
     Tcl_DString pathString;
-    char *path;
+    CONST char *path;
     Tcl_Channel chan;
     Tcl_Obj *pathPtr;
     
Index: generic/tclInt.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.decls,v
retrieving revision 1.31
diff -u -r1.31 tclInt.decls
--- generic/tclInt.decls	2001/09/10 17:17:41	1.31
+++ generic/tclInt.decls	2001/09/24 20:17:10
@@ -243,7 +243,7 @@
 #	    Tcl_DString *dirPtr, char *pattern, char *tail)
 #}
 declare 60 generic {
-    int TclNeedSpace(char *start, char *end)
+    int TclNeedSpace(CONST char *start, CONST char *end)
 }
 declare 61 generic {
     Tcl_Obj * TclNewProcBodyObj(Proc *procPtr)
@@ -532,7 +532,7 @@
 #	    Tcl_PackageInitProc **proc2Ptr, ClientData *clientDataPtr)
 #}
 declare 140 generic {
-    int TclLooksLikeInt(char *bytes, int length)
+    int TclLooksLikeInt(CONST char *bytes, int length)
 }
 # This is used by TclX, but should otherwise be considered private
 declare 141 generic {
Index: generic/tclInt.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.h,v
retrieving revision 1.64
diff -u -r1.64 tclInt.h
--- generic/tclInt.h	2001/09/08 14:05:09	1.64
+++ generic/tclInt.h	2001/09/24 20:17:11
@@ -1617,7 +1617,7 @@
 EXTERN int		TclArraySet _ANSI_ARGS_((Tcl_Interp *interp,
 			    Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj));
 EXTERN int		TclCheckBadOctal _ANSI_ARGS_((Tcl_Interp *interp,
-			    char *value));
+			    CONST char *value));
 EXTERN int		TclCleanupChildren _ANSI_ARGS_((Tcl_Interp *interp,
 			    int numPids, Tcl_Pid *pidPtr,
 			    Tcl_Channel errorChan));
@@ -1753,7 +1753,6 @@
 			    int createPart1, int createPart2,
 			    Var **arrayPtrPtr));
 EXTERN int		TclMathInProgress _ANSI_ARGS_((void));
-EXTERN int		TclNeedSpace _ANSI_ARGS_((char *start, char *end));
 EXTERN Tcl_Obj *	TclNewProcBodyObj _ANSI_ARGS_((Proc *procPtr));
 EXTERN int		TclObjCommandComplete _ANSI_ARGS_((Tcl_Obj *cmdPtr));
 EXTERN int		TclObjInterpProc _ANSI_ARGS_((ClientData clientData,
Index: generic/tclIntDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIntDecls.h,v
retrieving revision 1.26
diff -u -r1.26 tclIntDecls.h
--- generic/tclIntDecls.h	2001/08/30 08:53:14	1.26
+++ generic/tclIntDecls.h	2001/09/24 20:17:12
@@ -214,7 +214,8 @@
 				Var ** arrayPtrPtr));
 /* Slot 59 is reserved */
 /* 60 */
-EXTERN int		TclNeedSpace _ANSI_ARGS_((char * start, char * end));
+EXTERN int		TclNeedSpace _ANSI_ARGS_((CONST char * start, 
+				CONST char * end));
 /* 61 */
 EXTERN Tcl_Obj *	TclNewProcBodyObj _ANSI_ARGS_((Proc * procPtr));
 /* 62 */
@@ -429,7 +430,7 @@
 				Tcl_DString * valuePtr));
 /* Slot 139 is reserved */
 /* 140 */
-EXTERN int		TclLooksLikeInt _ANSI_ARGS_((char * bytes, 
+EXTERN int		TclLooksLikeInt _ANSI_ARGS_((CONST char * bytes, 
 				int length));
 /* 141 */
 EXTERN char *		TclpGetCwd _ANSI_ARGS_((Tcl_Interp * interp, 
@@ -569,7 +570,7 @@
     void *reserved57;
     Var * (*tclLookupVar) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags, char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr)); /* 58 */
     void *reserved59;
-    int (*tclNeedSpace) _ANSI_ARGS_((char * start, char * end)); /* 60 */
+    int (*tclNeedSpace) _ANSI_ARGS_((CONST char * start, CONST char * end)); /* 60 */
     Tcl_Obj * (*tclNewProcBodyObj) _ANSI_ARGS_((Proc * procPtr)); /* 61 */
     int (*tclObjCommandComplete) _ANSI_ARGS_((Tcl_Obj * cmdPtr)); /* 62 */
     int (*tclObjInterpProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 63 */
@@ -665,7 +666,7 @@
     void *reserved137;
     char * (*tclGetEnv) _ANSI_ARGS_((CONST char * name, Tcl_DString * valuePtr)); /* 138 */
     void *reserved139;
-    int (*tclLooksLikeInt) _ANSI_ARGS_((char * bytes, int length)); /* 140 */
+    int (*tclLooksLikeInt) _ANSI_ARGS_((CONST char * bytes, int length)); /* 140 */
     char * (*tclpGetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 141 */
     int (*tclSetByteCodeFromAny) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData)); /* 142 */
     int (*tclAddLiteralObj) _ANSI_ARGS_((struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr)); /* 143 */
Index: generic/tclMain.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclMain.c,v
retrieving revision 1.12
diff -u -r1.12 tclMain.c
--- generic/tclMain.c	2001/04/04 23:26:03	1.12
+++ generic/tclMain.c	2001/09/24 20:17:12
@@ -459,7 +459,8 @@
 
     (void) Tcl_DStringAppend(&tsdPtr->command, Tcl_DStringValue(
             &tsdPtr->line), -1);
-    cmd = Tcl_DStringAppend(&tsdPtr->command, "\n", -1);
+    Tcl_DStringAppend(&tsdPtr->command, "\n", -1);
+    cmd = Tcl_DStringValue(&tsdPtr->command);
     Tcl_DStringFree(&tsdPtr->line);
     if (!Tcl_CommandComplete(cmd)) {
         gotPartial = 1;
Index: generic/tclUtil.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclUtil.c,v
retrieving revision 1.23
diff -u -r1.23 tclUtil.c
--- generic/tclUtil.c	2001/09/19 08:52:46	1.23
+++ generic/tclUtil.c	2001/09/24 20:17:14
@@ -318,11 +318,11 @@
  *	Copy a string and eliminate any backslashes that aren't in braces.
  *
  * Results:
- *	There is no return value. Count characters get copied from src to
- *	dst. Along the way, if backslash sequences are found outside braces,
- *	the backslashes are eliminated in the copy. After scanning count
- *	chars from source, a null character is placed at the end of dst.
- *	Returns the number of characters that got copied.
+ *	Count characters get copied from src to	dst. Along the way, if
+ *	backslash sequences are found outside braces, the backslashes are
+ *	eliminated in the copy. After scanning count chars from source, a
+ *	null character is placed at the end of dst.  Returns the number
+ *	of characters that got copied.
  *
  * Side effects:
  *	None.
@@ -822,7 +822,7 @@
 char *
 Tcl_Merge(argc, argv)
     int argc;			/* How many strings to merge. */
-    char **argv;		/* Array of string values. */
+    char * CONST *argv;		/* Array of string values. */
 {
 #   define LOCAL_SIZE 20
     int localFlags[LOCAL_SIZE], *flagPtr;
@@ -925,7 +925,7 @@
 char *
 Tcl_Concat(argc, argv)
     int argc;			/* Number of strings to concatenate. */
-    char **argv;		/* Array of strings to concatenate. */
+    char * CONST *argv;		/* Array of strings to concatenate. */
 {
     int totalSize, i;
     char *p;
@@ -940,7 +940,7 @@
 	return result;
     }
     for (p = result, i = 0; i < argc; i++) {
-	char *element;
+	CONST char *element;
 	int length;
 
 	/*
@@ -1373,7 +1373,7 @@
  *----------------------------------------------------------------------
  */
 
-char *
+CONST char *
 Tcl_DStringAppend(dsPtr, string, length)
     Tcl_DString *dsPtr;		/* Structure describing dynamic string. */
     CONST char *string;		/* String to append.  If length is -1 then
@@ -1444,7 +1444,7 @@
  *----------------------------------------------------------------------
  */
 
-char *
+CONST char *
 Tcl_DStringAppendElement(dsPtr, string)
     Tcl_DString *dsPtr;		/* Structure describing dynamic string. */
     CONST char *string;		/* String to append.  Must be
@@ -1927,8 +1927,8 @@
 
 int
 TclNeedSpace(start, end)
-    char *start;		/* First character in string. */
-    char *end;			/* End of string (place where space will
+    CONST char *start;		/* First character in string. */
+    CONST char *end;			/* End of string (place where space will
 				 * be added, if appropriate). */
 {
     Tcl_UniChar ch;
@@ -2079,13 +2079,13 @@
 
 int
 TclLooksLikeInt(bytes, length)
-    register char *bytes;	/* Points to first byte of the string. */
+    register CONST char *bytes;	/* Points to first byte of the string. */
     int length;			/* Number of bytes in the string. If < 0
 				 * bytes up to the first null byte are
 				 * considered (if they may appear in an 
 				 * integer). */
 {
-    register char *p, *end;
+    register CONST char *p, *end;
 
     if (length < 0) {
 	length = (bytes? strlen(bytes) : 0);
@@ -2222,9 +2222,9 @@
     Tcl_Interp *interp;		/* Interpreter to use for error reporting. 
 				 * If NULL, then no error message is left
 				 * after errors. */
-    char *value;		/* String to check. */
+    CONST char *value;		/* String to check. */
 {
-    register char *p = value;
+    register CONST char *p = value;
 
     /*
      * A frequent mistake is invalid octal values due to an unwanted
Index: unix/tclLoadDl.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclLoadDl.c,v
retrieving revision 1.5
diff -u -r1.5 tclLoadDl.c
--- unix/tclLoadDl.c	2001/09/04 18:06:34	1.5
+++ unix/tclLoadDl.c	2001/09/24 20:17:14
@@ -77,7 +77,7 @@
 {
     VOID *handle;
     Tcl_DString newName, ds;
-    char *native;
+    CONST char *native;
 
     native = Tcl_FSGetNativePath(pathPtr);
     handle = dlopen(native, RTLD_NOW | RTLD_GLOBAL);	/* INTL: Native. */
