diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-13 16:01:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-13 16:01:35 (GMT) |
commit | ed907ec2d18048ab42baa3a8a6b4436894dc8912 (patch) | |
tree | 6def4b18ddae7979d9803406dc3a769fd99a4b26 /win/tclWinFile.c | |
parent | db160493def9e4d6ec6cb55fe788a5784447f1c5 (diff) | |
download | tcl-ed907ec2d18048ab42baa3a8a6b4436894dc8912.zip tcl-ed907ec2d18048ab42baa3a8a6b4436894dc8912.tar.gz tcl-ed907ec2d18048ab42baa3a8a6b4436894dc8912.tar.bz2 |
Make tclWinFile compile warningless using -DTCL_UTF_MAX=6 (not officially supported, but used by Androwish)
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r-- | win/tclWinFile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 20cd6d4..e050862 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1472,14 +1472,14 @@ TclpGetUserHome( Tcl_DStringFree(&ds); } else { Tcl_DStringInit(&ds); - wName = Tcl_UtfToUniCharDString(domain + 1, -1, &ds); + wName = (WCHAR *)Tcl_WinUtfToTChar(domain + 1, -1, &ds); rc = NetGetDCName(NULL, wName, (LPBYTE *) &wDomain); Tcl_DStringFree(&ds); nameLen = domain - name; } if (rc == 0) { Tcl_DStringInit(&ds); - wName = Tcl_UtfToUniCharDString(name, nameLen, &ds); + wName = (WCHAR *)Tcl_WinUtfToTChar(name, nameLen, &ds); while (NetUserGetInfo(wDomain, wName, 1, (LPBYTE *) &uiPtr) != 0) { /* * User does not exist; if domain was not specified, try again @@ -1507,7 +1507,7 @@ TclpGetUserHome( wHomeDir = uiPtr->usri1_home_dir; if ((wHomeDir != NULL) && (wHomeDir[0] != L'\0')) { size = lstrlenW(wHomeDir); - Tcl_UniCharToUtfDString(wHomeDir, size, bufferPtr); + Tcl_WinTCharToUtf((TCHAR *)wHomeDir, size*sizeof(WCHAR), bufferPtr); } else { /* * User exists but has no home dir. Return @@ -1515,7 +1515,7 @@ TclpGetUserHome( */ GetProfilesDirectoryW(buf, &size); - Tcl_UniCharToUtfDString(buf, size-1, bufferPtr); + Tcl_WinTCharToUtf((TCHAR *)buf, (size-1)*sizeof(WCHAR), bufferPtr); Tcl_DStringAppend(bufferPtr, "/", 1); Tcl_DStringAppend(bufferPtr, name, nameLen); } |