summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls20
-rw-r--r--generic/tcl.h4
-rw-r--r--generic/tclDecls.h36
-rw-r--r--generic/tclIO.c11
-rw-r--r--generic/tclIOUtil.c16
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclInt.h8
-rw-r--r--generic/tclIntDecls.h6
-rw-r--r--generic/tclPipe.c8
-rw-r--r--generic/tclPosixStr.c10
-rw-r--r--generic/tclTest.c42
11 files changed, 87 insertions, 78 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 72d3875..db6a7ed 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tcl.decls,v 1.70 2002/01/15 17:55:29 dgp Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.71 2002/01/15 21:19:06 dgp Exp $
library tcl
@@ -462,17 +462,17 @@ declare 126 generic {
int Tcl_Eof(Tcl_Channel chan)
}
declare 127 generic {
- char * Tcl_ErrnoId(void)
+ CONST char * Tcl_ErrnoId(void)
}
declare 128 generic {
- char * Tcl_ErrnoMsg(int err)
+ CONST char * Tcl_ErrnoMsg(int err)
}
declare 129 generic {
int Tcl_Eval(Tcl_Interp *interp, char *string)
}
# This is obsolete, use Tcl_FSEvalFile
declare 130 generic {
- int Tcl_EvalFile(Tcl_Interp *interp, char *fileName)
+ int Tcl_EvalFile(Tcl_Interp *interp, CONST char *fileName)
}
declare 131 generic {
int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
@@ -704,8 +704,8 @@ declare 197 {unix win} {
}
# This is obsolete, use Tcl_FSOpenFileChannel
declare 198 generic {
- Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp, char *fileName, \
- char *modeString, int permissions)
+ Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp, CONST char *fileName, \
+ CONST char *modeString, int permissions)
}
declare 199 generic {
Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port, \
@@ -725,7 +725,7 @@ declare 203 generic {
int Tcl_PutEnv(CONST char *string)
}
declare 204 generic {
- char * Tcl_PosixError(Tcl_Interp *interp)
+ CONST char * Tcl_PosixError(Tcl_Interp *interp)
}
declare 205 generic {
void Tcl_QueueEvent(Tcl_Event *evPtr, Tcl_QueuePosition position)
@@ -838,10 +838,10 @@ declare 238 generic {
char *newValue, int flags)
}
declare 239 generic {
- char * Tcl_SignalId(int sig)
+ CONST char * Tcl_SignalId(int sig)
}
declare 240 generic {
- char * Tcl_SignalMsg(int sig)
+ CONST char * Tcl_SignalMsg(int sig)
}
declare 241 generic {
void Tcl_SourceRCFile(Tcl_Interp *interp)
@@ -1609,7 +1609,7 @@ declare 455 generic {
}
declare 456 generic {
Tcl_Channel Tcl_FSOpenFileChannel(Tcl_Interp *interp, Tcl_Obj *pathPtr, \
- char *modeString, int permissions)
+ CONST char *modeString, int permissions)
}
declare 457 generic {
Tcl_Obj* Tcl_FSGetCwd(Tcl_Interp *interp)
diff --git a/generic/tcl.h b/generic/tcl.h
index b4a8d6e..9c8a1ab 100644
--- a/generic/tcl.h
+++ b/generic/tcl.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: tcl.h,v 1.108 2002/01/15 17:55:29 dgp Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.109 2002/01/15 21:19:07 dgp Exp $
*/
#ifndef _TCL
@@ -1501,7 +1501,7 @@ typedef int (Tcl_FSStatProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, struct stat *buf));
typedef int (Tcl_FSAccessProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, int mode));
typedef Tcl_Channel (Tcl_FSOpenFileChannelProc)
_ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *pathPtr,
- char *modeString, int permissions));
+ CONST char *modeString, int permissions));
typedef int (Tcl_FSMatchInDirectoryProc) _ANSI_ARGS_((Tcl_Interp* interp,
Tcl_Obj *result, Tcl_Obj *pathPtr, char *pattern,
Tcl_GlobTypeData * types));
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 02a50cb..c65f298 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.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: tclDecls.h,v 1.70 2002/01/15 17:55:29 dgp Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.71 2002/01/15 21:19:07 dgp Exp $
*/
#ifndef _TCLDECLS
@@ -429,15 +429,15 @@ EXTERN void Tcl_DStringStartSublist _ANSI_ARGS_((
/* 126 */
EXTERN int Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
/* 127 */
-EXTERN char * Tcl_ErrnoId _ANSI_ARGS_((void));
+EXTERN CONST char * Tcl_ErrnoId _ANSI_ARGS_((void));
/* 128 */
-EXTERN char * Tcl_ErrnoMsg _ANSI_ARGS_((int err));
+EXTERN CONST char * Tcl_ErrnoMsg _ANSI_ARGS_((int err));
/* 129 */
EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp * interp,
char * string));
/* 130 */
EXTERN int Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp * interp,
- char * fileName));
+ CONST char * fileName));
/* 131 */
EXTERN int Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Obj * objPtr));
@@ -642,8 +642,8 @@ EXTERN Tcl_Channel Tcl_OpenCommandChannel _ANSI_ARGS_((
#endif /* __WIN32__ */
/* 198 */
EXTERN Tcl_Channel Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp * interp,
- char * fileName, char * modeString,
- int permissions));
+ CONST char * fileName,
+ CONST char * modeString, int permissions));
/* 199 */
EXTERN Tcl_Channel Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp * interp,
int port, char * address, char * myaddr,
@@ -661,7 +661,7 @@ EXTERN void Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp * interp,
/* 203 */
EXTERN int Tcl_PutEnv _ANSI_ARGS_((CONST char * string));
/* 204 */
-EXTERN char * Tcl_PosixError _ANSI_ARGS_((Tcl_Interp * interp));
+EXTERN CONST char * Tcl_PosixError _ANSI_ARGS_((Tcl_Interp * interp));
/* 205 */
EXTERN void Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event * evPtr,
Tcl_QueuePosition position));
@@ -769,9 +769,9 @@ EXTERN char * Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp * interp,
char * part1, char * part2, char * newValue,
int flags));
/* 239 */
-EXTERN char * Tcl_SignalId _ANSI_ARGS_((int sig));
+EXTERN CONST char * Tcl_SignalId _ANSI_ARGS_((int sig));
/* 240 */
-EXTERN char * Tcl_SignalMsg _ANSI_ARGS_((int sig));
+EXTERN CONST char * Tcl_SignalMsg _ANSI_ARGS_((int sig));
/* 241 */
EXTERN void Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp * interp));
/* 242 */
@@ -1441,7 +1441,7 @@ EXTERN int Tcl_FSAccess _ANSI_ARGS_((Tcl_Obj * pathPtr,
/* 456 */
EXTERN Tcl_Channel Tcl_FSOpenFileChannel _ANSI_ARGS_((
Tcl_Interp * interp, Tcl_Obj * pathPtr,
- char * modeString, int permissions));
+ CONST char * modeString, int permissions));
/* 457 */
EXTERN Tcl_Obj* Tcl_FSGetCwd _ANSI_ARGS_((Tcl_Interp * interp));
/* 458 */
@@ -1674,10 +1674,10 @@ typedef struct TclStubs {
void (*tcl_DStringSetLength) _ANSI_ARGS_((Tcl_DString * dsPtr, int length)); /* 124 */
void (*tcl_DStringStartSublist) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 125 */
int (*tcl_Eof) _ANSI_ARGS_((Tcl_Channel chan)); /* 126 */
- char * (*tcl_ErrnoId) _ANSI_ARGS_((void)); /* 127 */
- char * (*tcl_ErrnoMsg) _ANSI_ARGS_((int err)); /* 128 */
+ CONST char * (*tcl_ErrnoId) _ANSI_ARGS_((void)); /* 127 */
+ CONST char * (*tcl_ErrnoMsg) _ANSI_ARGS_((int err)); /* 128 */
int (*tcl_Eval) _ANSI_ARGS_((Tcl_Interp * interp, char * string)); /* 129 */
- int (*tcl_EvalFile) _ANSI_ARGS_((Tcl_Interp * interp, char * fileName)); /* 130 */
+ int (*tcl_EvalFile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * fileName)); /* 130 */
int (*tcl_EvalObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 131 */
void (*tcl_EventuallyFree) _ANSI_ARGS_((ClientData clientData, Tcl_FreeProc * freeProc)); /* 132 */
void (*tcl_Exit) _ANSI_ARGS_((int status)); /* 133 */
@@ -1761,13 +1761,13 @@ typedef struct TclStubs {
#ifdef MAC_TCL
void *reserved197;
#endif /* MAC_TCL */
- Tcl_Channel (*tcl_OpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, char * fileName, char * modeString, int permissions)); /* 198 */
+ Tcl_Channel (*tcl_OpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions)); /* 198 */
Tcl_Channel (*tcl_OpenTcpClient) _ANSI_ARGS_((Tcl_Interp * interp, int port, char * address, char * myaddr, int myport, int async)); /* 199 */
Tcl_Channel (*tcl_OpenTcpServer) _ANSI_ARGS_((Tcl_Interp * interp, int port, char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData)); /* 200 */
void (*tcl_Preserve) _ANSI_ARGS_((ClientData data)); /* 201 */
void (*tcl_PrintDouble) _ANSI_ARGS_((Tcl_Interp * interp, double value, char * dst)); /* 202 */
int (*tcl_PutEnv) _ANSI_ARGS_((CONST char * string)); /* 203 */
- char * (*tcl_PosixError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 204 */
+ CONST char * (*tcl_PosixError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 204 */
void (*tcl_QueueEvent) _ANSI_ARGS_((Tcl_Event * evPtr, Tcl_QueuePosition position)); /* 205 */
int (*tcl_Read) _ANSI_ARGS_((Tcl_Channel chan, char * bufPtr, int toRead)); /* 206 */
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
@@ -1810,8 +1810,8 @@ typedef struct TclStubs {
void (*tcl_SetStdChannel) _ANSI_ARGS_((Tcl_Channel channel, int type)); /* 236 */
char * (*tcl_SetVar) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, char * newValue, int flags)); /* 237 */
char * (*tcl_SetVar2) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, char * newValue, int flags)); /* 238 */
- char * (*tcl_SignalId) _ANSI_ARGS_((int sig)); /* 239 */
- char * (*tcl_SignalMsg) _ANSI_ARGS_((int sig)); /* 240 */
+ CONST char * (*tcl_SignalId) _ANSI_ARGS_((int sig)); /* 239 */
+ CONST char * (*tcl_SignalMsg) _ANSI_ARGS_((int sig)); /* 240 */
void (*tcl_SourceRCFile) _ANSI_ARGS_((Tcl_Interp * interp)); /* 241 */
int (*tcl_SplitList) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * listStr, int * argcPtr, char *** argvPtr)); /* 242 */
void (*tcl_SplitPath) _ANSI_ARGS_((CONST char * path, int * argcPtr, char *** argvPtr)); /* 243 */
@@ -2027,7 +2027,7 @@ typedef struct TclStubs {
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, char * modeString, int permissions)); /* 456 */
+ Tcl_Channel (*tcl_FSOpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr, CONST char * modeString, int permissions)); /* 456 */
Tcl_Obj* (*tcl_FSGetCwd) _ANSI_ARGS_((Tcl_Interp * interp)); /* 457 */
int (*tcl_FSChdir) _ANSI_ARGS_((Tcl_Obj * pathPtr)); /* 458 */
int (*tcl_FSConvertToPathType) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr)); /* 459 */
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 1c12a4b..02d966b 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.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: tclIO.c,v 1.44 2002/01/15 17:55:30 dgp Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.45 2002/01/15 21:19:07 dgp Exp $
*/
#include "tclInt.h"
@@ -2112,8 +2112,15 @@ FlushChannel(interp, chanPtr, calledFromAsyncFlush)
} else {
Tcl_SetErrno(errorCode);
if (interp != NULL) {
+
+ /*
+ * Casting away CONST here is safe because the
+ * TCL_VOLATILE flag guarantees CONST treatment
+ * of the Posix error string.
+ */
+
Tcl_SetResult(interp,
- Tcl_PosixError(interp), TCL_VOLATILE);
+ (char *) Tcl_PosixError(interp), TCL_VOLATILE);
}
}
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 7655f2e..7aa8ccf 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.28 2002/01/07 23:09:13 dgp Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.29 2002/01/15 21:19:07 dgp Exp $
*/
#include "tclInt.h"
@@ -111,8 +111,8 @@ Tcl_Channel
Tcl_OpenFileChannel(interp, path, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
* can be NULL. */
- char *path; /* Name of file to open. */
- char *modeString; /* A list of POSIX open modes or
+ CONST char *path; /* Name of file to open. */
+ CONST char *modeString; /* A list of POSIX open modes or
* a string such as "rw". */
int permissions; /* If the open involves creating a
* file, with what modes to create
@@ -162,7 +162,7 @@ Tcl_GetCwd(interp, cwdPtr)
int
Tcl_EvalFile(interp, fileName)
Tcl_Interp *interp; /* Interpreter in which to process file. */
- char *fileName; /* Name of file to process. Tilde-substitution
+ CONST char *fileName; /* Name of file to process. Tilde-substitution
* will be performed on this name. */
{
int ret;
@@ -977,7 +977,7 @@ int
TclGetOpenMode(interp, string, seekFlagPtr)
Tcl_Interp *interp; /* Interpreter to use for error
* reporting - may be NULL. */
- char *string; /* Mode string, e.g. "r+" or
+ CONST char *string; /* Mode string, e.g. "r+" or
* "RDONLY CREAT". */
int *seekFlagPtr; /* Set this to 1 if the caller
* should seek to EOF during the
@@ -1299,12 +1299,12 @@ Tcl_SetErrno(err)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_PosixError(interp)
Tcl_Interp *interp; /* Interpreter whose $errorCode variable
* is to be changed. */
{
- char *id, *msg;
+ CONST char *id, *msg;
msg = Tcl_ErrnoMsg(errno);
id = Tcl_ErrnoId();
@@ -1502,7 +1502,7 @@ Tcl_FSOpenFileChannel(interp, pathPtr, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
* can be NULL. */
Tcl_Obj *pathPtr; /* Name of file to open. */
- char *modeString; /* A list of POSIX open modes or
+ CONST char *modeString; /* A list of POSIX open modes or
* a string such as "rw". */
int permissions; /* If the open involves creating a
* file, with what modes to create
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 0e448bf..f0e04ef 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -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: tclInt.decls,v 1.40 2002/01/09 19:09:28 kennykb Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.41 2002/01/15 21:19:07 dgp Exp $
library tcl
@@ -172,7 +172,7 @@ declare 39 generic {
TclObjCmdProcType TclGetObjInterpProc(void)
}
declare 40 generic {
- int TclGetOpenMode(Tcl_Interp *interp, char *str, int *seekFlagPtr)
+ int TclGetOpenMode(Tcl_Interp *interp, CONST char *str, int *seekFlagPtr)
}
declare 41 generic {
Tcl_Command TclGetOriginalCommand(Tcl_Command command)
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 4c85ba6..301632d 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.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: tclInt.h,v 1.74 2002/01/15 17:55:30 dgp Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.75 2002/01/15 21:19:07 dgp Exp $
*/
#ifndef _TCLINT
@@ -1541,7 +1541,7 @@ typedef struct TclpTime_t_ *TclpTime_t;
typedef int (TclStatProc_) _ANSI_ARGS_((CONST char *path, struct stat *buf));
typedef int (TclAccessProc_) _ANSI_ARGS_((CONST char *path, int mode));
typedef Tcl_Channel (TclOpenFileChannelProc_) _ANSI_ARGS_((Tcl_Interp *interp,
- char *fileName, char *modeString,
+ CONST char *fileName, CONST char *modeString,
int permissions));
@@ -1703,8 +1703,6 @@ EXTERN int TclGetNamespaceForQualName _ANSI_ARGS_((
Namespace **actualCxtPtrPtr,
CONST char **simpleNamePtr));
EXTERN TclObjCmdProcType TclGetObjInterpProc _ANSI_ARGS_((void));
-EXTERN int TclGetOpenMode _ANSI_ARGS_((Tcl_Interp *interp,
- char *string, int *seekFlagPtr));
EXTERN Tcl_Command TclGetOriginalCommand _ANSI_ARGS_((
Tcl_Command command));
EXTERN int TclGlob _ANSI_ARGS_((Tcl_Interp *interp,
@@ -1855,7 +1853,7 @@ EXTERN Tcl_Obj* TclFileDirname _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj*pathPtr));
EXTERN int TclpObjStat _ANSI_ARGS_((Tcl_Obj *pathPtr, struct stat *buf));
EXTERN Tcl_Channel TclpOpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
- Tcl_Obj *pathPtr, char *modeString,
+ Tcl_Obj *pathPtr, CONST char *modeString,
int permissions));
EXTERN void TclpPanic _ANSI_ARGS_(TCL_VARARGS(CONST char *,
format));
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index f7f0dce..686cdd9 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.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: tclIntDecls.h,v 1.33 2002/01/09 19:09:28 kennykb Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.34 2002/01/15 21:19:07 dgp Exp $
*/
#ifndef _TCLINTDECLS
@@ -156,7 +156,7 @@ EXTERN int TclGetNamespaceForQualName _ANSI_ARGS_((
EXTERN TclObjCmdProcType TclGetObjInterpProc _ANSI_ARGS_((void));
/* 40 */
EXTERN int TclGetOpenMode _ANSI_ARGS_((Tcl_Interp * interp,
- char * str, int * seekFlagPtr));
+ CONST char * str, int * seekFlagPtr));
/* 41 */
EXTERN Tcl_Command TclGetOriginalCommand _ANSI_ARGS_((
Tcl_Command command));
@@ -563,7 +563,7 @@ typedef struct TclIntStubs {
int (*tclGetLoadedPackages) _ANSI_ARGS_((Tcl_Interp * interp, char * targetName)); /* 37 */
int (*tclGetNamespaceForQualName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, CONST char ** simpleNamePtr)); /* 38 */
TclObjCmdProcType (*tclGetObjInterpProc) _ANSI_ARGS_((void)); /* 39 */
- int (*tclGetOpenMode) _ANSI_ARGS_((Tcl_Interp * interp, char * str, int * seekFlagPtr)); /* 40 */
+ int (*tclGetOpenMode) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * seekFlagPtr)); /* 40 */
Tcl_Command (*tclGetOriginalCommand) _ANSI_ARGS_((Tcl_Command command)); /* 41 */
char * (*tclpGetUserHome) _ANSI_ARGS_((CONST char * name, Tcl_DString * bufferPtr)); /* 42 */
int (*tclGlobalInvoke) _ANSI_ARGS_((Tcl_Interp * interp, int argc, char ** argv, int flags)); /* 43 */
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 4f39c93..931f2a7 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.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: tclPipe.c,v 1.3 1999/04/16 00:46:51 stanton Exp $
+ * RCS: @(#) $Id: tclPipe.c,v 1.4 2002/01/15 21:19:07 dgp Exp $
*/
#include "tclInt.h"
@@ -278,7 +278,7 @@ TclCleanupChildren(interp, numPids, pidPtr, errorChan)
int i, abnormalExit, anyErrorInfo;
Tcl_Pid pid;
WAIT_STATUS_TYPE waitStatus;
- char *msg;
+ CONST char *msg;
abnormalExit = 0;
for (i = 0; i < numPids; i++) {
@@ -324,7 +324,7 @@ TclCleanupChildren(interp, numPids, pidPtr, errorChan)
abnormalExit = 1;
} else if (WIFSIGNALED(waitStatus)) {
if (interp != (Tcl_Interp *) NULL) {
- char *p;
+ CONST char *p;
p = Tcl_SignalMsg((int) (WTERMSIG(waitStatus)));
Tcl_SetErrorCode(interp, "CHILDKILLED", msg1,
@@ -335,7 +335,7 @@ TclCleanupChildren(interp, numPids, pidPtr, errorChan)
}
} else if (WIFSTOPPED(waitStatus)) {
if (interp != (Tcl_Interp *) NULL) {
- char *p;
+ CONST char *p;
p = Tcl_SignalMsg((int) (WSTOPSIG(waitStatus)));
Tcl_SetErrorCode(interp, "CHILDSUSP", msg1,
diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c
index 9922ce1..2af10b1 100644
--- a/generic/tclPosixStr.c
+++ b/generic/tclPosixStr.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: tclPosixStr.c,v 1.6 2000/05/11 01:50:59 hobbs Exp $
+ * RCS: @(#) $Id: tclPosixStr.c,v 1.7 2002/01/15 21:19:07 dgp Exp $
*/
#include "tclInt.h"
@@ -35,7 +35,7 @@
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_ErrnoId()
{
switch (errno) {
@@ -480,7 +480,7 @@ Tcl_ErrnoId()
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_ErrnoMsg(err)
int err; /* Error number (such as in errno variable). */
{
@@ -927,7 +927,7 @@ Tcl_ErrnoMsg(err)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_SignalId(sig)
int sig; /* Number of signal. */
{
@@ -1059,7 +1059,7 @@ Tcl_SignalId(sig)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_SignalMsg(sig)
int sig; /* Number of signal. */
{
diff --git a/generic/tclTest.c b/generic/tclTest.c
index b2a1af2..5401352 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.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: tclTest.c,v 1.36 2002/01/09 17:50:56 dgp Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.37 2002/01/15 21:19:07 dgp Exp $
*/
#define TCL_TEST
@@ -250,14 +250,18 @@ static int TestsetmainloopCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int argc, char **argv));
static int TestexitmainloopCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int argc, char **argv));
-static Tcl_Channel PretendTclpOpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
- char *filename, char *modeString, int permissions));
-static Tcl_Channel TestOpenFileChannelProc1 _ANSI_ARGS_((Tcl_Interp *interp,
- char *filename, char *modeString, int permissions));
-static Tcl_Channel TestOpenFileChannelProc2 _ANSI_ARGS_((Tcl_Interp *interp,
- char *filename, char *modeString, int permissions));
-static Tcl_Channel TestOpenFileChannelProc3 _ANSI_ARGS_((Tcl_Interp *interp,
- char *filename, char *modeString, int permissions));
+static Tcl_Channel PretendTclpOpenFileChannel _ANSI_ARGS_((
+ Tcl_Interp *interp, CONST char *fileName,
+ CONST char *modeString, int permissions));
+static Tcl_Channel TestOpenFileChannelProc1 _ANSI_ARGS_((
+ Tcl_Interp *interp, CONST char *fileName,
+ CONST char *modeString, int permissions));
+static Tcl_Channel TestOpenFileChannelProc2 _ANSI_ARGS_((
+ Tcl_Interp *interp, CONST char *fileName,
+ CONST char *modeString, int permissions));
+static Tcl_Channel TestOpenFileChannelProc3 _ANSI_ARGS_((
+ Tcl_Interp *interp, CONST char *fileName,
+ CONST char *modeString, int permissions));
static int TestpanicCmd _ANSI_ARGS_((ClientData dummy,
Tcl_Interp *interp, int argc, char **argv));
static int TestparserObjCmd _ANSI_ARGS_((ClientData dummy,
@@ -4494,8 +4498,8 @@ static Tcl_Channel
PretendTclpOpenFileChannel(interp, fileName, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
* can be NULL. */
- char *fileName; /* Name of file to open. */
- char *modeString; /* A list of POSIX open modes or
+ CONST char *fileName; /* Name of file to open. */
+ CONST char *modeString; /* A list of POSIX open modes or
* a string such as "rw". */
int permissions; /* If the open involves creating a
* file, with what modes to create
@@ -4513,8 +4517,8 @@ static Tcl_Channel
TestOpenFileChannelProc1(interp, fileName, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
* can be NULL. */
- char *fileName; /* Name of file to open. */
- char *modeString; /* A list of POSIX open modes or
+ CONST char *fileName; /* Name of file to open. */
+ CONST char *modeString; /* A list of POSIX open modes or
* a string such as "rw". */
int permissions; /* If the open involves creating a
* file, with what modes to create
@@ -4541,8 +4545,8 @@ static Tcl_Channel
TestOpenFileChannelProc2(interp, fileName, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
* can be NULL. */
- char *fileName; /* Name of file to open. */
- char *modeString; /* A list of POSIX open modes or
+ CONST char *fileName; /* Name of file to open. */
+ CONST char *modeString; /* A list of POSIX open modes or
* a string such as "rw". */
int permissions; /* If the open involves creating a
* file, with what modes to create
@@ -4569,8 +4573,8 @@ static Tcl_Channel
TestOpenFileChannelProc3(interp, fileName, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
* can be NULL. */
- char *fileName; /* Name of file to open. */
- char *modeString; /* A list of POSIX open modes or
+ CONST char *fileName; /* Name of file to open. */
+ CONST char *modeString; /* A list of POSIX open modes or
* a string such as "rw". */
int permissions; /* If the open involves creating a
* file, with what modes to create
@@ -5504,8 +5508,8 @@ static Tcl_Channel
TestReportOpenFileChannel(interp, fileName, modeString, permissions)
Tcl_Interp *interp; /* Interpreter for error reporting;
* can be NULL. */
- Tcl_Obj *fileName; /* Name of file to open. */
- char *modeString; /* A list of POSIX open modes or
+ Tcl_Obj *fileName; /* Name of file to open. */
+ CONST char *modeString; /* A list of POSIX open modes or
* a string such as "rw". */
int permissions; /* If the open involves creating a
* file, with what modes to create