summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-17 04:37:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-17 04:37:32 (GMT)
commit0bb265c3bdbc5ca21de5af6238307d73e863603d (patch)
tree62a19bfcb6159f9beaa9ffb26dcd2b680126c7c8 /generic
parent2955a401d559c6249d4f2ad18a4c7b000df1a3de (diff)
downloadtcl-0bb265c3bdbc5ca21de5af6238307d73e863603d.zip
tcl-0bb265c3bdbc5ca21de5af6238307d73e863603d.tar.gz
tcl-0bb265c3bdbc5ca21de5af6238307d73e863603d.tar.bz2
* More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that were
overlooked before. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes a source incompatibility in the tablePtr arguments of the Tcl_GetIndexFromObj* routines.
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls15
-rw-r--r--generic/tcl.h4
-rw-r--r--generic/tclBinary.c4
-rw-r--r--generic/tclClock.c8
-rw-r--r--generic/tclCmdAH.c6
-rw-r--r--generic/tclCmdIL.c8
-rw-r--r--generic/tclCmdMZ.c22
-rw-r--r--generic/tclCompCmds.c4
-rw-r--r--generic/tclDecls.h26
-rw-r--r--generic/tclEvent.c4
-rw-r--r--generic/tclFCmd.c7
-rw-r--r--generic/tclFileName.c4
-rw-r--r--generic/tclIO.c4
-rw-r--r--generic/tclIOCmd.c12
-rw-r--r--generic/tclIOUtil.c16
-rw-r--r--generic/tclIndexObj.c18
-rw-r--r--generic/tclInterp.c12
-rw-r--r--generic/tclNamesp.c4
-rw-r--r--generic/tclPkg.c4
-rw-r--r--generic/tclTest.c20
-rw-r--r--generic/tclTestObj.c10
-rw-r--r--generic/tclTimer.c6
-rw-r--r--generic/tclVar.c6
23 files changed, 117 insertions, 107 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 9d85df4..8e2f0c7 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.74 2002/01/17 03:03:11 dgp Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.75 2002/01/17 04:37:32 dgp Exp $
library tcl
@@ -154,7 +154,7 @@ declare 35 generic {
}
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)
@@ -1085,7 +1085,7 @@ declare 303 generic {
}
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 {
@@ -1291,7 +1291,7 @@ declare 364 generic {
# 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)
@@ -1601,7 +1601,7 @@ declare 452 generic {
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)
@@ -1650,7 +1650,7 @@ declare 468 generic {
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)
@@ -1671,7 +1671,8 @@ declare 475 generic {
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)
diff --git a/generic/tcl.h b/generic/tcl.h
index 9c8a1ab..7965e2a 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.109 2002/01/15 21:19:07 dgp Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.110 2002/01/17 04:37:33 dgp Exp $
*/
#ifndef _TCL
@@ -1530,7 +1530,7 @@ typedef int (Tcl_FSNormalizePathProc) _ANSI_ARGS_((Tcl_Interp *interp,
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,
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index a3505d6..f2d9327 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.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: tclBinary.c,v 1.10 2001/12/28 23:36:31 dgp Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.11 2002/01/17 04:37:33 dgp Exp $
*/
#include <math.h>
@@ -582,7 +582,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
* cursor has visited.*/
char *errorString, *errorValue, *str;
int offset, size, length, index;
- static char *options[] = {
+ static CONST char *options[] = {
"format", "scan", NULL
};
enum options {
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 9a99deb..f71b86f 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.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: tclClock.c,v 1.12 2001/11/21 02:36:20 hobbs Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.13 2002/01/17 04:37:33 dgp Exp $
*/
#include "tcl.h"
@@ -67,13 +67,13 @@ Tcl_ClockObjCmd (client, interp, objc, objv)
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) {
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 489f370..cc7ab0f 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.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: tclCmdAH.c,v 1.17 2002/01/03 18:23:47 dkf Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.18 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -427,7 +427,7 @@ Tcl_EncodingObjCmd(dummy, interp, objc, objv)
Tcl_DString ds;
Tcl_Obj *resultPtr;
- static char *optionStrings[] = {
+ static CONST char *optionStrings[] = {
"convertfrom", "convertto", "names", "system",
NULL
};
@@ -786,7 +786,7 @@ Tcl_FileObjCmd(dummy, interp, objc, objv)
* 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",
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index cf8681d..1602ab5 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.36 2001/11/14 23:17:03 hobbs Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.37 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -373,7 +373,7 @@ Tcl_InfoObjCmd(clientData, interp, objc, objv)
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 @@ Tcl_LsearchObjCmd(clientData, interp, objc, objv)
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 @@ Tcl_LsortObjCmd(clientData, interp, objc, objv)
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
};
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 413d52f..7e6f1ef 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.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: tclCmdMZ.c,v 1.54 2002/01/17 03:03:11 dgp Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.55 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -58,7 +58,7 @@ Tcl_TraceTypeObjCmd TclTraceCommandObjCmd;
* 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_RegexpObjCmd(dummy, interp, objc, objv)
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_RegsubObjCmd(dummy, interp, objc, objv)
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_StringObjCmd(dummy, interp, objc, objv)
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 @@ Tcl_StringObjCmd(dummy, interp, objc, objv)
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 @@ Tcl_SubstObjCmd(dummy, interp, objc, objv)
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 @@ Tcl_SwitchObjCmd(dummy, interp, objc, objv)
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 @@ Tcl_TraceObjCmd(dummy, interp, objc, objv)
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 @@ TclTraceCommandObjCmd(interp, optionIndex, objc, objv)
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 @@ TclTraceVariableObjCmd(interp, optionIndex, objc, objv)
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 };
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 01d4cea..58bd4e0 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.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: tclCompCmds.c,v 1.19 2001/12/11 19:45:52 msofer Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.20 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -2402,7 +2402,7 @@ TclCompileStringCmd(interp, parsePtr, envPtr)
int index;
int code;
- static char *options[] = {
+ static CONST char *options[] = {
"bytelength", "compare", "equal", "first",
"index", "is", "last", "length",
"map", "match", "range", "repeat",
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index f860487..8237124 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.74 2002/01/17 03:03:11 dgp Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.75 2002/01/17 04:37:33 dgp Exp $
*/
#ifndef _TCLDECLS
@@ -137,7 +137,7 @@ EXTERN int Tcl_GetDoubleFromObj _ANSI_ARGS_((
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,
@@ -983,7 +983,7 @@ EXTERN void Tcl_GetEncodingNames _ANSI_ARGS_((
/* 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_((
@@ -1159,7 +1159,7 @@ EXTERN int Tcl_ParseVarName _ANSI_ARGS_((Tcl_Interp * interp,
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));
@@ -1432,7 +1432,7 @@ EXTERN int Tcl_FSFileAttrsSet _ANSI_ARGS_((Tcl_Interp * interp,
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,
@@ -1480,7 +1480,7 @@ EXTERN Tcl_Obj* Tcl_FSNewNativePath _ANSI_ARGS_((
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));
@@ -1496,7 +1496,7 @@ EXTERN int Tcl_FSUnregister _ANSI_ARGS_((Tcl_Filesystem * fsPtr));
/* 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_((
@@ -1577,7 +1577,7 @@ typedef struct TclStubs {
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 */
@@ -1877,7 +1877,7 @@ typedef struct TclStubs {
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 */
@@ -1938,7 +1938,7 @@ typedef struct TclStubs {
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 */
@@ -2026,7 +2026,7 @@ typedef struct TclStubs {
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 */
@@ -2042,14 +2042,14 @@ typedef struct TclStubs {
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 */
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index da526c4..ed0c77f 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.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: tclEvent.c,v 1.17 2002/01/07 23:09:13 dgp Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.18 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -1050,7 +1050,7 @@ Tcl_UpdateObjCmd(clientData, interp, objc, objv)
{
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) {
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index 57507ab..db9c6ad 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.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: tclFCmd.c,v 1.14 2001/10/15 10:30:07 vincentdarley Exp $
+ * RCS: @(#) $Id: tclFCmd.c,v 1.15 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -810,7 +810,7 @@ TclFileAttrsCmd(interp, objc, objv)
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 @@ TclFileAttrsCmd(interp, objc, objv)
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);
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index d29b25c..6973799 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.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: tclFileName.c,v 1.26 2002/01/17 03:03:11 dgp Exp $
+ * RCS: @(#) $Id: tclFileName.c,v 1.27 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -1548,7 +1548,7 @@ Tcl_GlobObjCmd(dummy, interp, objc, objv)
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
};
diff --git a/generic/tclIO.c b/generic/tclIO.c
index aa72bb3..8b67405 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.46 2002/01/17 03:03:12 dgp Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.47 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -7148,7 +7148,7 @@ Tcl_FileEventObjCmd(clientData, interp, objc, objv)
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)) {
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index a74b3b9..a14c9f1 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.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: tclIOCmd.c,v 1.10 2001/09/19 00:50:23 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIOCmd.c,v 1.11 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -429,7 +429,9 @@ Tcl_SeekObjCmd(clientData, interp, objc, objv)
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_ExecObjCmd(dummy, interp, objc, objv)
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 @@ Tcl_SocketObjCmd(notUsed, interp, objc, objv)
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 @@ Tcl_FcopyObjCmd(dummy, interp, objc, objv)
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)) {
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 7aa8ccf..adb73c0 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.29 2002/01/15 21:19:07 dgp Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.30 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -70,7 +70,7 @@ Tcl_ObjType tclFsPathType = {
* 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 @@ Tcl_Chdir(dirName)
}
/* Obsolete */
-char *
+CONST char *
Tcl_GetCwd(interp, cwdPtr)
Tcl_Interp *interp;
Tcl_DString *cwdPtr;
@@ -1937,7 +1937,7 @@ Tcl_FSUtime (pathPtr, tval)
*----------------------------------------------------------------------
*/
-static char**
+static CONST char**
NativeFileAttrStrings(pathPtr, objPtrRef)
Tcl_Obj *pathPtr;
Tcl_Obj** objPtrRef;
@@ -2036,7 +2036,7 @@ NativeFileAttrsSet(interp, index, pathPtr, objPtr)
*----------------------------------------------------------------------
*/
-char**
+CONST char **
Tcl_FSFileAttrStrings(pathPtr, objPtrRef)
Tcl_Obj* pathPtr;
Tcl_Obj** objPtrRef;
@@ -3806,7 +3806,7 @@ Tcl_FSGetTranslatedPath(interp, pathPtr)
*
*---------------------------------------------------------------------------
*/
-char*
+CONST char*
Tcl_FSGetTranslatedStringPath(interp, pathPtr)
Tcl_Interp *interp;
Tcl_Obj* pathPtr;
@@ -4038,11 +4038,11 @@ Tcl_FSGetInternalRep(pathObjPtr, fsPtr)
*---------------------------------------------------------------------------
*/
-char*
+CONST char*
Tcl_FSGetNativePath(pathObjPtr)
Tcl_Obj* pathObjPtr;
{
- return (char*)Tcl_FSGetInternalRep(pathObjPtr, &nativeFilesystem);
+ return (CONST char *)Tcl_FSGetInternalRep(pathObjPtr, &nativeFilesystem);
}
/*
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index c9dd542..c9baf3c 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.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: tclIndexObj.c,v 1.11 2002/01/14 15:07:39 dgp Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.12 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -76,7 +76,7 @@ int
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 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, 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; /* 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 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
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 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
}
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_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
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,
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index d28758d..da3ab66 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.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: tclInterp.c,v 1.9 2002/01/16 06:02:34 dgp Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.10 2002/01/17 04:37:33 dgp Exp $
*/
#include <stdio.h>
@@ -347,7 +347,7 @@ Tcl_InterpObjCmd(clientData, interp, objc, objv)
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 @@ Tcl_InterpObjCmd(clientData, interp, objc, objv)
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 @@ Tcl_InterpObjCmd(clientData, interp, objc, objv)
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 @@ SlaveObjCmd(clientData, interp, objc, objv)
{
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 @@ SlaveObjCmd(clientData, interp, objc, objv)
}
case OPT_INVOKEHIDDEN: {
int global, i, index;
- static char *hiddenOptions[] = {
+ static CONST char *hiddenOptions[] = {
"-global", "--", NULL
};
enum hiddenOption {
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 5b4fdd3..e37aa09 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -19,7 +19,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.25 2001/06/28 12:43:33 msofer Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.26 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -2464,7 +2464,7 @@ Tcl_NamespaceObjCmd(clientData, interp, objc, objv)
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",
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 9956023..919b1b9 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.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: tclPkg.c,v 1.7 2001/08/06 19:13:29 dgp Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.8 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -470,7 +470,7 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
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
};
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 202bbd5..7602715 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.38 2002/01/17 02:43:19 dgp Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.39 2002/01/17 04:37:33 dgp Exp $
*/
#define TCL_TEST
@@ -427,7 +427,7 @@ Tcltest_Init(interp)
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 @@ TestencodingObjCmd(dummy, interp, objc, objv)
int index, length;
char *string;
TclEncoding *encodingPtr;
- static char *optionStrings[] = {
+ static CONST char *optionStrings[] = {
"create", "delete", "path",
NULL
};
@@ -1945,7 +1945,7 @@ TestgetplatformCmd(clientData, interp, argc, argv)
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 @@ TestlocaleCmd(clientData, interp, objc, objv)
int index;
char *locale;
- static char *optionStrings[] = {
+ static CONST char *optionStrings[] = {
"ctype", "numeric", "time", "collate", "monetary",
"all", NULL
};
@@ -2703,7 +2703,7 @@ TestregexpObjCmd(dummy, interp, objc, objv)
char *string;
Tcl_Obj *objPtr;
Tcl_RegExpInfo info;
- static char *options[] = {
+ static CONST char *options[] = {
"-indices", "-nocase", "-about", "-expanded",
"-line", "-linestop", "-lineanchor",
"-xflags",
@@ -3967,7 +3967,7 @@ TestsaveresultCmd(dummy, interp, objc, objv)
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 {
@@ -5318,7 +5318,9 @@ TestGetIndexFromObjStructObjCmd(dummy, interp, objc, objv)
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) {
@@ -5633,7 +5635,7 @@ TestReportRemoveDirectory(path, recursive, errorPtr)
return Tcl_FSRemoveDirectory(TestReportGetNativePath(path), recursive,
errorPtr);
}
-static char**
+static CONST char**
TestReportFileAttrStrings(fileName, objPtrRef)
Tcl_Obj* fileName;
Tcl_Obj** objPtrRef;
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index d423308..ca9b088 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.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: tclTestObj.c,v 1.8 2001/11/14 23:17:04 hobbs Exp $
+ * RCS: @(#) $Id: tclTestObj.c,v 1.9 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -404,8 +404,8 @@ TestindexobjCmd(clientData, interp, objc, objv)
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 @@ TestindexobjCmd(clientData, interp, objc, objv)
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 @@ TeststringobjCmd(clientData, interp, objc, objv)
#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
};
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index 27e10d5..33b312d 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.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: tclTimer.c,v 1.4 2001/11/21 02:36:20 hobbs Exp $
+ * RCS: @(#) $Id: tclTimer.c,v 1.5 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -735,7 +735,9 @@ Tcl_AfterObjCmd(clientData, interp, objc, objv)
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();
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 134ca16..238f6ff 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.44 2001/12/07 13:55:59 msofer Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.45 2002/01/17 04:37:33 dgp Exp $
*/
#include "tclInt.h"
@@ -3152,7 +3152,7 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv)
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 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv)
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 };