summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.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 /win/tclWinFile.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 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c14
1 files changed, 6 insertions, 8 deletions
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')) {