summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
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 /unix/tclUnixInit.c
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.
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c8
1 files changed, 3 insertions, 5 deletions
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) {