diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-18 22:05:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-18 22:05:13 (GMT) |
commit | 75d9b50fe87d98b7e6ef6058d0e39cd0c46e8c66 (patch) | |
tree | 814ee209e61f54111244c35e8c6d95ce48508163 /generic | |
parent | eaa13cf52586163655438eb6476745a85dbc34d5 (diff) | |
parent | bb146c387f42e478b1d8ffbc8617988fb572587c (diff) | |
download | tcl-75d9b50fe87d98b7e6ef6058d0e39cd0c46e8c66.zip tcl-75d9b50fe87d98b7e6ef6058d0e39cd0c46e8c66.tar.gz tcl-75d9b50fe87d98b7e6ef6058d0e39cd0c46e8c66.tar.bz2 |
make some more internal tables const
a few CONST -> const changes
Diffstat (limited to 'generic')
-rw-r--r-- | generic/regc_lex.c | 6 | ||||
-rw-r--r-- | generic/regerror.c | 2 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 46 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 120 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 44 | ||||
-rw-r--r-- | generic/tclCompExpr.c | 2 | ||||
-rw-r--r-- | generic/tclConfig.c | 2 | ||||
-rw-r--r-- | generic/tclEncoding.c | 118 | ||||
-rw-r--r-- | generic/tclStubInit.c | 18 |
9 files changed, 179 insertions, 179 deletions
diff --git a/generic/regc_lex.c b/generic/regc_lex.c index bc61e14..8d07c59 100644 --- a/generic/regc_lex.c +++ b/generic/regc_lex.c @@ -742,10 +742,10 @@ lexescape( struct vars *v) { chr c; - static chr alert[] = { + static const chr alert[] = { CHR('a'), CHR('l'), CHR('e'), CHR('r'), CHR('t') }; - static chr esc[] = { + static const chr esc[] = { CHR('E'), CHR('S'), CHR('C') }; const chr *save; @@ -1135,7 +1135,7 @@ newline(void) static const chr * ch(void) { - static chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') }; + static const chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') }; return chstr; } diff --git a/generic/regerror.c b/generic/regerror.c index 49b6f3e..a1a0163 100644 --- a/generic/regerror.c +++ b/generic/regerror.c @@ -35,7 +35,7 @@ * Unknown-error explanation. */ -static char unk[] = "*** unknown regex error code 0x%x ***"; +static const char unk[] = "*** unknown regex error code 0x%x ***"; /* * Struct to map among codes, code names, and explanations. diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 75ba465..e1ec927 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -22,7 +22,7 @@ static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode); static int EncodingDirsObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_FSStatProc *statProc, Tcl_StatBuf *statPtr); static char * GetTypeFromMode(int mode); @@ -56,7 +56,7 @@ Tcl_BreakObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -89,12 +89,12 @@ Tcl_CaseObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register int i; int body, result, caseObjc; char *stringPtr, *arg; - Tcl_Obj *CONST *caseObjv; + Tcl_Obj *const *caseObjv; Tcl_Obj *armPtr; if (objc < 3) { @@ -129,7 +129,7 @@ Tcl_CaseObjCmd( for (i = 0; i < caseObjc; i += 2) { int patObjc, j; - CONST char **patObjv; + const char **patObjv; char *pat; unsigned char *p; @@ -224,7 +224,7 @@ Tcl_CatchObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *varNamePtr = NULL; Tcl_Obj *optionVarNamePtr = NULL; @@ -309,7 +309,7 @@ Tcl_CdObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *dir; int result; @@ -364,7 +364,7 @@ Tcl_ConcatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc >= 2) { Tcl_SetObjResult(interp, Tcl_ConcatObj(objc-1, objv+1)); @@ -399,7 +399,7 @@ Tcl_ContinueObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -429,11 +429,11 @@ Tcl_EncodingObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int index; - static CONST char *optionStrings[] = { + static const char *optionStrings[] = { "convertfrom", "convertto", "dirs", "names", "system", NULL }; @@ -550,7 +550,7 @@ EncodingDirsObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?dirList?"); @@ -592,7 +592,7 @@ Tcl_ErrorObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *options, *optName; @@ -642,7 +642,7 @@ Tcl_EvalObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result; register Tcl_Obj *objPtr; @@ -709,7 +709,7 @@ Tcl_ExitObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int value; @@ -758,7 +758,7 @@ Tcl_ExprObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *resultPtr; int result; @@ -811,7 +811,7 @@ Tcl_FileObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int index, value; Tcl_StatBuf buf; @@ -821,7 +821,7 @@ Tcl_FileObjCmd( * This list of constants should match the fileOption string array below. */ - static CONST char *fileOptions[] = { + static const char *fileOptions[] = { "atime", "attributes", "channels", "copy", "delete", "dirname", "executable", "exists", "extension", @@ -1038,7 +1038,7 @@ Tcl_FileObjCmd( * We have a '-linktype' argument. */ - static CONST char *linkTypes[] = { + static const char *linkTypes[] = { "-symbolic", "-hard", NULL }; if (Tcl_GetIndexFromObj(interp, objv[2], linkTypes, "switch", @@ -1182,7 +1182,7 @@ Tcl_FileObjCmd( } return TclFileMakeDirsCmd(interp, objc, objv); case FCMD_NATIVENAME: { - CONST char *fileName; + const char *fileName; Tcl_DString ds; if (objc != 3) { @@ -1606,7 +1606,7 @@ Tcl_ForObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result, value; Interp *iPtr = (Interp *) interp; @@ -1702,7 +1702,7 @@ Tcl_ForeachObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result = TCL_OK; int i; /* i selects a value list */ @@ -1876,7 +1876,7 @@ Tcl_FormatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *resultPtr; /* Where result is stored finally. */ diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 13db6d5..af7fe60 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -103,43 +103,43 @@ typedef struct SortInfo { static int DictionaryCompare(char *left, char *right); static int InfoArgsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoBodyCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoCmdCountCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoCommandsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoCompleteCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoDefaultCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); /* TIP #280 - New 'info' subcommand 'frame' */ static int InfoFrameCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoFunctionsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoHostnameCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoLevelCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoLibraryCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoLoadedCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoNameOfExecutableCmd(ClientData dummy, Tcl_Interp *interp, int objc, - Tcl_Obj *CONST objv[]); + Tcl_Obj *const objv[]); static int InfoPatchLevelCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoProcsCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoScriptCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoSharedlibCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static int InfoTclVersionCmd(ClientData dummy, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); + int objc, Tcl_Obj *const objv[]); static SortElement * MergeLists(SortElement *leftPtr, SortElement *rightPtr, SortInfo *infoPtr); static int SortCompare(SortElement *firstPtr, SortElement *second, @@ -204,7 +204,7 @@ Tcl_IfObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int thenScriptIndex = 0; /* "then" script to be evaled after syntax * check. */ @@ -334,7 +334,7 @@ Tcl_IncrObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *newValuePtr, *incrPtr; @@ -415,7 +415,7 @@ InfoArgsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; char *name; @@ -476,7 +476,7 @@ InfoBodyCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Interp *iPtr = (Interp *) interp; char *name; @@ -545,7 +545,7 @@ InfoCmdCountCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; @@ -587,10 +587,10 @@ InfoCommandsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *cmdName, *pattern; - CONST char *simplePattern; + const char *simplePattern; register Tcl_HashEntry *entryPtr; Tcl_HashSearch search; Namespace *nsPtr; @@ -864,7 +864,7 @@ InfoCompleteCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "command"); @@ -901,7 +901,7 @@ InfoDefaultCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; char *procName, *argName, *varName; @@ -983,7 +983,7 @@ TclInfoExistsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *varName; Var *varPtr; @@ -1028,7 +1028,7 @@ InfoFrameCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; int level; @@ -1119,7 +1119,7 @@ TclInfoFrame( * This array is indexed by the TCL_LOCATION_... values, except * for _LAST. */ - static CONST char *typeString[TCL_LOCATION_LAST] = { + static const char *typeString[TCL_LOCATION_LAST] = { "eval", "eval", "eval", "precompiled", "source", "proc" }; Tcl_Obj *tmpObj; @@ -1336,7 +1336,7 @@ InfoFunctionsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *pattern; @@ -1378,9 +1378,9 @@ InfoHostnameCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *name; + const char *name; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1421,7 +1421,7 @@ InfoLevelCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; @@ -1493,9 +1493,9 @@ InfoLibraryCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *libDirName; + const char *libDirName; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1537,7 +1537,7 @@ InfoLoadedCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *interpName; @@ -1580,7 +1580,7 @@ InfoNameOfExecutableCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1616,9 +1616,9 @@ InfoPatchLevelCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *patchlevel; + const char *patchlevel; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1663,10 +1663,10 @@ InfoProcsCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *cmdName, *pattern; - CONST char *simplePattern; + const char *simplePattern; Namespace *nsPtr; #ifdef INFO_PROCS_SEARCH_GLOBAL_NS Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp); @@ -1851,7 +1851,7 @@ InfoScriptCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Interp *iPtr = (Interp *) interp; if ((objc != 1) && (objc != 2)) { @@ -1898,7 +1898,7 @@ InfoSharedlibCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); @@ -1936,7 +1936,7 @@ InfoTclVersionCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *version; @@ -1976,7 +1976,7 @@ Tcl_JoinObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* The argument objects. */ + Tcl_Obj *const objv[]) /* The argument objects. */ { int listLen, i; Tcl_Obj *resObjPtr, *joinObjPtr, **elemPtrs; @@ -2033,7 +2033,7 @@ Tcl_LassignObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listCopyPtr; Tcl_Obj **listObjv; /* The contents of the list. */ @@ -2105,7 +2105,7 @@ Tcl_LindexObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *elemPtr; /* Pointer to the element being extracted. */ @@ -2164,7 +2164,7 @@ Tcl_LinsertObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ register int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listPtr; int index, len, result; @@ -2243,7 +2243,7 @@ Tcl_ListObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ register int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* The argument objects. */ { /* @@ -2279,7 +2279,7 @@ Tcl_LlengthObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, result; @@ -2325,7 +2325,7 @@ Tcl_LrangeObjCmd( ClientData notUsed, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *listPtr, **elemPtrs; @@ -2398,7 +2398,7 @@ Tcl_LrepeatObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ register int objc, /* Number of arguments. */ - register Tcl_Obj *CONST objv[]) + register Tcl_Obj *const objv[]) /* The argument objects. */ { int elementCount, i, totalElems; @@ -2500,7 +2500,7 @@ Tcl_LreplaceObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Tcl_Obj *listPtr; int first, last, listLen, numToDelete, result; @@ -2607,7 +2607,7 @@ Tcl_LreverseObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { Tcl_Obj **elemv; int elemc, i, j; @@ -2686,7 +2686,7 @@ Tcl_LsearchObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { char *bytes, *patternBytes; int i, match, mode, index, result, listc, length, elemLen; @@ -2697,7 +2697,7 @@ Tcl_LsearchObjCmd( Tcl_Obj *patObj, **listv, *listPtr, *startPtr, *itemPtr; SortStrCmpFn_t strCmpFn = strcmp; Tcl_RegExp regexp = NULL; - static CONST char *options[] = { + static const char *options[] = { "-all", "-ascii", "-decreasing", "-dictionary", "-exact", "-glob", "-increasing", "-index", "-inline", "-integer", "-nocase", "-not", @@ -3350,7 +3350,7 @@ Tcl_LsetObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { Tcl_Obj *listPtr; /* Pointer to the list being altered. */ Tcl_Obj *finalValuePtr; /* Value finally assigned to the variable. */ @@ -3435,14 +3435,14 @@ Tcl_LsortObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument values. */ + Tcl_Obj *const objv[]) /* Argument values. */ { int i, j, index, indices, length, nocase = 0, sortMode, indexc; Tcl_Obj *resultPtr, *cmdPtr, **listObjPtrs, *listObj, *indexPtr; SortElement *elementArray, *elementPtr; SortInfo sortInfo; /* Information about this sort that needs to * be passed to the comparison function. */ - static CONST char *switches[] = { + static const char *switches[] = { "-ascii", "-command", "-decreasing", "-dictionary", "-increasing", "-index", "-indices", "-integer", "-nocase", "-real", "-unique", NULL }; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 9a23bd2..531e2b1 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -44,7 +44,7 @@ Tcl_PwdObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *retVal; @@ -84,14 +84,14 @@ Tcl_RegexpObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int i, indices, match, about, offset, all, doinline, numMatchesSaved; int cflags, eflags, stringLength, matchLength; Tcl_RegExp regExpr; Tcl_Obj *objPtr, *startIndex = NULL, *resultPtr = NULL; Tcl_RegExpInfo info; - static CONST char *options[] = { + static const char *options[] = { "-all", "-about", "-indices", "-inline", "-expanded", "-line", "-linestop", "-lineanchor", "-nocase", "-start", "--", NULL @@ -445,7 +445,7 @@ Tcl_RegsubObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int idx, result, cflags, all, wlen, wsublen, numMatches, offset; int start, end, subStart, subEnd, match; @@ -454,7 +454,7 @@ Tcl_RegsubObjCmd( Tcl_Obj *resultPtr, *subPtr, *objPtr, *startIndex = NULL; Tcl_UniChar ch, *wsrc, *wfirstChar, *wstring, *wsubspec, *wend; - static CONST char *options[] = { + static const char *options[] = { "-all", "-nocase", "-expanded", "-line", "-linestop", "-lineanchor", "-start", "--", NULL @@ -555,7 +555,7 @@ Tcl_RegsubObjCmd( */ int slen, nocase; - int (*strCmpFn)(CONST Tcl_UniChar*,CONST Tcl_UniChar*,unsigned long); + int (*strCmpFn)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long); Tcl_UniChar *p, wsrclc; numMatches = 0; @@ -854,7 +854,7 @@ Tcl_RenameObjCmd( ClientData dummy, /* Arbitrary value passed to the command. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { char *oldName, *newName; @@ -890,7 +890,7 @@ Tcl_ReturnObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int code, level; Tcl_Obj *returnOpts; @@ -937,9 +937,9 @@ Tcl_SourceObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - CONST char *encodingName = NULL; + const char *encodingName = NULL; Tcl_Obj *fileName; if (objc != 2 && objc !=4) { @@ -950,7 +950,7 @@ Tcl_SourceObjCmd( fileName = objv[objc-1]; if (objc == 4) { - static CONST char *options[] = { + static const char *options[] = { "-encoding", NULL }; int index; @@ -987,7 +987,7 @@ Tcl_SplitObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_UniChar ch; int len; @@ -3304,9 +3304,9 @@ Tcl_SubstObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { - static CONST char *substOptions[] = { + static const char *substOptions[] = { "-nobackslashes", "-nocommands", "-novariables", NULL }; enum substOptions { @@ -3382,13 +3382,13 @@ Tcl_SwitchObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int i,j, index, mode, foundmode, result, splitObjs, numMatchesSaved; int noCase, patternLength; char *pattern; Tcl_Obj *stringObj, *indexVarObj, *matchVarObj; - Tcl_Obj *CONST *savedObjv = objv; + Tcl_Obj *const *savedObjv = objv; Tcl_RegExp regExpr = NULL; Interp *iPtr = (Interp *) interp; int pc = 0; @@ -3402,7 +3402,7 @@ Tcl_SwitchObjCmd( * -glob, you *must* fix TclCompileSwitchCmd's option parser as well. */ - static CONST char *options[] = { + static const char *options[] = { "-exact", "-glob", "-indexvar", "-matchvar", "-nocase", "-regexp", "--", NULL }; @@ -3862,7 +3862,7 @@ Tcl_TimeObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { register Tcl_Obj *objPtr; Tcl_Obj *objs[4]; @@ -3958,7 +3958,7 @@ Tcl_WhileObjCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ - Tcl_Obj *CONST objv[]) /* Argument objects. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { int result, value; Interp *iPtr = (Interp *) interp; @@ -4024,10 +4024,10 @@ TclListLines( Tcl_Obj* const* elems) /* The list elems as Tcl_Obj*, in need of * derived continuation data */ { - CONST char* listStr = Tcl_GetString (listObj); - CONST char* listHead = listStr; + const char* listStr = Tcl_GetString (listObj); + const char* listHead = listStr; int i, length = strlen(listStr); - CONST char *element = NULL, *next = NULL; + const char *element = NULL, *next = NULL; ContLineLoc* clLocPtr = TclContinuationsGet(listObj); int* clNext = (clLocPtr ? &clLocPtr->loc[0] : NULL); diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 60f95b6..999fe0a 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -438,7 +438,7 @@ static const unsigned char instruction[] = { * ParseLexeme(). */ -static unsigned char Lexeme[] = { +static const unsigned char Lexeme[] = { INVALID /* NUL */, INVALID /* SOH */, INVALID /* STX */, INVALID /* ETX */, INVALID /* EOT */, INVALID /* ENQ */, diff --git a/generic/tclConfig.c b/generic/tclConfig.c index 251868e..28549ed 100644 --- a/generic/tclConfig.c +++ b/generic/tclConfig.c @@ -213,7 +213,7 @@ QueryConfigObjCmd( Tcl_Obj *pkgName = cdPtr->pkg; Tcl_Obj *pDB, *pkgDict, *val, *listPtr; int n, index; - static CONST char *subcmdStrings[] = { + static const char *subcmdStrings[] = { "get", "list", NULL }; enum subcmds { diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index a4bea31..fb2f134 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -11,7 +11,7 @@ #include "tclInt.h" -typedef size_t (LengthProc)(CONST char *src); +typedef size_t (LengthProc)(const char *src); /* * The following data structure represents an encoding, which describes how to @@ -123,7 +123,7 @@ typedef struct EscapeEncodingData { } EscapeEncodingData; /* - * Constants used when loading an encoding file to identify the type of the + * constants used when loading an encoding file to identify the type of the * file. */ @@ -195,19 +195,19 @@ static unsigned short emptyPage[256]; */ static int BinaryProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static void DupEncodingIntRep(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); static void EscapeFreeProc(ClientData clientData); static int EscapeFromUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int EscapeToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); @@ -216,55 +216,55 @@ static void FreeEncoding(Tcl_Encoding encoding); static void FreeEncodingIntRep(Tcl_Obj *objPtr); static Encoding * GetTableEncoding(EscapeEncodingData *dataPtr, int state); -static Tcl_Encoding LoadEncodingFile(Tcl_Interp *interp, CONST char *name); -static Tcl_Encoding LoadTableEncoding(CONST char *name, int type, +static Tcl_Encoding LoadEncodingFile(Tcl_Interp *interp, const char *name); +static Tcl_Encoding LoadTableEncoding(const char *name, int type, Tcl_Channel chan); -static Tcl_Encoding LoadEscapeEncoding(CONST char *name, Tcl_Channel chan); +static Tcl_Encoding LoadEscapeEncoding(const char *name, Tcl_Channel chan); static Tcl_Channel OpenEncodingFileChannel(Tcl_Interp *interp, - CONST char *name); + const char *name); static void TableFreeProc(ClientData clientData); static int TableFromUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); -static int TableToUtfProc(ClientData clientData, CONST char *src, +static int TableToUtfProc(ClientData clientData, const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); -static size_t unilen(CONST char *src); +static size_t unilen(const char *src); static int UnicodeToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int UtfToUnicodeProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int UtfToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr, int pureNullMode); static int UtfIntToUtfExtProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int UtfExtToUtfIntProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int Iso88591FromUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); static int Iso88591ToUtfProc(ClientData clientData, - CONST char *src, int srcLen, int flags, + const char *src, int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst, int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr); @@ -304,7 +304,7 @@ Tcl_GetEncodingFromObj( Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr) { - CONST char *name = Tcl_GetString(objPtr); + const char *name = Tcl_GetString(objPtr); if (objPtr->typePtr != &encodingType) { Tcl_Encoding encoding = Tcl_GetEncoding(interp, name); @@ -692,7 +692,7 @@ TclFinalizeEncodingSubsystem(void) *------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_GetDefaultEncodingDir(void) { int numDirs; @@ -726,7 +726,7 @@ Tcl_GetDefaultEncodingDir(void) void Tcl_SetDefaultEncodingDir( - CONST char *path) + const char *path) { Tcl_Obj *searchPath = Tcl_GetEncodingSearchPath(); Tcl_Obj *directory = Tcl_NewStringObj(path, -1); @@ -764,7 +764,7 @@ Tcl_SetDefaultEncodingDir( Tcl_Encoding Tcl_GetEncoding( Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */ - CONST char *name) /* The name of the desired encoding. */ + const char *name) /* The name of the desired encoding. */ { Tcl_HashEntry *hPtr; Encoding *encodingPtr; @@ -877,7 +877,7 @@ FreeEncoding( *--------------------------------------------------------------------------- */ -CONST char * +const char * Tcl_GetEncodingName( Tcl_Encoding encoding) /* The encoding whose name to fetch. */ { @@ -984,7 +984,7 @@ Tcl_GetEncodingNames( int Tcl_SetSystemEncoding( Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */ - CONST char *name) /* The name of the desired encoding, or NULL/"" + const char *name) /* The name of the desired encoding, or NULL/"" * to reset to default encoding. */ { Tcl_Encoding encoding; @@ -1107,7 +1107,7 @@ char * Tcl_ExternalToUtfDString( Tcl_Encoding encoding, /* The encoding for the source string, or NULL * for the default system encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes, or < 0 for * encoding-specific string length. */ Tcl_DString *dstPtr) /* Uninitialized or free DString in which the @@ -1181,7 +1181,7 @@ Tcl_ExternalToUtf( Tcl_Interp *interp, /* Interp for error return, if not NULL. */ Tcl_Encoding encoding, /* The encoding for the source string, or NULL * for the default system encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes, or < 0 for * encoding-specific string length. */ int flags, /* Conversion control flags. */ @@ -1274,7 +1274,7 @@ char * Tcl_UtfToExternalDString( Tcl_Encoding encoding, /* The encoding for the converted string, or * NULL for the default system encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes, or < 0 for * strlen(). */ Tcl_DString *dstPtr) /* Uninitialized or free DString in which the @@ -1349,7 +1349,7 @@ Tcl_UtfToExternal( Tcl_Interp *interp, /* Interp for error return, if not NULL. */ Tcl_Encoding encoding, /* The encoding for the converted string, or * NULL for the default system encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes, or < 0 for * strlen(). */ int flags, /* Conversion control flags. */ @@ -1434,7 +1434,7 @@ Tcl_UtfToExternal( void Tcl_FindExecutable( - CONST char *argv0) /* The value of the application's argv[0] + const char *argv0) /* The value of the application's argv[0] * (native). */ { TclInitSubsystems(); @@ -1464,7 +1464,7 @@ Tcl_FindExecutable( static Tcl_Channel OpenEncodingFileChannel( Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */ - CONST char *name) /* The name of the encoding file on disk and + const char *name) /* The name of the encoding file on disk and * also the name for new encoding. */ { Tcl_Obj *nameObj = Tcl_NewStringObj(name, -1); @@ -1494,7 +1494,7 @@ OpenEncodingFileChannel( } } if (!verified) { - CONST char *dirString = Tcl_GetString(directory); + const char *dirString = Tcl_GetString(directory); for (i=0; i<numDirs && !verified; i++) { if (strcmp(dirString, Tcl_GetString(dir[i])) == 0) { verified = 1; @@ -1580,7 +1580,7 @@ OpenEncodingFileChannel( static Tcl_Encoding LoadEncodingFile( Tcl_Interp *interp, /* Interp for error reporting, if not NULL. */ - CONST char *name) /* The name of the encoding file on disk and + const char *name) /* The name of the encoding file on disk and * also the name for new encoding. */ { Tcl_Channel chan = NULL; @@ -1653,7 +1653,7 @@ LoadEncodingFile( static Tcl_Encoding LoadTableEncoding( - CONST char *name, /* Name for new encoding. */ + const char *name, /* Name for new encoding. */ int type, /* Type of encoding (ENCODING_?????). */ Tcl_Channel chan) /* File containing new encoding. */ { @@ -1672,7 +1672,7 @@ LoadTableEncoding( * sequences in the encoding files. */ - static char staticHex[] = { + static const char staticHex[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 ... 15 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16 ... 31 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 32 ... 47 */ @@ -1935,7 +1935,7 @@ LoadTableEncoding( static Tcl_Encoding LoadEscapeEncoding( - CONST char *name, /* Name for new encoding. */ + const char *name, /* Name for new encoding. */ Tcl_Channel chan) /* File containing new encoding. */ { int i; @@ -1951,7 +1951,7 @@ LoadEscapeEncoding( while (1) { int argc; - CONST char **argv; + const char **argv; char *line; Tcl_DString lineString; @@ -2056,7 +2056,7 @@ LoadEscapeEncoding( static int BinaryProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string (unknown encoding). */ + const char *src, /* Source string (unknown encoding). */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2117,7 +2117,7 @@ BinaryProc( static int UtfIntToUtfExtProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2165,7 +2165,7 @@ UtfIntToUtfExtProc( static int UtfExtToUtfIntProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2214,7 +2214,7 @@ UtfExtToUtfIntProc( static int UtfToUtfProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2241,7 +2241,7 @@ UtfToUtfProc( * representation to real null-bytes or vice * versa. */ { - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd; int result, numChars; Tcl_UniChar ch; @@ -2328,7 +2328,7 @@ UtfToUtfProc( static int UnicodeToUtfProc( ClientData clientData, /* Not used. */ - CONST char *src, /* Source string in Unicode. */ + const char *src, /* Source string in Unicode. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2352,7 +2352,7 @@ UnicodeToUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstEnd, *dstStart; int result, numChars; Tcl_UniChar ch; @@ -2414,7 +2414,7 @@ static int UtfToUnicodeProc( ClientData clientData, /* TableEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2438,7 +2438,7 @@ UtfToUnicodeProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd; + const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd; int result, numChars; Tcl_UniChar ch; @@ -2508,7 +2508,7 @@ static int TableToUtfProc( ClientData clientData, /* TableEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2532,7 +2532,7 @@ TableToUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstEnd, *dstStart, *prefixBytes; int result, byte, numChars; Tcl_UniChar ch; @@ -2617,7 +2617,7 @@ static int TableFromUtfProc( ClientData clientData, /* TableEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2641,7 +2641,7 @@ TableFromUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd, *prefixBytes; Tcl_UniChar ch; int result, len, word, numChars; @@ -2739,7 +2739,7 @@ TableFromUtfProc( static int Iso88591ToUtfProc( ClientData clientData, /* Ignored. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2763,7 +2763,7 @@ Iso88591ToUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstEnd, *dstStart; int result, numChars; @@ -2818,7 +2818,7 @@ Iso88591ToUtfProc( static int Iso88591FromUtfProc( ClientData clientData, /* Ignored. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2842,7 +2842,7 @@ Iso88591FromUtfProc( * correspond to the bytes stored in the * output buffer. */ { - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd; int result, numChars; @@ -2959,7 +2959,7 @@ static int EscapeToUtfProc( ClientData clientData, /* EscapeEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in specified encoding. */ + const char *src, /* Source string in specified encoding. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -2988,7 +2988,7 @@ EscapeToUtfProc( unsigned short **tableToUnicode; Encoding *encodingPtr; int state, result, numChars; - CONST char *srcStart, *srcEnd; + const char *srcStart, *srcEnd; char *dstStart, *dstEnd; result = TCL_OK; @@ -3173,7 +3173,7 @@ static int EscapeFromUtfProc( ClientData clientData, /* EscapeEncodingData that specifies * encoding. */ - CONST char *src, /* Source string in UTF-8. */ + const char *src, /* Source string in UTF-8. */ int srcLen, /* Source string length in bytes. */ int flags, /* Conversion control flags. */ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state @@ -3199,7 +3199,7 @@ EscapeFromUtfProc( { EscapeEncodingData *dataPtr; Encoding *encodingPtr; - CONST char *srcStart, *srcEnd, *srcClose; + const char *srcStart, *srcEnd, *srcClose; char *dstStart, *dstEnd; int state, result, numChars; TableEncodingData *tableDataPtr; @@ -3480,7 +3480,7 @@ GetTableEncoding( static size_t unilen( - CONST char *src) + const char *src) { unsigned short *p; diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 65b7db0..e28a5c7 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -145,7 +145,7 @@ doNothing(void) static char * Tcl_WinUtfToTChar(string, len, dsPtr) - CONST char *string; + const char *string; int len; Tcl_DString *dsPtr; { @@ -158,7 +158,7 @@ Tcl_WinUtfToTChar(string, len, dsPtr) static char * Tcl_WinTCharToUtf( - CONST char *string, + const char *string, int len, Tcl_DString *dsPtr) { @@ -170,16 +170,16 @@ Tcl_WinTCharToUtf( } #define Tcl_MacOSXOpenBundleResources (int (*) _ANSI_ARGS_(( \ - Tcl_Interp *, CONST char *, int, int, char *))) Tcl_WinUtfToTChar + Tcl_Interp *, const char *, int, int, char *))) Tcl_WinUtfToTChar #define Tcl_MacOSXOpenVersionedBundleResources (int (*) _ANSI_ARGS_(( \ - Tcl_Interp *, CONST char *, CONST char *, int, int, char *))) Tcl_WinTCharToUtf + Tcl_Interp *, const char *, const char *, int, int, char *))) Tcl_WinTCharToUtf #define TclMacOSXGetFileAttribute (int (*) _ANSI_ARGS_((Tcl_Interp *, \ int, Tcl_Obj *, Tcl_Obj **))) TclpCreateProcess -#define TclMacOSXMatchType (int (*) _ANSI_ARGS_((Tcl_Interp *, CONST char *, \ - CONST char *, Tcl_StatBuf *, Tcl_GlobTypeData *))) TclpMakeFile -#define TclMacOSXNotifierAddRunLoopMode (void (*) _ANSI_ARGS_((CONST void *))) TclpOpenFile -#define TclpLocaltime_unix (struct tm *(*) _ANSI_ARGS_((CONST time_t *))) TclGetAndDetachPids -#define TclpGmtime_unix (struct tm *(*) _ANSI_ARGS_((CONST time_t *))) TclpCloseFile +#define TclMacOSXMatchType (int (*) _ANSI_ARGS_((Tcl_Interp *, const char *, \ + const char *, Tcl_StatBuf *, Tcl_GlobTypeData *))) TclpMakeFile +#define TclMacOSXNotifierAddRunLoopMode (void (*) _ANSI_ARGS_((const void *))) TclpOpenFile +#define TclpLocaltime_unix (struct tm *(*) _ANSI_ARGS_((const time_t *))) TclGetAndDetachPids +#define TclpGmtime_unix (struct tm *(*) _ANSI_ARGS_((const time_t *))) TclpCloseFile #elif !defined(__WIN32__) /* UNIX and MAC */ # define TclWinConvertError (void (*) _ANSI_ARGS_((unsigned int))) TclGetAndDetachPids |