diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixFile.c | 8 | ||||
-rw-r--r-- | unix/tclUnixInit.c | 8 | ||||
-rw-r--r-- | unix/tclUnixPipe.c | 5 |
3 files changed, 8 insertions, 13 deletions
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); |