diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 16 | ||||
-rw-r--r-- | win/tclWinFile.c | 20 | ||||
-rw-r--r-- | win/tclWinInit.c | 4 | ||||
-rw-r--r-- | win/tclWinPipe.c | 6 | ||||
-rw-r--r-- | win/tclWinSock.c | 4 |
6 files changed, 28 insertions, 27 deletions
@@ -9,8 +9,9 @@ * generic/tclEnsemble.c Fix signed-unsigned mismatch * win/tclWinInt.h make tclWinProcs "const" * win/tclWin32Dll.c - * win/tclWinFCmd.c - * win/tclWinFile.c + * win/tclWinFCmd.c Eliminate all internal Tcl_WinUtfToTChar + * win/tclWinFile.c and Tcl_WinTCharToUtf calls, needed + * win/tclWinInit.c for mslu support. * win/tclWinLoad.c * win/tclWinPipe.c * win/tclWinSerial.c diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 67ba3eb..a60ea61 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.59 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.60 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -346,8 +346,8 @@ DoRenameFile( tclWinProcs->charLowerProc((TCHAR *) nativeSrcPath); tclWinProcs->charLowerProc((TCHAR *) nativeDstPath); - src = Tcl_WinTCharToUtf((TCHAR *) nativeSrcPath, -1, &srcString); - dst = Tcl_WinTCharToUtf((TCHAR *) nativeDstPath, -1, &dstString); + src = tclWinProcs->tchar2utf((TCHAR *) nativeSrcPath, -1, &srcString); + dst = tclWinProcs->tchar2utf((TCHAR *) nativeDstPath, -1, &dstString); /* * Check whether the destination path is actually inside the @@ -1171,7 +1171,7 @@ DoRemoveJustDirectory( end: if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativePath, -1, errorPtr); + tclWinProcs->tchar2utf(nativePath, -1, errorPtr); } return TCL_ERROR; @@ -1409,7 +1409,7 @@ TraverseWinTree( if (nativeErrfile != NULL) { TclWinConvertError(GetLastError()); if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativeErrfile, -1, errorPtr); + tclWinProcs->tchar2utf(nativeErrfile, -1, errorPtr); } result = TCL_ERROR; } @@ -1474,7 +1474,7 @@ TraversalCopy( */ if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativeDst, -1, errorPtr); + tclWinProcs->tchar2utf(nativeDst, -1, errorPtr); } return TCL_ERROR; } @@ -1529,7 +1529,7 @@ TraversalDelete( } if (errorPtr != NULL) { - Tcl_WinTCharToUtf(nativeSrc, -1, errorPtr); + tclWinProcs->tchar2utf(nativeSrc, -1, errorPtr); } return TCL_ERROR; } @@ -1799,7 +1799,7 @@ ConvertFileNameFormat( */ Tcl_DStringInit(&dsTemp); - Tcl_WinTCharToUtf(nativeName, -1, &dsTemp); + tclWinProcs->tchar2utf(nativeName, -1, &dsTemp); /* * Deal with issues of tildes being absolute. diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 57a9aef..9522c52 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.103 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.104 2010/02/15 23:10:47 nijtmans Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -667,7 +667,7 @@ WinReadLinkDirectory( } } - Tcl_WinTCharToUtf((const char *) + tclWinProcs->tchar2utf((const char *) reparseBuffer->MountPointReparseBuffer.PathBuffer, (int) reparseBuffer->MountPointReparseBuffer .SubstituteNameLength, &ds); @@ -1083,7 +1083,7 @@ TclpMatchInDirectory( attr = data.a.dwFileAttributes; } - utfname = Tcl_WinTCharToUtf(native, -1, &ds); + utfname = tclWinProcs->tchar2utf(native, -1, &ds); if (!matchSpecialDots) { /* @@ -1858,7 +1858,7 @@ TclpObjChdir( * Cygwin chdir only groks POSIX path. */ - path = Tcl_WinTCharToUtf(nativePath, -1, &ds); + path = tclWinProcs->tchar2utf(nativePath, -1, &ds); cygwin_conv_to_posix_path(path, posixPath); result = (chdir(posixPath) == 0 ? 1 : 0); Tcl_DStringFree(&ds); @@ -1970,7 +1970,7 @@ TclpGetCwd( && (native[2] == '\\') && (native[3] == '\\')) { native += 2; } - Tcl_WinTCharToUtf((TCHAR *) native, -1, bufferPtr); + tclWinProcs->tchar2utf((TCHAR *) native, -1, bufferPtr); } else { char *native; @@ -1979,7 +1979,7 @@ TclpGetCwd( && (native[2] == '\\') && (native[3] == '\\')) { native += 2; } - Tcl_WinTCharToUtf((TCHAR *) native, -1, bufferPtr); + tclWinProcs->tchar2utf((TCHAR *) native, -1, bufferPtr); } /* @@ -2204,7 +2204,7 @@ NativeDev( tclWinProcs->getFullPathNameProc(nativePath, MAX_PATH, nativeFullPath, &nativePart); - fullPath = Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds); + fullPath = tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds); if ((fullPath[0] == '\\') && (fullPath[1] == '\\')) { const char *p; @@ -2523,7 +2523,7 @@ TclpFilesystemPathType( Tcl_DString ds; Tcl_Obj *objPtr; - Tcl_WinTCharToUtf((const char *) volType, -1, &ds); + tclWinProcs->tchar2utf((const char *) volType, -1, &ds); objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); @@ -2976,7 +2976,7 @@ TclpObjNormalizePath( Tcl_DString dsTemp; - Tcl_WinTCharToUtf(Tcl_DStringValue(&dsNorm), + tclWinProcs->tchar2utf(Tcl_DStringValue(&dsNorm), Tcl_DStringLength(&dsNorm), &dsTemp); nextCheckpoint = Tcl_DStringLength(&dsTemp); if (*lastValidPathEnd != 0) { @@ -3154,7 +3154,7 @@ TclpNativeToNormalized( int len; char *copy, *p; - Tcl_WinTCharToUtf((const char *) clientData, -1, &ds); + tclWinProcs->tchar2utf((const char *) clientData, -1, &ds); copy = Tcl_DStringValue(&ds); len = Tcl_DStringLength(&ds); diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 7e33234..9115eaa 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.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: tclWinInit.c,v 1.84 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.85 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -555,7 +555,7 @@ TclpSetVariables( if (tclWinProcs->getUserName((LPTSTR)szUserName, &cchUserNameLen) != 0) { int cbUserNameLen = cchUserNameLen - 1; if (tclWinProcs->useWide) cbUserNameLen *= sizeof(WCHAR); - Tcl_WinTCharToUtf((LPTSTR)szUserName, cbUserNameLen, &ds); + tclWinProcs->tchar2utf((LPTSTR)szUserName, cbUserNameLen, &ds); } } Tcl_SetVar2(interp, "tcl_platform", "user", Tcl_DStringValue(&ds), diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index b7dddaa..5d97915 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.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: tclWinPipe.c,v 1.75 2010/02/15 22:56:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.76 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -1417,7 +1417,7 @@ ApplicationType( if ((attr == 0xffffffff) || (attr & FILE_ATTRIBUTE_DIRECTORY)) { continue; } - strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds)); + strcpy(fullName, tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); ext = strrchr(fullName, '.'); @@ -1508,7 +1508,7 @@ ApplicationType( tclWinProcs->getShortPathNameProc((TCHAR *) nativeFullPath, nativeFullPath, MAX_PATH); - strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds)); + strcpy(fullName, tclWinProcs->tchar2utf((TCHAR *) nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); } return applType; diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 457ca80..933523a 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.68 2010/01/10 22:58:40 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.69 2010/02/15 23:10:47 nijtmans Exp $ */ #include "tclWinInt.h" @@ -2432,7 +2432,7 @@ InitializeHostName( * Convert string from native to UTF then change to lowercase. */ - Tcl_UtfToLower(Tcl_WinTCharToUtf((TCHAR *) wbuf, -1, &ds)); + Tcl_UtfToLower((char *) tclWinProcs->tchar2utf((TCHAR *) wbuf, -1, &ds)); } else { Tcl_DStringInit(&ds); |