summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-09-24 21:10:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-09-24 21:10:32 (GMT)
commit85efd4f6340d3db40be6608dc383cf19efb4fecf (patch)
tree9fe3b099b7850769ca7b1bbf5be9ee6bcc10f7a4
parentbb93c0bc5c4d8116d1c04051c5f999615b5f06ff (diff)
downloadtcl-85efd4f6340d3db40be6608dc383cf19efb4fecf.zip
tcl-85efd4f6340d3db40be6608dc383cf19efb4fecf.tar.gz
tcl-85efd4f6340d3db40be6608dc383cf19efb4fecf.tar.bz2
* Updated APIs in
generic/tclUtil.c according to the guidelines of TIP 27. [Patch 464553]
-rw-r--r--ChangeLog14
-rw-r--r--doc/Concat.34
-rw-r--r--doc/DString.36
-rw-r--r--doc/SplitList.36
-rw-r--r--generic/tcl.decls12
-rw-r--r--generic/tclDecls.h19
-rw-r--r--generic/tclEncoding.c4
-rw-r--r--generic/tclInt.decls6
-rw-r--r--generic/tclInt.h5
-rw-r--r--generic/tclIntDecls.h11
-rw-r--r--generic/tclMain.c5
-rw-r--r--generic/tclUtil.c34
-rw-r--r--unix/tclLoadDl.c4
13 files changed, 74 insertions, 56 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a1fbc2..298993f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2001-09-24 Don Porter <dgp@users.sourceforge.net>
+
+ * doc/{Concat,DString,SplitList}.3:
+ * generic/tclInt.h (TclCheckBadOctal):
+ * generic/tcl{,Int}.decls:
+ * generic/tclEncoding.c (OpenEncodingFile):
+ * generic/tclMain.c (Tcl_Main):
+ * generic/tclUtil.c:
+ * unix/tclLoadDl.c (TclpLoadFile): Updated APIs in
+ generic/tclUtil.c according to the guidelines of TIP 27.
+ [Patch 464553]
+
+ * generic/tcl{Int}Decls.h: make genstubs
+
2001-09-24 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* The change below fixes [Bug #464380]. The bug was reported by
diff --git a/doc/Concat.3 b/doc/Concat.3
index edebc01..83c5c30 100644
--- a/doc/Concat.3
+++ b/doc/Concat.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Concat.3,v 1.2 1998/09/14 18:39:46 stanton Exp $
+'\" RCS: @(#) $Id: Concat.3,v 1.3 2001/09/24 21:10:32 dgp Exp $
'\"
.so man.macros
.TH Tcl_Concat 3 7.5 Tcl "Tcl Library Procedures"
@@ -21,7 +21,7 @@ char *
.SH ARGUMENTS
.AP int argc in
Number of strings.
-.AP char *argv[] in
+.AP "char * CONST" argv[] in
Array of strings to concatenate. Must have \fIargc\fR entries.
.BE
diff --git a/doc/DString.3 b/doc/DString.3
index ae2b966..65e66fd 100644
--- a/doc/DString.3
+++ b/doc/DString.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: DString.3,v 1.5 2000/04/14 23:01:50 hobbs Exp $
+'\" RCS: @(#) $Id: DString.3,v 1.6 2001/09/24 21:10:32 dgp Exp $
'\"
.so man.macros
.TH Tcl_DString 3 7.4 Tcl "Tcl Library Procedures"
@@ -18,10 +18,10 @@ Tcl_DStringInit, Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_DStringStartSu
.sp
\fBTcl_DStringInit\fR(\fIdsPtr\fR)
.sp
-char *
+CONST char *
\fBTcl_DStringAppend\fR(\fIdsPtr, string, length\fR)
.sp
-char *
+CONST char *
\fBTcl_DStringAppendElement\fR(\fIdsPtr, string\fR)
.sp
\fBTcl_DStringStartSublist\fR(\fIdsPtr\fR)
diff --git a/doc/SplitList.3 b/doc/SplitList.3
index f6aa772..0548606 100644
--- a/doc/SplitList.3
+++ b/doc/SplitList.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: SplitList.3,v 1.4 2000/07/24 00:03:02 jenglish Exp $
+'\" RCS: @(#) $Id: SplitList.3,v 1.5 2001/09/24 21:10:32 dgp Exp $
'\"
.so man.macros
.TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures"
@@ -49,10 +49,10 @@ There will be \fI*argcPtr\fR valid entries in the array, followed by
a NULL entry.
.AP int argc in
Number of elements in \fIargv\fR.
-.AP char **argv in
+.AP "char * CONST" *argv in
Array of strings to merge together into a single list.
Each string will become a separate element of the list.
-.AP char *src in
+.AP "CONST char" *src in
String that is to become an element of a list.
.AP int *flagsPtr in
Pointer to word to fill in with information about \fIsrc\fR.
diff --git a/generic/tcl.decls b/generic/tcl.decls
index b53bdad..3ea0526 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.58 2001/09/13 11:56:19 msofer Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.59 2001/09/24 21:10:32 dgp Exp $
library tcl
@@ -306,7 +306,7 @@ declare 82 generic {
int Tcl_CommandComplete(char *cmd)
}
declare 83 generic {
- char * Tcl_Concat(int argc, char **argv)
+ char * Tcl_Concat(int argc, char * CONST *argv)
}
declare 84 generic {
int Tcl_ConvertElement(CONST char *src, char *dst, int flags)
@@ -430,10 +430,12 @@ declare 116 generic {
void Tcl_DoWhenIdle(Tcl_IdleProc *proc, ClientData clientData)
}
declare 117 generic {
- char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *str, int length)
+ CONST char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *str, \
+ int length)
}
declare 118 generic {
- char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, CONST char *string)
+ CONST char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, \
+ CONST char *string)
}
declare 119 generic {
void Tcl_DStringEndSublist(Tcl_DString *dsPtr)
@@ -680,7 +682,7 @@ declare 191 generic {
Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket)
}
declare 192 generic {
- char * Tcl_Merge(int argc, char **argv)
+ char * Tcl_Merge(int argc, char * CONST *argv)
}
declare 193 generic {
Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr)
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 9670564..fca0fca 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.58 2001/09/13 11:56:19 msofer Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.59 2001/09/24 21:10:32 dgp Exp $
*/
#ifndef _TCLDECLS
@@ -273,7 +273,8 @@ EXTERN int Tcl_Close _ANSI_ARGS_((Tcl_Interp * interp,
/* 82 */
EXTERN int Tcl_CommandComplete _ANSI_ARGS_((char * cmd));
/* 83 */
-EXTERN char * Tcl_Concat _ANSI_ARGS_((int argc, char ** argv));
+EXTERN char * Tcl_Concat _ANSI_ARGS_((int argc,
+ char * CONST * argv));
/* 84 */
EXTERN int Tcl_ConvertElement _ANSI_ARGS_((CONST char * src,
char * dst, int flags));
@@ -400,10 +401,10 @@ EXTERN int Tcl_DoOneEvent _ANSI_ARGS_((int flags));
EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc * proc,
ClientData clientData));
/* 117 */
-EXTERN char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr,
+EXTERN CONST char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr,
CONST char * str, int length));
/* 118 */
-EXTERN char * Tcl_DStringAppendElement _ANSI_ARGS_((
+EXTERN CONST char * Tcl_DStringAppendElement _ANSI_ARGS_((
Tcl_DString * dsPtr, CONST char * string));
/* 119 */
EXTERN void Tcl_DStringEndSublist _ANSI_ARGS_((
@@ -611,7 +612,7 @@ EXTERN int Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp * interp));
EXTERN Tcl_Channel Tcl_MakeTcpClientChannel _ANSI_ARGS_((
ClientData tcpSocket));
/* 192 */
-EXTERN char * Tcl_Merge _ANSI_ARGS_((int argc, char ** argv));
+EXTERN char * Tcl_Merge _ANSI_ARGS_((int argc, char * CONST * argv));
/* 193 */
EXTERN Tcl_HashEntry * Tcl_NextHashEntry _ANSI_ARGS_((
Tcl_HashSearch * searchPtr));
@@ -1614,7 +1615,7 @@ typedef struct TclStubs {
void (*tcl_CancelIdleCall) _ANSI_ARGS_((Tcl_IdleProc * idleProc, ClientData clientData)); /* 80 */
int (*tcl_Close) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 81 */
int (*tcl_CommandComplete) _ANSI_ARGS_((char * cmd)); /* 82 */
- char * (*tcl_Concat) _ANSI_ARGS_((int argc, char ** argv)); /* 83 */
+ char * (*tcl_Concat) _ANSI_ARGS_((int argc, char * CONST * argv)); /* 83 */
int (*tcl_ConvertElement) _ANSI_ARGS_((CONST char * src, char * dst, int flags)); /* 84 */
int (*tcl_ConvertCountedElement) _ANSI_ARGS_((CONST char * src, int length, char * dst, int flags)); /* 85 */
int (*tcl_CreateAlias) _ANSI_ARGS_((Tcl_Interp * slave, char * slaveCmd, Tcl_Interp * target, char * targetCmd, int argc, char ** argv)); /* 86 */
@@ -1656,8 +1657,8 @@ typedef struct TclStubs {
void (*tcl_DontCallWhenDeleted) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 114 */
int (*tcl_DoOneEvent) _ANSI_ARGS_((int flags)); /* 115 */
void (*tcl_DoWhenIdle) _ANSI_ARGS_((Tcl_IdleProc * proc, ClientData clientData)); /* 116 */
- char * (*tcl_DStringAppend) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * str, int length)); /* 117 */
- char * (*tcl_DStringAppendElement) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * string)); /* 118 */
+ CONST char * (*tcl_DStringAppend) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * str, int length)); /* 117 */
+ CONST char * (*tcl_DStringAppendElement) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * string)); /* 118 */
void (*tcl_DStringEndSublist) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 119 */
void (*tcl_DStringFree) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 120 */
void (*tcl_DStringGetResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * dsPtr)); /* 121 */
@@ -1739,7 +1740,7 @@ typedef struct TclStubs {
Tcl_Channel (*tcl_MakeFileChannel) _ANSI_ARGS_((ClientData handle, int mode)); /* 189 */
int (*tcl_MakeSafe) _ANSI_ARGS_((Tcl_Interp * interp)); /* 190 */
Tcl_Channel (*tcl_MakeTcpClientChannel) _ANSI_ARGS_((ClientData tcpSocket)); /* 191 */
- char * (*tcl_Merge) _ANSI_ARGS_((int argc, char ** argv)); /* 192 */
+ char * (*tcl_Merge) _ANSI_ARGS_((int argc, char * CONST * argv)); /* 192 */
Tcl_HashEntry * (*tcl_NextHashEntry) _ANSI_ARGS_((Tcl_HashSearch * searchPtr)); /* 193 */
void (*tcl_NotifyChannel) _ANSI_ARGS_((Tcl_Channel channel, int mask)); /* 194 */
Tcl_Obj * (*tcl_ObjGetVar2) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags)); /* 195 */
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index f7bc742..b69e2c0 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.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: tclEncoding.c,v 1.7 2001/07/31 19:12:06 vincentdarley Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.8 2001/09/24 21:10:32 dgp Exp $
*/
#include "tclInt.h"
@@ -1282,7 +1282,7 @@ OpenEncodingFile(dir, name)
{
char *argv[3];
Tcl_DString pathString;
- char *path;
+ CONST char *path;
Tcl_Channel chan;
Tcl_Obj *pathPtr;
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index ef88533..575d110 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.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: tclInt.decls,v 1.31 2001/09/10 17:17:41 andreas_kupries Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.32 2001/09/24 21:10:32 dgp Exp $
library tcl
@@ -243,7 +243,7 @@ declare 58 generic {
# Tcl_DString *dirPtr, char *pattern, char *tail)
#}
declare 60 generic {
- int TclNeedSpace(char *start, char *end)
+ int TclNeedSpace(CONST char *start, CONST char *end)
}
declare 61 generic {
Tcl_Obj * TclNewProcBodyObj(Proc *procPtr)
@@ -532,7 +532,7 @@ declare 138 generic {
# Tcl_PackageInitProc **proc2Ptr, ClientData *clientDataPtr)
#}
declare 140 generic {
- int TclLooksLikeInt(char *bytes, int length)
+ int TclLooksLikeInt(CONST char *bytes, int length)
}
# This is used by TclX, but should otherwise be considered private
declare 141 generic {
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 5565338..eddf120 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.64 2001/09/08 14:05:09 vincentdarley Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.65 2001/09/24 21:10:32 dgp Exp $
*/
#ifndef _TCLINT
@@ -1617,7 +1617,7 @@ EXTERN void TclAllocateFreeObjects _ANSI_ARGS_((void));
EXTERN int TclArraySet _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj));
EXTERN int TclCheckBadOctal _ANSI_ARGS_((Tcl_Interp *interp,
- char *value));
+ CONST char *value));
EXTERN int TclCleanupChildren _ANSI_ARGS_((Tcl_Interp *interp,
int numPids, Tcl_Pid *pidPtr,
Tcl_Channel errorChan));
@@ -1753,7 +1753,6 @@ EXTERN Var * TclLookupVar _ANSI_ARGS_((Tcl_Interp *interp,
int createPart1, int createPart2,
Var **arrayPtrPtr));
EXTERN int TclMathInProgress _ANSI_ARGS_((void));
-EXTERN int TclNeedSpace _ANSI_ARGS_((char *start, char *end));
EXTERN Tcl_Obj * TclNewProcBodyObj _ANSI_ARGS_((Proc *procPtr));
EXTERN int TclObjCommandComplete _ANSI_ARGS_((Tcl_Obj *cmdPtr));
EXTERN int TclObjInterpProc _ANSI_ARGS_((ClientData clientData,
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 47e08ad..a89c8bc 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIntDecls.h,v 1.26 2001/08/30 08:53:14 vincentdarley Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.27 2001/09/24 21:10:32 dgp Exp $
*/
#ifndef _TCLINTDECLS
@@ -214,7 +214,8 @@ EXTERN Var * TclLookupVar _ANSI_ARGS_((Tcl_Interp * interp,
Var ** arrayPtrPtr));
/* Slot 59 is reserved */
/* 60 */
-EXTERN int TclNeedSpace _ANSI_ARGS_((char * start, char * end));
+EXTERN int TclNeedSpace _ANSI_ARGS_((CONST char * start,
+ CONST char * end));
/* 61 */
EXTERN Tcl_Obj * TclNewProcBodyObj _ANSI_ARGS_((Proc * procPtr));
/* 62 */
@@ -429,7 +430,7 @@ EXTERN char * TclGetEnv _ANSI_ARGS_((CONST char * name,
Tcl_DString * valuePtr));
/* Slot 139 is reserved */
/* 140 */
-EXTERN int TclLooksLikeInt _ANSI_ARGS_((char * bytes,
+EXTERN int TclLooksLikeInt _ANSI_ARGS_((CONST char * bytes,
int length));
/* 141 */
EXTERN char * TclpGetCwd _ANSI_ARGS_((Tcl_Interp * interp,
@@ -569,7 +570,7 @@ typedef struct TclIntStubs {
void *reserved57;
Var * (*tclLookupVar) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags, char * msg, int createPart1, int createPart2, Var ** arrayPtrPtr)); /* 58 */
void *reserved59;
- int (*tclNeedSpace) _ANSI_ARGS_((char * start, char * end)); /* 60 */
+ int (*tclNeedSpace) _ANSI_ARGS_((CONST char * start, CONST char * end)); /* 60 */
Tcl_Obj * (*tclNewProcBodyObj) _ANSI_ARGS_((Proc * procPtr)); /* 61 */
int (*tclObjCommandComplete) _ANSI_ARGS_((Tcl_Obj * cmdPtr)); /* 62 */
int (*tclObjInterpProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[])); /* 63 */
@@ -665,7 +666,7 @@ typedef struct TclIntStubs {
void *reserved137;
char * (*tclGetEnv) _ANSI_ARGS_((CONST char * name, Tcl_DString * valuePtr)); /* 138 */
void *reserved139;
- int (*tclLooksLikeInt) _ANSI_ARGS_((char * bytes, int length)); /* 140 */
+ int (*tclLooksLikeInt) _ANSI_ARGS_((CONST char * bytes, int length)); /* 140 */
char * (*tclpGetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 141 */
int (*tclSetByteCodeFromAny) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CompileHookProc * hookProc, ClientData clientData)); /* 142 */
int (*tclAddLiteralObj) _ANSI_ARGS_((struct CompileEnv * envPtr, Tcl_Obj * objPtr, LiteralEntry ** litPtrPtr)); /* 143 */
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 479ef52..8ad20d5 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.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: tclMain.c,v 1.12 2001/04/04 23:26:03 dgp Exp $
+ * RCS: @(#) $Id: tclMain.c,v 1.13 2001/09/24 21:10:32 dgp Exp $
*/
#include "tcl.h"
@@ -459,7 +459,8 @@ StdinProc(clientData, mask)
(void) Tcl_DStringAppend(&tsdPtr->command, Tcl_DStringValue(
&tsdPtr->line), -1);
- cmd = Tcl_DStringAppend(&tsdPtr->command, "\n", -1);
+ Tcl_DStringAppend(&tsdPtr->command, "\n", -1);
+ cmd = Tcl_DStringValue(&tsdPtr->command);
Tcl_DStringFree(&tsdPtr->line);
if (!Tcl_CommandComplete(cmd)) {
gotPartial = 1;
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 0afef5c..0eca255 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.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: tclUtil.c,v 1.23 2001/09/19 08:52:46 dkf Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.24 2001/09/24 21:10:32 dgp Exp $
*/
#include "tclInt.h"
@@ -318,11 +318,11 @@ TclFindElement(interp, list, listLength, elementPtr, nextPtr, sizePtr,
* Copy a string and eliminate any backslashes that aren't in braces.
*
* Results:
- * There is no return value. Count characters get copied from src to
- * dst. Along the way, if backslash sequences are found outside braces,
- * the backslashes are eliminated in the copy. After scanning count
- * chars from source, a null character is placed at the end of dst.
- * Returns the number of characters that got copied.
+ * Count characters get copied from src to dst. Along the way, if
+ * backslash sequences are found outside braces, the backslashes are
+ * eliminated in the copy. After scanning count chars from source, a
+ * null character is placed at the end of dst. Returns the number
+ * of characters that got copied.
*
* Side effects:
* None.
@@ -822,7 +822,7 @@ Tcl_ConvertCountedElement(src, length, dst, flags)
char *
Tcl_Merge(argc, argv)
int argc; /* How many strings to merge. */
- char **argv; /* Array of string values. */
+ char * CONST *argv; /* Array of string values. */
{
# define LOCAL_SIZE 20
int localFlags[LOCAL_SIZE], *flagPtr;
@@ -925,7 +925,7 @@ Tcl_Backslash(src, readPtr)
char *
Tcl_Concat(argc, argv)
int argc; /* Number of strings to concatenate. */
- char **argv; /* Array of strings to concatenate. */
+ char * CONST *argv; /* Array of strings to concatenate. */
{
int totalSize, i;
char *p;
@@ -940,7 +940,7 @@ Tcl_Concat(argc, argv)
return result;
}
for (p = result, i = 0; i < argc; i++) {
- char *element;
+ CONST char *element;
int length;
/*
@@ -1373,7 +1373,7 @@ Tcl_DStringInit(dsPtr)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_DStringAppend(dsPtr, string, length)
Tcl_DString *dsPtr; /* Structure describing dynamic string. */
CONST char *string; /* String to append. If length is -1 then
@@ -1444,7 +1444,7 @@ Tcl_DStringAppend(dsPtr, string, length)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_DStringAppendElement(dsPtr, string)
Tcl_DString *dsPtr; /* Structure describing dynamic string. */
CONST char *string; /* String to append. Must be
@@ -1927,8 +1927,8 @@ TclPrecTraceProc(clientData, interp, name1, name2, flags)
int
TclNeedSpace(start, end)
- char *start; /* First character in string. */
- char *end; /* End of string (place where space will
+ CONST char *start; /* First character in string. */
+ CONST char *end; /* End of string (place where space will
* be added, if appropriate). */
{
Tcl_UniChar ch;
@@ -2079,13 +2079,13 @@ TclFormatInt(buffer, n)
int
TclLooksLikeInt(bytes, length)
- register char *bytes; /* Points to first byte of the string. */
+ register CONST char *bytes; /* Points to first byte of the string. */
int length; /* Number of bytes in the string. If < 0
* bytes up to the first null byte are
* considered (if they may appear in an
* integer). */
{
- register char *p, *end;
+ register CONST char *p, *end;
if (length < 0) {
length = (bytes? strlen(bytes) : 0);
@@ -2222,9 +2222,9 @@ TclCheckBadOctal(interp, value)
Tcl_Interp *interp; /* Interpreter to use for error reporting.
* If NULL, then no error message is left
* after errors. */
- char *value; /* String to check. */
+ CONST char *value; /* String to check. */
{
- register char *p = value;
+ register CONST char *p = value;
/*
* A frequent mistake is invalid octal values due to an unwanted
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index 1d20521..7eeaefa 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.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: tclLoadDl.c,v 1.5 2001/09/04 18:06:34 vincentdarley Exp $
+ * RCS: @(#) $Id: tclLoadDl.c,v 1.6 2001/09/24 21:10:32 dgp Exp $
*/
#include "tclInt.h"
@@ -77,7 +77,7 @@ TclpLoadFile(interp, pathPtr, sym1, sym2, proc1Ptr, proc2Ptr,
{
VOID *handle;
Tcl_DString newName, ds;
- char *native;
+ CONST char *native;
native = Tcl_FSGetNativePath(pathPtr);
handle = dlopen(native, RTLD_NOW | RTLD_GLOBAL); /* INTL: Native. */