summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-02-08 02:52:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-02-08 02:52:54 (GMT)
commit699c1642cb20fb2195b33c4fd04a2ec582507776 (patch)
tree078abed0538e74a4b78aa55d46462fe102978f63
parentc11c702cfe6d98893a8ac09baefbf98a868f6b32 (diff)
downloadtcl-699c1642cb20fb2195b33c4fd04a2ec582507776.zip
tcl-699c1642cb20fb2195b33c4fd04a2ec582507776.tar.gz
tcl-699c1642cb20fb2195b33c4fd04a2ec582507776.tar.bz2
* Partial TIP 27 rollback. Following routines
restored to return (char *): Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_JoinPath, Tcl_TranslateFileName, Tcl_ExternalToUtfDString, Tcl_UtfToExternalDString, Tcl_UniCharToUtfDString, Tcl_GetCwd, Tcl_WinTCharToUtf. Also restored Tcl_WinUtfToTChar to return (TCHAR *) and Tcl_UtfToUniCharDString to return (Tcl_UniChar *). Modified some callers. This change recognizes that Tcl_DStrings are de-facto white-box objects. * generic/tclCmdMZ.c: corrected use of C++-style comment.
-rw-r--r--doc/DString.36
-rw-r--r--doc/Encoding.310
-rwxr-xr-xdoc/GetCwd.34
-rw-r--r--doc/SplitPath.34
-rw-r--r--doc/Translate.34
-rw-r--r--doc/Utf.36
-rw-r--r--generic/tcl.decls24
-rw-r--r--generic/tcl.h6
-rw-r--r--generic/tclCmdMZ.c4
-rw-r--r--generic/tclDecls.h38
-rw-r--r--generic/tclEncoding.c6
-rw-r--r--generic/tclEnv.c8
-rw-r--r--generic/tclFileName.c6
-rw-r--r--generic/tclIOUtil.c4
-rw-r--r--generic/tclPlatDecls.h10
-rw-r--r--generic/tclUtf.c6
-rw-r--r--generic/tclUtil.c6
-rw-r--r--mac/tclMacInit.c5
-rw-r--r--unix/tclUnixFile.c8
-rw-r--r--unix/tclUnixInit.c8
-rw-r--r--unix/tclUnixPipe.c5
-rw-r--r--win/tclWin32Dll.c6
-rw-r--r--win/tclWinFCmd.c5
-rw-r--r--win/tclWinFile.c14
-rw-r--r--win/tclWinInit.c5
25 files changed, 98 insertions, 110 deletions
diff --git a/doc/DString.3 b/doc/DString.3
index c0fe723..2698696 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.8 2002/01/17 15:24:43 dgp Exp $
+'\" RCS: @(#) $Id: DString.3,v 1.9 2002/02/08 02:52:54 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
-CONST char *
+char *
\fBTcl_DStringAppend\fR(\fIdsPtr, string, length\fR)
.sp
-CONST char *
+char *
\fBTcl_DStringAppendElement\fR(\fIdsPtr, string\fR)
.sp
\fBTcl_DStringStartSublist\fR(\fIdsPtr\fR)
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index b921a09..12f8b93 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Encoding.3,v 1.9 2002/01/25 21:36:09 dgp Exp $
+'\" RCS: @(#) $Id: Encoding.3,v 1.10 2002/02/08 02:52:54 dgp Exp $
'\"
.so man.macros
.TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures"
@@ -21,24 +21,24 @@ Tcl_Encoding
void
\fBTcl_FreeEncoding\fR(\fIencoding\fR)
.sp
-CONST char *
+char *
\fBTcl_ExternalToUtfDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
int
\fBTcl_ExternalToUtf\fR(\fIinterp, encoding, src, srcLen, flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
dstCharsPtr\fR)
.sp
-CONST char *
+char *
\fBTcl_UtfToExternalDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
int
\fBTcl_UtfToExternal\fR(\fIinterp, encoding, src, srcLen, flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
dstCharsPtr\fR)
.sp
-CONST char *
+char *
\fBTcl_WinTCharToUtf\fR(\fItsrc, srcLen, dstPtr\fR)
.sp
-CONST TCHAR *
+TCHAR *
\fBTcl_WinUtfToTChar\fR(\fIsrc, srcLen, dstPtr\fR)
.sp
CONST char *
diff --git a/doc/GetCwd.3 b/doc/GetCwd.3
index c15d837..f154124 100755
--- a/doc/GetCwd.3
+++ b/doc/GetCwd.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: GetCwd.3,v 1.4 2002/01/29 02:28:20 hobbs Exp $
+'\" RCS: @(#) $Id: GetCwd.3,v 1.5 2002/02/08 02:52:54 dgp Exp $
'\"
.so man.macros
.TH Tcl_GetCwd 3 8.1 Tcl "Tcl Library Procedures"
@@ -15,7 +15,7 @@ Tcl_GetCwd, Tcl_Chdir \- manipulate the current working directory
.nf
\fB#include <tcl.h>\fR
.sp
-CONST char *
+char *
\fBTcl_GetCwd\fR(\fIinterp\fR, \fIbufferPtr\fR)
.sp
int
diff --git a/doc/SplitPath.3 b/doc/SplitPath.3
index 9013dd0..8a04901 100644
--- a/doc/SplitPath.3
+++ b/doc/SplitPath.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: SplitPath.3,v 1.5 2002/01/25 20:40:55 dgp Exp $
+'\" RCS: @(#) $Id: SplitPath.3,v 1.6 2002/02/08 02:52:54 dgp Exp $
'\"
.so man.macros
.TH Tcl_SplitPath 3 7.5 Tcl "Tcl Library Procedures"
@@ -17,7 +17,7 @@ Tcl_SplitPath, Tcl_JoinPath, Tcl_GetPathType \- manipulate platform-dependent fi
.sp
\fBTcl_SplitPath\fR(\fIpath, argcPtr, argvPtr\fR)
.sp
-CONST char *
+char *
\fBTcl_JoinPath\fR(\fIargc, argv, resultPtr\fR)
.sp
Tcl_PathType
diff --git a/doc/Translate.3 b/doc/Translate.3
index ff4a989..1e26d4d 100644
--- a/doc/Translate.3
+++ b/doc/Translate.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: Translate.3,v 1.5 2002/01/25 20:40:55 dgp Exp $
+'\" RCS: @(#) $Id: Translate.3,v 1.6 2002/02/08 02:52:54 dgp Exp $
'\"
.so man.macros
.TH Tcl_TranslateFileName 3 8.1 Tcl "Tcl Library Procedures"
@@ -16,7 +16,7 @@ Tcl_TranslateFileName \- convert file name to native form and replace tilde with
.nf
\fB#include <tcl.h>\fR
.sp
-CONST char *
+char *
\fBTcl_TranslateFileName\fR(\fIinterp\fR, \fIname\fR, \fIbufferPtr\fR)
.SH ARGUMENTS
.AS Tcl_DString *bufferPtr
diff --git a/doc/Utf.3 b/doc/Utf.3
index 2cab940..23a49d5 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Utf.3,v 1.11 2002/01/17 03:03:10 dgp Exp $
+'\" RCS: @(#) $Id: Utf.3,v 1.12 2002/02/08 02:52:54 dgp Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
@@ -24,10 +24,10 @@ int
\fBTcl_UtfToUniChar\fR(\fIsrc, chPtr\fR)
.VS 8.4
.sp
-CONST char *
+char *
\fBTcl_UniCharToUtfDString\fR(\fIuniStr, numChars, dstPtr\fR)
.sp
-CONST Tcl_UniChar *
+Tcl_UniChar *
\fBTcl_UtfToUniCharDString\fR(\fIsrc, len, dstPtr\fR)
.VE 8.4
.sp
diff --git a/generic/tcl.decls b/generic/tcl.decls
index f577221..c17195f 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.80 2002/01/31 04:39:43 dgp Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.81 2002/02/08 02:52:54 dgp Exp $
library tcl
@@ -431,11 +431,11 @@ declare 116 generic {
void Tcl_DoWhenIdle(Tcl_IdleProc *proc, ClientData clientData)
}
declare 117 generic {
- CONST char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *str, \
+ char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *str, \
int length)
}
declare 118 generic {
- CONST char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, \
+ char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, \
CONST char *string)
}
declare 119 generic {
@@ -663,7 +663,7 @@ declare 185 generic {
}
# Obsolete, use Tcl_FSJoinPath
declare 186 generic {
- CONST char * Tcl_JoinPath(int argc, CONST84 char * CONST *argv,
+ char * Tcl_JoinPath(int argc, CONST84 char * CONST *argv,
Tcl_DString *resultPtr)
}
declare 187 generic {
@@ -878,7 +878,7 @@ declare 248 generic {
int flags, Tcl_VarTraceProc *proc, ClientData clientData)
}
declare 249 generic {
- CONST char * Tcl_TranslateFileName(Tcl_Interp *interp, CONST char *name, \
+ char * Tcl_TranslateFileName(Tcl_Interp *interp, CONST char *name, \
Tcl_DString *bufferPtr)
}
declare 250 generic {
@@ -1062,7 +1062,7 @@ declare 295 generic {
int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr)
}
declare 296 generic {
- CONST char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding, \
+ char * Tcl_ExternalToUtfDString(Tcl_Encoding encoding, \
CONST char *src, int srcLen, Tcl_DString *dsPtr)
}
declare 297 generic {
@@ -1184,7 +1184,7 @@ declare 332 generic {
int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr)
}
declare 333 generic {
- CONST char * Tcl_UtfToExternalDString(Tcl_Encoding encoding, \
+ char * Tcl_UtfToExternalDString(Tcl_Encoding encoding, \
CONST char *src, int srcLen, Tcl_DString *dsPtr)
}
declare 334 generic {
@@ -1249,11 +1249,11 @@ declare 353 generic {
unsigned long n)
}
declare 354 generic {
- CONST char * Tcl_UniCharToUtfDString(CONST Tcl_UniChar *string, \
+ char * Tcl_UniCharToUtfDString(CONST Tcl_UniChar *string, \
int numChars, Tcl_DString *dsPtr)
}
declare 355 generic {
- CONST Tcl_UniChar * Tcl_UtfToUniCharDString(CONST char *string, \
+ Tcl_UniChar * Tcl_UtfToUniCharDString(CONST char *string, \
int length, Tcl_DString *dsPtr)
}
declare 356 generic {
@@ -1294,7 +1294,7 @@ declare 364 generic {
# These 4 functions are obsolete, use Tcl_FSGetCwd, Tcl_FSChdir,
# Tcl_FSAccess and Tcl_FSStat
declare 365 generic {
- CONST char *Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr)
+ char *Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr)
}
declare 366 generic {
int Tcl_Chdir(CONST char *dirName)
@@ -1713,11 +1713,11 @@ interface tclPlat
# Added in Tcl 8.1
declare 0 win {
- CONST TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len, \
+ TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len, \
Tcl_DString *dsPtr)
}
declare 1 win {
- CONST char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len, \
+ char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len, \
Tcl_DString *dsPtr)
}
diff --git a/generic/tcl.h b/generic/tcl.h
index 5f40916..b95e9a8 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.112 2002/01/31 04:39:43 dgp Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.113 2002/02/08 02:52:54 dgp Exp $
*/
#ifndef _TCL
@@ -857,8 +857,8 @@ typedef struct Tcl_CmdInfo {
/*
* The structure defined below is used to hold dynamic strings. The only
- * field that clients should use is the string field, and they should
- * never modify it.
+ * field that clients should use is the string field, accessible via the
+ * macro Tcl_DStringValue.
*/
#define TCL_DSTRING_STATIC_SIZE 200
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 34f7fec..204f1ae 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -14,7 +14,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.58 2002/02/07 00:56:02 hobbs Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.59 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -775,7 +775,7 @@ Tcl_RegsubObjCmd(dummy, interp, objc, objv)
* On zero matches, just ignore the offset, since it shouldn't
* matter to us in this case, and the user may have skewed it.
*/
- //Tcl_AppendUnicodeToObj(resultPtr, wstring, wlen);
+ /*Tcl_AppendUnicodeToObj(resultPtr, wstring, wlen);*/
resultPtr = objv[1];
Tcl_IncrRefCount(resultPtr);
} else if (offset < wlen) {
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index bb4227a..73790cb 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.80 2002/01/31 04:39:43 dgp Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.81 2002/02/08 02:52:54 dgp Exp $
*/
#ifndef _TCLDECLS
@@ -403,10 +403,10 @@ EXTERN int Tcl_DoOneEvent _ANSI_ARGS_((int flags));
EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc * proc,
ClientData clientData));
/* 117 */
-EXTERN CONST char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr,
+EXTERN char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr,
CONST char * str, int length));
/* 118 */
-EXTERN CONST char * Tcl_DStringAppendElement _ANSI_ARGS_((
+EXTERN char * Tcl_DStringAppendElement _ANSI_ARGS_((
Tcl_DString * dsPtr, CONST char * string));
/* 119 */
EXTERN void Tcl_DStringEndSublist _ANSI_ARGS_((
@@ -599,7 +599,7 @@ EXTERN int Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp * interp));
/* 185 */
EXTERN int Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp * interp));
/* 186 */
-EXTERN CONST char * Tcl_JoinPath _ANSI_ARGS_((int argc,
+EXTERN char * Tcl_JoinPath _ANSI_ARGS_((int argc,
CONST84 char * CONST * argv,
Tcl_DString * resultPtr));
/* 187 */
@@ -807,7 +807,7 @@ EXTERN int Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_VarTraceProc * proc,
ClientData clientData));
/* 249 */
-EXTERN CONST char * Tcl_TranslateFileName _ANSI_ARGS_((
+EXTERN char * Tcl_TranslateFileName _ANSI_ARGS_((
Tcl_Interp * interp, CONST char * name,
Tcl_DString * bufferPtr));
/* 250 */
@@ -962,7 +962,7 @@ EXTERN int Tcl_ExternalToUtf _ANSI_ARGS_((Tcl_Interp * interp,
int dstLen, int * srcReadPtr,
int * dstWrotePtr, int * dstCharsPtr));
/* 296 */
-EXTERN CONST char * Tcl_ExternalToUtfDString _ANSI_ARGS_((
+EXTERN char * Tcl_ExternalToUtfDString _ANSI_ARGS_((
Tcl_Encoding encoding, CONST char * src,
int srcLen, Tcl_DString * dsPtr));
/* 297 */
@@ -1072,7 +1072,7 @@ EXTERN int Tcl_UtfToExternal _ANSI_ARGS_((Tcl_Interp * interp,
int dstLen, int * srcReadPtr,
int * dstWrotePtr, int * dstCharsPtr));
/* 333 */
-EXTERN CONST char * Tcl_UtfToExternalDString _ANSI_ARGS_((
+EXTERN char * Tcl_UtfToExternalDString _ANSI_ARGS_((
Tcl_Encoding encoding, CONST char * src,
int srcLen, Tcl_DString * dsPtr));
/* 334 */
@@ -1121,11 +1121,11 @@ EXTERN int Tcl_UniCharLen _ANSI_ARGS_((CONST Tcl_UniChar * str));
EXTERN int Tcl_UniCharNcmp _ANSI_ARGS_((CONST Tcl_UniChar * cs,
CONST Tcl_UniChar * ct, unsigned long n));
/* 354 */
-EXTERN CONST char * Tcl_UniCharToUtfDString _ANSI_ARGS_((
+EXTERN char * Tcl_UniCharToUtfDString _ANSI_ARGS_((
CONST Tcl_UniChar * string, int numChars,
Tcl_DString * dsPtr));
/* 355 */
-EXTERN CONST Tcl_UniChar * Tcl_UtfToUniCharDString _ANSI_ARGS_((
+EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString _ANSI_ARGS_((
CONST char * string, int length,
Tcl_DString * dsPtr));
/* 356 */
@@ -1164,7 +1164,7 @@ EXTERN int Tcl_ParseVarName _ANSI_ARGS_((Tcl_Interp * interp,
char * string, int numBytes,
Tcl_Parse * parsePtr, int append));
/* 365 */
-EXTERN CONST char * Tcl_GetCwd _ANSI_ARGS_((Tcl_Interp * interp,
+EXTERN char * Tcl_GetCwd _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_DString * cwdPtr));
/* 366 */
EXTERN int Tcl_Chdir _ANSI_ARGS_((CONST char * dirName));
@@ -1671,8 +1671,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 */
- 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 */
+ 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 */
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 */
@@ -1748,7 +1748,7 @@ typedef struct TclStubs {
int (*tcl_InputBuffered) _ANSI_ARGS_((Tcl_Channel chan)); /* 183 */
int (*tcl_InterpDeleted) _ANSI_ARGS_((Tcl_Interp * interp)); /* 184 */
int (*tcl_IsSafe) _ANSI_ARGS_((Tcl_Interp * interp)); /* 185 */
- CONST char * (*tcl_JoinPath) _ANSI_ARGS_((int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr)); /* 186 */
+ char * (*tcl_JoinPath) _ANSI_ARGS_((int argc, CONST84 char * CONST * argv, Tcl_DString * resultPtr)); /* 186 */
int (*tcl_LinkVar) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, char * addr, int type)); /* 187 */
void *reserved188;
Tcl_Channel (*tcl_MakeFileChannel) _ANSI_ARGS_((ClientData handle, int mode)); /* 189 */
@@ -1827,7 +1827,7 @@ typedef struct TclStubs {
int (*tcl_Tell) _ANSI_ARGS_((Tcl_Channel chan)); /* 246 */
int (*tcl_TraceVar) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 247 */
int (*tcl_TraceVar2) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags, Tcl_VarTraceProc * proc, ClientData clientData)); /* 248 */
- CONST char * (*tcl_TranslateFileName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr)); /* 249 */
+ char * (*tcl_TranslateFileName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_DString * bufferPtr)); /* 249 */
int (*tcl_Ungets) _ANSI_ARGS_((Tcl_Channel chan, CONST char * str, int len, int atHead)); /* 250 */
void (*tcl_UnlinkVar) _ANSI_ARGS_((Tcl_Interp * interp, char * varName)); /* 251 */
int (*tcl_UnregisterChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 252 */
@@ -1874,7 +1874,7 @@ typedef struct TclStubs {
int (*tcl_EvalObjEx) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int flags)); /* 293 */
void (*tcl_ExitThread) _ANSI_ARGS_((int status)); /* 294 */
int (*tcl_ExternalToUtf) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr)); /* 295 */
- CONST char * (*tcl_ExternalToUtfDString) _ANSI_ARGS_((Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr)); /* 296 */
+ char * (*tcl_ExternalToUtfDString) _ANSI_ARGS_((Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr)); /* 296 */
void (*tcl_FinalizeThread) _ANSI_ARGS_((void)); /* 297 */
void (*tcl_FinalizeNotifier) _ANSI_ARGS_((ClientData clientData)); /* 298 */
void (*tcl_FreeEncoding) _ANSI_ARGS_((Tcl_Encoding encoding)); /* 299 */
@@ -1911,7 +1911,7 @@ typedef struct TclStubs {
CONST char * (*tcl_UtfNext) _ANSI_ARGS_((CONST char * src)); /* 330 */
CONST char * (*tcl_UtfPrev) _ANSI_ARGS_((CONST char * src, CONST char * start)); /* 331 */
int (*tcl_UtfToExternal) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Encoding encoding, CONST char * src, int srcLen, int flags, Tcl_EncodingState * statePtr, char * dst, int dstLen, int * srcReadPtr, int * dstWrotePtr, int * dstCharsPtr)); /* 332 */
- CONST char * (*tcl_UtfToExternalDString) _ANSI_ARGS_((Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr)); /* 333 */
+ char * (*tcl_UtfToExternalDString) _ANSI_ARGS_((Tcl_Encoding encoding, CONST char * src, int srcLen, Tcl_DString * dsPtr)); /* 333 */
int (*tcl_UtfToLower) _ANSI_ARGS_((char * src)); /* 334 */
int (*tcl_UtfToTitle) _ANSI_ARGS_((char * src)); /* 335 */
int (*tcl_UtfToUniChar) _ANSI_ARGS_((CONST char * src, Tcl_UniChar * chPtr)); /* 336 */
@@ -1932,8 +1932,8 @@ typedef struct TclStubs {
int (*tcl_UniCharIsWordChar) _ANSI_ARGS_((int ch)); /* 351 */
int (*tcl_UniCharLen) _ANSI_ARGS_((CONST Tcl_UniChar * str)); /* 352 */
int (*tcl_UniCharNcmp) _ANSI_ARGS_((CONST Tcl_UniChar * cs, CONST Tcl_UniChar * ct, unsigned long n)); /* 353 */
- CONST char * (*tcl_UniCharToUtfDString) _ANSI_ARGS_((CONST Tcl_UniChar * string, int numChars, Tcl_DString * dsPtr)); /* 354 */
- CONST Tcl_UniChar * (*tcl_UtfToUniCharDString) _ANSI_ARGS_((CONST char * string, int length, Tcl_DString * dsPtr)); /* 355 */
+ char * (*tcl_UniCharToUtfDString) _ANSI_ARGS_((CONST Tcl_UniChar * string, int numChars, Tcl_DString * dsPtr)); /* 354 */
+ Tcl_UniChar * (*tcl_UtfToUniCharDString) _ANSI_ARGS_((CONST char * string, int length, Tcl_DString * dsPtr)); /* 355 */
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 */
@@ -1943,7 +1943,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 */
- CONST char * (*tcl_GetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 365 */
+ 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 */
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 78bd886..c42d899 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.9 2002/01/25 20:40:55 dgp Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.10 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -781,7 +781,7 @@ Tcl_CreateEncoding(typePtr)
*-------------------------------------------------------------------------
*/
-CONST char *
+char *
Tcl_ExternalToUtfDString(encoding, src, srcLen, dstPtr)
Tcl_Encoding encoding; /* The encoding for the source string, or
* NULL for the default system encoding. */
@@ -944,7 +944,7 @@ Tcl_ExternalToUtf(interp, encoding, src, srcLen, flags, statePtr, dst,
*-------------------------------------------------------------------------
*/
-CONST char *
+char *
Tcl_UtfToExternalDString(encoding, src, srcLen, dstPtr)
Tcl_Encoding encoding; /* The encoding for the converted string,
* or NULL for the default system encoding. */
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index 792835c..c4f6ea2 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.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: tclEnv.c,v 1.11 2002/01/26 01:10:08 dgp Exp $
+ * RCS: @(#) $Id: tclEnv.c,v 1.12 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -84,8 +84,7 @@ TclSetupEnv(interp)
* managed. */
{
Tcl_DString envString;
- CONST char *p1;
- char *p2;
+ char *p1, *p2;
int i;
/*
@@ -134,8 +133,7 @@ TclSetupEnv(interp)
}
p2++;
p2[-1] = '\0';
- Tcl_SetVar2(interp, "env", Tcl_DStringValue(&envString), p2,
- TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "env", p1, p2, TCL_GLOBAL_ONLY);
Tcl_DStringFree(&envString);
}
Tcl_MutexUnlock(&envMutex);
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 2f6ce83..a0e808d 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.29 2002/01/26 01:10:08 dgp Exp $
+ * RCS: @(#) $Id: tclFileName.c,v 1.30 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -1268,7 +1268,7 @@ TclpNativeJoinPath(prefix, joining)
*----------------------------------------------------------------------
*/
-CONST char *
+char *
Tcl_JoinPath(argc, argv, resultPtr)
int argc;
CONST char * CONST *argv;
@@ -1326,7 +1326,7 @@ Tcl_JoinPath(argc, argv, resultPtr)
*----------------------------------------------------------------------
*/
-CONST char *
+char *
Tcl_TranslateFileName(interp, name, bufferPtr)
Tcl_Interp *interp; /* Interpreter in which to store error
* message (if necessary). */
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 7e3fffe..f972b2c 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.33 2002/01/25 21:36:09 dgp Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.34 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -141,7 +141,7 @@ Tcl_Chdir(dirName)
}
/* Obsolete */
-CONST char *
+char *
Tcl_GetCwd(interp, cwdPtr)
Tcl_Interp *interp;
Tcl_DString *cwdPtr;
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index 3425a9a..c499d29 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.15 2002/01/28 12:23:06 davygrvy Exp $
+ * RCS: @(#) $Id: tclPlatDecls.h,v 1.16 2002/02/08 02:52:54 dgp Exp $
*/
#ifndef _TCLPLATDECLS
@@ -36,10 +36,10 @@
#ifdef __WIN32__
/* 0 */
-EXTERN CONST TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str,
+EXTERN TCHAR * Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str,
int len, Tcl_DString * dsPtr));
/* 1 */
-EXTERN CONST char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str,
+EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str,
int len, Tcl_DString * dsPtr));
#endif /* __WIN32__ */
#ifdef MAC_TCL
@@ -80,8 +80,8 @@ typedef struct TclPlatStubs {
struct TclPlatStubHooks *hooks;
#ifdef __WIN32__
- 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 */
+ 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 */
#endif /* __WIN32__ */
#ifdef MAC_TCL
void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 2656d5a..0148ca6 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.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: tclUtf.c,v 1.22 2002/01/26 01:10:08 dgp Exp $
+ * RCS: @(#) $Id: tclUtf.c,v 1.23 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -231,7 +231,7 @@ Tcl_UniCharToUtf(ch, str)
*---------------------------------------------------------------------------
*/
-CONST char *
+char *
Tcl_UniCharToUtfDString(wString, numChars, dsPtr)
CONST Tcl_UniChar *wString; /* Unicode string to convert to UTF-8. */
int numChars; /* Length of Unicode string in Tcl_UniChars
@@ -393,7 +393,7 @@ Tcl_UtfToUniChar(str, chPtr)
*---------------------------------------------------------------------------
*/
-CONST Tcl_UniChar *
+Tcl_UniChar *
Tcl_UtfToUniCharDString(string, length, dsPtr)
CONST char *string; /* UTF-8 string to convert to Unicode. */
int length; /* Length of UTF-8 string in bytes, or -1
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 7cdded7..c65fdd5 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.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: tclUtil.c,v 1.28 2002/01/25 20:40:56 dgp Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.29 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -1411,7 +1411,7 @@ Tcl_DStringInit(dsPtr)
*----------------------------------------------------------------------
*/
-CONST char *
+char *
Tcl_DStringAppend(dsPtr, string, length)
Tcl_DString *dsPtr; /* Structure describing dynamic string. */
CONST char *string; /* String to append. If length is -1 then
@@ -1482,7 +1482,7 @@ Tcl_DStringAppend(dsPtr, string, length)
*----------------------------------------------------------------------
*/
-CONST char *
+char *
Tcl_DStringAppendElement(dsPtr, string)
Tcl_DString *dsPtr; /* Structure describing dynamic string. */
CONST char *string; /* String to append. Must be
diff --git a/mac/tclMacInit.c b/mac/tclMacInit.c
index 8cfe2b5..f132577 100644
--- a/mac/tclMacInit.c
+++ b/mac/tclMacInit.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: tclMacInit.c,v 1.8 2002/01/27 11:09:54 das Exp $
+ * RCS: @(#) $Id: tclMacInit.c,v 1.9 2002/02/08 02:52:54 dgp Exp $
*/
#include <AppleEvents.h>
@@ -401,8 +401,7 @@ TclpInitLibraryPath(argv0)
argv[1] = "Tool Command Language";
Tcl_DStringInit(&libPath);
Tcl_DStringAppend(&libPath, "tcl", -1);
- Tcl_DStringAppend(&libPath, TCL_VERSION, -1);
- argv[2] = Tcl_DStringValue(&libPath);
+ argv[2] = Tcl_DStringAppend(&libPath, TCL_VERSION, -1);
Tcl_DStringInit(&path);
str = Tcl_JoinPath(3, argv, &path);
objPtr = Tcl_NewStringObj(str, Tcl_DStringLength(&path));
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 031ece8..fc8fb08 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.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: tclUnixFile.c,v 1.15 2002/01/25 20:40:56 dgp Exp $
+ * RCS: @(#) $Id: tclUnixFile.c,v 1.16 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -234,8 +234,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
dirName = Tcl_DStringValue(&dsOrig);
/* Make sure we have a trailing directory delimiter */
if (dirName[baseLength-1] != '/') {
- Tcl_DStringAppend(&dsOrig, "/", 1);
- dirName = Tcl_DStringValue(&dsOrig);
+ dirName = Tcl_DStringAppend(&dsOrig, "/", 1);
baseLength++;
}
}
@@ -333,8 +332,7 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
struct stat buf;
char *nativeEntry;
Tcl_DStringSetLength(&ds, nativeDirLen);
- Tcl_DStringAppend(&ds, entryPtr->d_name, -1);
- nativeEntry = Tcl_DStringValue(&ds);
+ nativeEntry = Tcl_DStringAppend(&ds, entryPtr->d_name, -1);
/*
* The native name of the file is in entryPtr->d_name.
* We can use this below.
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 8ff747f..309260f 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.29 2002/01/25 20:40:56 dgp Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.30 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -451,8 +451,7 @@ TclpSetInitialEncodings()
*/
Tcl_DStringInit(&ds);
- Tcl_DStringAppend(&ds, nl_langinfo(CODESET), -1);
- encoding = Tcl_DStringValue(&ds);
+ encoding = Tcl_DStringAppend(&ds, nl_langinfo(CODESET), -1);
Tcl_UtfToLower(Tcl_DStringValue(&ds));
#ifdef HAVE_LANGINFO_DEBUG
@@ -550,9 +549,8 @@ TclpSetInitialEncodings()
if (*p != '\0') {
Tcl_DString ds;
Tcl_DStringInit(&ds);
- Tcl_DStringAppend(&ds, p, -1);
+ encoding = Tcl_DStringAppend(&ds, p, -1);
- encoding = Tcl_DStringValue(&ds);
Tcl_UtfToLower(Tcl_DStringValue(&ds));
setSysEncCode = Tcl_SetSystemEncoding(NULL, encoding);
if (setSysEncCode != TCL_OK) {
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 581fee5..a7facd6 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.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: tclUnixPipe.c,v 1.19 2002/01/25 20:40:56 dgp Exp $
+ * RCS: @(#) $Id: tclUnixPipe.c,v 1.20 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclInt.h"
@@ -421,8 +421,7 @@ TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile,
newArgv = (char **) ckalloc((argc+1) * sizeof(char *));
newArgv[argc] = NULL;
for (i = 0; i < argc; i++) {
- Tcl_UtfToExternalDString(NULL, argv[i], -1, &dsArray[i]);
- newArgv[i] = Tcl_DStringValue(&dsArray[i]);
+ newArgv[i] = Tcl_UtfToExternalDString(NULL, argv[i], -1, &dsArray[i]);
}
joinThisError = errorFile && (errorFile == outputFile);
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index d37a6ad..6ab2545 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.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: tclWin32Dll.c,v 1.12 2002/01/25 21:36:10 dgp Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.13 2002/02/08 02:52:54 dgp Exp $
*/
#include "tclWinInt.h"
@@ -490,7 +490,7 @@ TclWinSetInterfaces(
*---------------------------------------------------------------------------
*/
-CONST TCHAR *
+TCHAR *
Tcl_WinUtfToTChar(string, len, dsPtr)
CONST char *string; /* Source string in UTF-8. */
int len; /* Source string length in bytes, or < 0 for
@@ -502,7 +502,7 @@ Tcl_WinUtfToTChar(string, len, dsPtr)
string, len, dsPtr);
}
-CONST char *
+char *
Tcl_WinTCharToUtf(string, len, dsPtr)
CONST TCHAR *string; /* Source string in Unicode when running
* NT, ANSI when running 95. */
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index dc1ed7b..725f4cf 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.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: tclWinFCmd.c,v 1.21 2002/01/31 21:07:32 uid37547 Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.22 2002/02/08 02:52:55 dgp Exp $
*/
#include "tclWinInt.h"
@@ -1407,9 +1407,8 @@ ConvertFileNameFormat(
*/
Tcl_DStringInit(&ds);
tempString = Tcl_GetStringFromObj(tempPath,&tempLen);
- Tcl_WinUtfToTChar(tempString, tempLen, &ds);
+ nativeName = Tcl_WinUtfToTChar(tempString, tempLen, &ds);
Tcl_DecrRefCount(tempPath);
- nativeName = Tcl_DStringValue(&ds);
handle = (*tclWinProcs->findFirstFileProc)(nativeName, &data);
if (handle == INVALID_HANDLE_VALUE) {
/*
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index f92eeaa..ae2776d 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.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: tclWinFile.c,v 1.24 2002/01/25 21:36:10 dgp Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.25 2002/02/08 02:52:55 dgp Exp $
*/
#include "tclWinInt.h"
@@ -499,7 +499,7 @@ TclpGetUserHome(name, bufferPtr)
Tcl_DString ds;
int nameLen, badDomain;
char *domain;
- WCHAR *wHomeDir, *wDomain;
+ WCHAR *wName, *wHomeDir, *wDomain;
WCHAR buf[MAX_PATH];
badDomain = 0;
@@ -508,18 +508,16 @@ TclpGetUserHome(name, bufferPtr)
domain = strchr(name, '@');
if (domain != NULL) {
Tcl_DStringInit(&ds);
- Tcl_UtfToUniCharDString(domain + 1, -1, &ds);
- badDomain = (*netGetDCNameProc)(NULL,
- (LPWSTR) Tcl_DStringValue(&ds),
+ wName = Tcl_UtfToUniCharDString(domain + 1, -1, &ds);
+ badDomain = (*netGetDCNameProc)(NULL, wName,
(LPBYTE *) &wDomain);
Tcl_DStringFree(&ds);
nameLen = domain - name;
}
if (badDomain == 0) {
Tcl_DStringInit(&ds);
- Tcl_UtfToUniCharDString(name, nameLen, &ds);
- if ((*netUserGetInfoProc)(wDomain,
- (LPWSTR) Tcl_DStringValue(&ds), 1,
+ wName = Tcl_UtfToUniCharDString(name, nameLen, &ds);
+ if ((*netUserGetInfoProc)(wDomain, wName, 1,
(LPBYTE *) &uiPtr) == 0) {
wHomeDir = uiPtr->usri1_home_dir;
if ((wHomeDir != NULL) && (wHomeDir[0] != L'\0')) {
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 90efb06..c4782e3 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclWinInit.c,v 1.34 2002/01/29 02:19:24 hobbs Exp $
+ * RCS: @(#) $Id: tclWinInit.c,v 1.35 2002/02/08 02:52:55 dgp Exp $
*/
#include "tclWinInt.h"
@@ -698,8 +698,7 @@ TclpFindVariable(name, lengthPtr)
* all the characters after the equal sign.
*/
- Tcl_ExternalToUtfDString(NULL, env, -1, &envString);
- envUpper = Tcl_DStringValue(&envString);
+ envUpper = Tcl_ExternalToUtfDString(NULL, env, -1, &envString);
p1 = strchr(envUpper, '=');
if (p1 == NULL) {
continue;