summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls16
-rw-r--r--generic/tclBasic.c8
-rw-r--r--generic/tclDecls.h15
-rw-r--r--generic/tclHash.c4
-rw-r--r--generic/tclIOUtil.c6
-rw-r--r--generic/tclObj.c4
-rw-r--r--generic/tclPlatDecls.h10
-rw-r--r--generic/tclVar.c6
8 files changed, 36 insertions, 33 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 45656ed..19b2344 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.78 2002/01/25 20:40:55 dgp Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.79 2002/01/25 21:36:09 dgp Exp $
library tcl
@@ -166,7 +166,7 @@ declare 39 generic {
int Tcl_GetLongFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr)
}
declare 40 generic {
- Tcl_ObjType * Tcl_GetObjType(char *typeName)
+ Tcl_ObjType * Tcl_GetObjType(CONST char *typeName)
}
declare 41 generic {
char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr)
@@ -948,7 +948,7 @@ declare 268 generic {
void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList)
}
declare 269 generic {
- char * Tcl_HashStats(Tcl_HashTable *tablePtr)
+ CONST char * Tcl_HashStats(Tcl_HashTable *tablePtr)
}
declare 270 generic {
CONST char * Tcl_ParseVar(Tcl_Interp *interp, char *str, char **termPtr)
@@ -1268,8 +1268,8 @@ declare 358 generic {
void Tcl_FreeParse (Tcl_Parse *parsePtr)
}
declare 359 generic {
- void Tcl_LogCommandInfo (Tcl_Interp *interp, char *script, \
- char *command, int length)
+ void Tcl_LogCommandInfo (Tcl_Interp *interp, CONST char *script, \
+ CONST char *command, int length)
}
declare 360 generic {
int Tcl_ParseBraces (Tcl_Interp *interp, char *string, \
@@ -1713,10 +1713,12 @@ interface tclPlat
# Added in Tcl 8.1
declare 0 win {
- TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len, Tcl_DString *dsPtr)
+ CONST TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len, \
+ Tcl_DString *dsPtr)
}
declare 1 win {
- char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len, Tcl_DString *dsPtr)
+ CONST char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len, \
+ Tcl_DString *dsPtr)
}
##################
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 0cf25fc..3ebdfb0 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.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: tclBasic.c,v 1.43 2001/12/14 20:31:22 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.44 2002/01/25 21:36:09 dgp Exp $
*/
#include "tclInt.h"
@@ -3064,15 +3064,15 @@ Tcl_EvalObjv(interp, objc, objv, flags)
void
Tcl_LogCommandInfo(interp, script, command, length)
Tcl_Interp *interp; /* Interpreter in which to log information. */
- char *script; /* First character in script containing
+ CONST char *script; /* First character in script containing
* command (must be <= command). */
- char *command; /* First character in command that
+ CONST char *command; /* First character in command that
* generated the error. */
int length; /* Number of bytes in command (-1 means
* use all bytes up to first null byte). */
{
char buffer[200];
- register char *p;
+ register CONST char *p;
char *ellipsis = "";
Interp *iPtr = (Interp *) interp;
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index b559f16..6fcf42a 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.78 2002/01/25 20:40:55 dgp Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.79 2002/01/25 21:36:09 dgp Exp $
*/
#ifndef _TCLDECLS
@@ -149,7 +149,7 @@ EXTERN int Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp * interp,
EXTERN int Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Obj * objPtr, long * longPtr));
/* 40 */
-EXTERN Tcl_ObjType * Tcl_GetObjType _ANSI_ARGS_((char * typeName));
+EXTERN Tcl_ObjType * Tcl_GetObjType _ANSI_ARGS_((CONST char * typeName));
/* 41 */
EXTERN char * Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj * objPtr,
int * lengthPtr));
@@ -879,7 +879,7 @@ EXTERN void Tcl_AppendResultVA _ANSI_ARGS_((Tcl_Interp * interp,
EXTERN void Tcl_AppendStringsToObjVA _ANSI_ARGS_((
Tcl_Obj * objPtr, va_list argList));
/* 269 */
-EXTERN char * Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable * tablePtr));
+EXTERN CONST char * Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable * tablePtr));
/* 270 */
EXTERN CONST char * Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp * interp,
char * str, char ** termPtr));
@@ -1139,7 +1139,8 @@ EXTERN Tcl_Obj * Tcl_EvalTokens _ANSI_ARGS_((Tcl_Interp * interp,
EXTERN void Tcl_FreeParse _ANSI_ARGS_((Tcl_Parse * parsePtr));
/* 359 */
EXTERN void Tcl_LogCommandInfo _ANSI_ARGS_((Tcl_Interp * interp,
- char * script, char * command, int length));
+ CONST char * script, CONST char * command,
+ int length));
/* 360 */
EXTERN int Tcl_ParseBraces _ANSI_ARGS_((Tcl_Interp * interp,
char * string, int numBytes,
@@ -1585,7 +1586,7 @@ typedef struct TclStubs {
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 */
- Tcl_ObjType * (*tcl_GetObjType) _ANSI_ARGS_((char * typeName)); /* 40 */
+ Tcl_ObjType * (*tcl_GetObjType) _ANSI_ARGS_((CONST char * typeName)); /* 40 */
char * (*tcl_GetStringFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 41 */
void (*tcl_InvalidateStringRep) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 42 */
int (*tcl_ListObjAppendList) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, Tcl_Obj * elemListPtr)); /* 43 */
@@ -1846,7 +1847,7 @@ typedef struct TclStubs {
void (*tcl_ValidateAllMemory) _ANSI_ARGS_((CONST char * file, int line)); /* 266 */
void (*tcl_AppendResultVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 267 */
void (*tcl_AppendStringsToObjVA) _ANSI_ARGS_((Tcl_Obj * objPtr, va_list argList)); /* 268 */
- char * (*tcl_HashStats) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 269 */
+ CONST char * (*tcl_HashStats) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 269 */
CONST char * (*tcl_ParseVar) _ANSI_ARGS_((Tcl_Interp * interp, char * str, char ** termPtr)); /* 270 */
CONST char * (*tcl_PkgPresent) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact)); /* 271 */
CONST char * (*tcl_PkgPresentEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr)); /* 272 */
@@ -1936,7 +1937,7 @@ typedef struct TclStubs {
Tcl_RegExp (*tcl_GetRegExpFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * patObj, int flags)); /* 356 */
Tcl_Obj * (*tcl_EvalTokens) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Token * tokenPtr, int count)); /* 357 */
void (*tcl_FreeParse) _ANSI_ARGS_((Tcl_Parse * parsePtr)); /* 358 */
- void (*tcl_LogCommandInfo) _ANSI_ARGS_((Tcl_Interp * interp, char * script, char * command, int length)); /* 359 */
+ void (*tcl_LogCommandInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * script, CONST char * command, int length)); /* 359 */
int (*tcl_ParseBraces) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int numBytes, Tcl_Parse * parsePtr, int append, char ** termPtr)); /* 360 */
int (*tcl_ParseCommand) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int numBytes, int nested, Tcl_Parse * parsePtr)); /* 361 */
int (*tcl_ParseExpr) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int numBytes, Tcl_Parse * parsePtr)); /* 362 */
diff --git a/generic/tclHash.c b/generic/tclHash.c
index a1075c5..41593f6 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.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: tclHash.c,v 1.9 2001/01/18 19:09:55 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclHash.c,v 1.10 2002/01/25 21:36:09 dgp Exp $
*/
#include "tclInt.h"
@@ -736,7 +736,7 @@ Tcl_NextHashEntry(searchPtr)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_HashStats(tablePtr)
Tcl_HashTable *tablePtr; /* Table for which to produce stats. */
{
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 2e1eb4b..7e3fffe 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.32 2002/01/25 20:40:55 dgp Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.33 2002/01/25 21:36:09 dgp Exp $
*/
#include "tclInt.h"
@@ -4134,9 +4134,9 @@ TclpNativeToNormalized(clientData)
Tcl_Obj *objPtr;
#ifdef __WIN32__
- Tcl_WinTCharToUtf((char*)clientData, -1, &ds);
+ Tcl_WinTCharToUtf((CONST char*)clientData, -1, &ds);
#else
- Tcl_ExternalToUtfDString(NULL, (char*)clientData, -1, &ds);
+ Tcl_ExternalToUtfDString(NULL, (CONST char*)clientData, -1, &ds);
#endif
objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds),Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
diff --git a/generic/tclObj.c b/generic/tclObj.c
index fabb80c..c895237 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.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: tclObj.c,v 1.27 2001/12/28 23:36:31 dgp Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.28 2002/01/25 21:36:09 dgp Exp $
*/
#include "tclInt.h"
@@ -400,7 +400,7 @@ Tcl_AppendAllObjTypes(interp, objPtr)
Tcl_ObjType *
Tcl_GetObjType(typeName)
- char *typeName; /* Name of Tcl object type to look up. */
+ CONST char *typeName; /* Name of Tcl object type to look up. */
{
register Tcl_HashEntry *hPtr;
Tcl_ObjType *typePtr;
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index f4ad40b..51ed55a 100644
--- a/generic/tclPlatDecls.h
+++ b/generic/tclPlatDecls.h
@@ -6,7 +6,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclPlatDecls.h,v 1.13 2002/01/25 20:40:55 dgp Exp $
+ * RCS: @(#) $Id: tclPlatDecls.h,v 1.14 2002/01/25 21:36:09 dgp Exp $
*/
#ifndef _TCLPLATDECLS
@@ -34,10 +34,10 @@
#ifdef __WIN32__
/* 0 */
-EXTERN TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str,
+EXTERN CONST TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str,
int len, Tcl_DString * dsPtr));
/* 1 */
-EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str,
+EXTERN CONST char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str,
int len, Tcl_DString * dsPtr));
#endif /* __WIN32__ */
#ifdef MAC_TCL
@@ -78,8 +78,8 @@ typedef struct TclPlatStubs {
struct TclPlatStubHooks *hooks;
#ifdef __WIN32__
- TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); /* 0 */
- char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); /* 1 */
+ CONST TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); /* 0 */
+ CONST char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); /* 1 */
#endif /* __WIN32__ */
#ifdef MAC_TCL
void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */
diff --git a/generic/tclVar.c b/generic/tclVar.c
index f632780..a827dea 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.46 2002/01/25 20:40:56 dgp Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.47 2002/01/25 21:36:09 dgp Exp $
*/
#include "tclInt.h"
@@ -3579,7 +3579,7 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv)
}
case ARRAY_STATISTICS: {
- char *stats;
+ CONST char *stats;
if (notArray) {
goto error;
@@ -3587,7 +3587,7 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv)
stats = Tcl_HashStats(varPtr->value.tablePtr);
if (stats != NULL) {
- Tcl_SetResult(interp, stats, TCL_VOLATILE);
+ Tcl_SetStringObj(Tcl_GetObjResult(interp), stats, -1);
ckfree((void *)stats);
} else {
Tcl_SetResult(interp, "error reading array statistics",