diff options
author | dgp <dgp@users.sourceforge.net> | 2002-02-08 02:52:54 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2002-02-08 02:52:54 (GMT) |
commit | 699c1642cb20fb2195b33c4fd04a2ec582507776 (patch) | |
tree | 078abed0538e74a4b78aa55d46462fe102978f63 /win | |
parent | c11c702cfe6d98893a8ac09baefbf98a868f6b32 (diff) | |
download | tcl-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 'win')
-rw-r--r-- | win/tclWin32Dll.c | 6 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 5 | ||||
-rw-r--r-- | win/tclWinFile.c | 14 | ||||
-rw-r--r-- | win/tclWinInit.c | 5 |
4 files changed, 13 insertions, 17 deletions
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; |