summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-12 20:38:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-12 20:38:09 (GMT)
commit8ddf96d852b04a3a1e7e109e16f8c3a21b31d2a2 (patch)
treec262b99e7f7de8144329705bc6ff747d7cdf08c8 /win
parent2b096ec26df0564a66dc13dc0f0b84942db5273e (diff)
parent9c94b7bd7657d1734dd6ce7d0e91d2606c6d0945 (diff)
downloadtcl-8ddf96d852b04a3a1e7e109e16f8c3a21b31d2a2.zip
tcl-8ddf96d852b04a3a1e7e109e16f8c3a21b31d2a2.tar.gz
tcl-8ddf96d852b04a3a1e7e109e16f8c3a21b31d2a2.tar.bz2
Merge branch tip-548. No longer define addtional stub-entries for functions that will be removed (because of deprecation) anyway
Diffstat (limited to 'win')
-rw-r--r--win/tclWin32Dll.c4
-rw-r--r--win/tclWinFCmd.c38
-rw-r--r--win/tclWinFile.c30
-rw-r--r--win/tclWinInit.c2
-rw-r--r--win/tclWinLoad.c2
-rw-r--r--win/tclWinPipe.c14
-rw-r--r--win/tclWinSerial.c2
-rw-r--r--win/tclWinSock.c2
8 files changed, 47 insertions, 47 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index b8d325e..668412f 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -474,7 +474,7 @@ Tcl_WinUtfToTChar(
* converted string is stored. */
{
Tcl_DStringInit(dsPtr);
- return Tcl_UtfToChar16DString(string, len, dsPtr);
+ return Tcl_UtfToWCharDString(string, len, dsPtr);
}
#undef Tcl_WinTCharToUtf
char *
@@ -486,7 +486,7 @@ Tcl_WinTCharToUtf(
* converted string is stored. */
{
Tcl_DStringInit(dsPtr);
- return Tcl_Char16ToUtfDString((unsigned short *)string, len >> 1, dsPtr);
+ return Tcl_WCharToUtfDString(string, len >> 1, dsPtr);
}
#endif /* !defined(TCL_NO_DEPRECATED) */
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 9361051..f8fa463 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -330,8 +330,8 @@ DoRenameFile(
Tcl_DStringInit(&srcString);
Tcl_DStringInit(&dstString);
- src = Tcl_Char16ToUtfDString(nativeSrcPath, -1, &srcString);
- dst = Tcl_Char16ToUtfDString(nativeDstPath, -1, &dstString);
+ src = Tcl_WCharToUtfDString(nativeSrcPath, -1, &srcString);
+ dst = Tcl_WCharToUtfDString(nativeDstPath, -1, &dstString);
/*
* Check whether the destination path is actually inside the
@@ -915,8 +915,8 @@ TclpObjCopyDirectory(
Tcl_DStringInit(&srcString);
Tcl_DStringInit(&dstString);
- Tcl_UtfToChar16DString(Tcl_GetString(normSrcPtr), -1, &srcString);
- Tcl_UtfToChar16DString(Tcl_GetString(normDestPtr), -1, &dstString);
+ Tcl_UtfToWCharDString(Tcl_GetString(normSrcPtr), -1, &srcString);
+ Tcl_UtfToWCharDString(Tcl_GetString(normDestPtr), -1, &dstString);
ret = TraverseWinTree(TraversalCopy, &srcString, &dstString, &ds);
@@ -989,7 +989,7 @@ TclpObjRemoveDirectory(
return TCL_ERROR;
}
Tcl_DStringInit(&native);
- Tcl_UtfToChar16DString(Tcl_GetString(normPtr), -1, &native);
+ Tcl_UtfToWCharDString(Tcl_GetString(normPtr), -1, &native);
ret = DoRemoveDirectory(&native, recursive, &ds);
Tcl_DStringFree(&native);
} else {
@@ -1117,7 +1117,7 @@ DoRemoveJustDirectory(
char *p;
Tcl_DStringInit(errorPtr);
- p = Tcl_Char16ToUtfDString(nativePath, -1, errorPtr);
+ p = Tcl_WCharToUtfDString(nativePath, -1, errorPtr);
for (; *p; ++p) {
if (*p == '\\') *p = '/';
}
@@ -1332,7 +1332,7 @@ TraverseWinTree(
TclWinConvertError(GetLastError());
if (errorPtr != NULL) {
Tcl_DStringInit(errorPtr);
- Tcl_Char16ToUtfDString(nativeErrfile, -1, errorPtr);
+ Tcl_WCharToUtfDString(nativeErrfile, -1, errorPtr);
}
result = TCL_ERROR;
}
@@ -1398,7 +1398,7 @@ TraversalCopy(
if (errorPtr != NULL) {
Tcl_DStringInit(errorPtr);
- Tcl_Char16ToUtfDString(nativeDst, -1, errorPtr);
+ Tcl_WCharToUtfDString(nativeDst, -1, errorPtr);
}
return TCL_ERROR;
}
@@ -1454,7 +1454,7 @@ TraversalDelete(
if (errorPtr != NULL) {
Tcl_DStringInit(errorPtr);
- Tcl_Char16ToUtfDString(nativeSrc, -1, errorPtr);
+ Tcl_WCharToUtfDString(nativeSrc, -1, errorPtr);
}
return TCL_ERROR;
}
@@ -1663,7 +1663,7 @@ ConvertFileNameFormat(
tempString = TclGetStringFromObj(tempPath, &length);
Tcl_DStringInit(&ds);
- nativeName = Tcl_UtfToChar16DString(tempString, length, &ds);
+ nativeName = Tcl_UtfToWCharDString(tempString, length, &ds);
Tcl_DecrRefCount(tempPath);
handle = FindFirstFile(nativeName, &data);
if (handle == INVALID_HANDLE_VALUE) {
@@ -1700,7 +1700,7 @@ ConvertFileNameFormat(
}
/*
- * Purify reports a extraneous UMR in Tcl_Char16ToUtfDString() trying
+ * Purify reports a extraneous UMR in Tcl_WCharToUtfDString() trying
* to dereference nativeName as a Unicode string. I have proven to
* myself that purify is wrong by running the following example
* when nativeName == data.w.cAlternateFileName and noting that
@@ -1712,7 +1712,7 @@ ConvertFileNameFormat(
*/
Tcl_DStringInit(&dsTemp);
- Tcl_Char16ToUtfDString(nativeName, -1, &dsTemp);
+ Tcl_WCharToUtfDString(nativeName, -1, &dsTemp);
Tcl_DStringFree(&ds);
/*
@@ -2008,9 +2008,9 @@ TclpCreateTemporaryDirectory(
goto useSystemTemp;
}
Tcl_DStringInit(&base);
- Tcl_UtfToChar16DString(Tcl_GetString(dirObj), -1, &base);
+ Tcl_UtfToWCharDString(Tcl_GetString(dirObj), -1, &base);
if (dirObj->bytes[dirObj->length - 1] != '\\') {
- Tcl_UtfToChar16DString("\\", -1, &base);
+ Tcl_UtfToWCharDString("\\", -1, &base);
}
} else {
useSystemTemp:
@@ -2026,11 +2026,11 @@ TclpCreateTemporaryDirectory(
#define SUFFIX_LENGTH 8
if (basenameObj) {
- Tcl_UtfToChar16DString(Tcl_GetString(basenameObj), -1, &base);
+ Tcl_UtfToWCharDString(Tcl_GetString(basenameObj), -1, &base);
} else {
- Tcl_UtfToChar16DString(DEFAULT_TEMP_DIR_PREFIX, -1, &base);
+ Tcl_UtfToWCharDString(DEFAULT_TEMP_DIR_PREFIX, -1, &base);
}
- Tcl_UtfToChar16DString("_", -1, &base);
+ Tcl_UtfToWCharDString("_", -1, &base);
/*
* Now we keep on trying random suffixes until we get one that works
@@ -2057,7 +2057,7 @@ TclpCreateTemporaryDirectory(
tempbuf[i] = randChars[(int) (rand() % numRandChars)];
}
Tcl_DStringSetLength(&base, baseLen);
- Tcl_UtfToChar16DString(tempbuf, -1, &base);
+ Tcl_UtfToWCharDString(tempbuf, -1, &base);
} while (!CreateDirectoryW((LPCWSTR) Tcl_DStringValue(&base), NULL)
&& (error = GetLastError()) == ERROR_ALREADY_EXISTS);
@@ -2078,7 +2078,7 @@ TclpCreateTemporaryDirectory(
*/
Tcl_DStringInit(&name);
- Tcl_Char16ToUtfDString((LPCWSTR) Tcl_DStringValue(&base), -1, &name);
+ Tcl_WCharToUtfDString((LPCWSTR) Tcl_DStringValue(&base), -1, &name);
Tcl_DStringFree(&base);
return TclDStringToObj(&name);
}
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 9320c3a..f3c45ef 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -635,7 +635,7 @@ WinReadLinkDirectory(
}
Tcl_DStringInit(&ds);
- Tcl_Char16ToUtfDString(
+ Tcl_WCharToUtfDString(
reparseBuffer->MountPointReparseBuffer.PathBuffer,
reparseBuffer->MountPointReparseBuffer
.SubstituteNameLength>>1, &ds);
@@ -1025,7 +1025,7 @@ TclpMatchInDirectory(
}
Tcl_DStringInit(&ds);
- native = Tcl_UtfToChar16DString(dirName, -1, &ds);
+ native = Tcl_UtfToWCharDString(dirName, -1, &ds);
if ((types == NULL) || (types->type != TCL_GLOB_TYPE_DIR)) {
handle = FindFirstFile(native, &data);
} else {
@@ -1099,7 +1099,7 @@ TclpMatchInDirectory(
native = data.cFileName;
attr = data.dwFileAttributes;
Tcl_DStringInit(&ds);
- utfname = Tcl_Char16ToUtfDString(native, -1, &ds);
+ utfname = Tcl_WCharToUtfDString(native, -1, &ds);
if (!matchSpecialDots) {
/*
@@ -1474,14 +1474,14 @@ TclpGetUserHome(
Tcl_DStringFree(&ds);
} else {
Tcl_DStringInit(&ds);
- wName = Tcl_UtfToChar16DString(domain + 1, -1, &ds);
+ wName = Tcl_UtfToWCharDString(domain + 1, -1, &ds);
rc = NetGetDCName(NULL, wName, (LPBYTE *) &wDomain);
Tcl_DStringFree(&ds);
nameLen = domain - name;
}
if (rc == 0) {
Tcl_DStringInit(&ds);
- wName = Tcl_UtfToChar16DString(name, nameLen, &ds);
+ wName = Tcl_UtfToWCharDString(name, nameLen, &ds);
while (NetUserGetInfo(wDomain, wName, 1, (LPBYTE *) &uiPtr) != 0) {
/*
* User does not exist; if domain was not specified, try again
@@ -1509,7 +1509,7 @@ TclpGetUserHome(
wHomeDir = uiPtr->usri1_home_dir;
if ((wHomeDir != NULL) && (wHomeDir[0] != '\0')) {
size = lstrlenW(wHomeDir);
- Tcl_Char16ToUtfDString(wHomeDir, size, bufferPtr);
+ Tcl_WCharToUtfDString(wHomeDir, size, bufferPtr);
} else {
/*
* User exists but has no home dir. Return
@@ -1517,7 +1517,7 @@ TclpGetUserHome(
*/
GetProfilesDirectoryW(buf, &size);
- Tcl_Char16ToUtfDString(buf, size-1, bufferPtr);
+ Tcl_WCharToUtfDString(buf, size-1, bufferPtr);
Tcl_DStringAppend(bufferPtr, "/", 1);
Tcl_DStringAppend(bufferPtr, name, nameLen);
}
@@ -1986,7 +1986,7 @@ TclpGetCwd(
native += 2;
}
Tcl_DStringInit(bufferPtr);
- Tcl_Char16ToUtfDString(native, -1, bufferPtr);
+ Tcl_WCharToUtfDString(native, -1, bufferPtr);
/*
* Convert to forward slashes for easier use in scripts.
@@ -2195,7 +2195,7 @@ NativeDev(
GetFullPathName(nativePath, MAX_PATH, nativeFullPath, &nativePart);
Tcl_DStringInit(&ds);
- fullPath = Tcl_Char16ToUtfDString(nativeFullPath, -1, &ds);
+ fullPath = Tcl_WCharToUtfDString(nativeFullPath, -1, &ds);
if ((fullPath[0] == '\\') && (fullPath[1] == '\\')) {
const char *p;
@@ -2217,7 +2217,7 @@ NativeDev(
p++;
}
Tcl_DStringInit(&volString);
- nativeVol = Tcl_UtfToChar16DString(fullPath, p - fullPath, &volString);
+ nativeVol = Tcl_UtfToWCharDString(fullPath, p - fullPath, &volString);
dw = (DWORD) -1;
GetVolumeInformation(nativeVol, NULL, 0, &dw, NULL, NULL, NULL, 0);
@@ -2498,7 +2498,7 @@ TclpFilesystemPathType(
Tcl_DString ds;
Tcl_DStringInit(&ds);
- Tcl_Char16ToUtfDString(volType, -1, &ds);
+ Tcl_WCharToUtfDString(volType, -1, &ds);
return TclDStringToObj(&ds);
}
#undef VOL_BUF_SIZE
@@ -2571,7 +2571,7 @@ TclpObjNormalizePath(
const WCHAR *nativePath;
Tcl_DStringInit(&ds);
- nativePath = Tcl_UtfToChar16DString(path,
+ nativePath = Tcl_UtfToWCharDString(path,
currentPathEndPosition - path, &ds);
if (GetFileAttributesEx(nativePath,
@@ -2778,7 +2778,7 @@ TclpObjNormalizePath(
Tcl_DStringInit(&ds);
nativePath =
- Tcl_UtfToChar16DString(path, lastValidPathEnd - path, &ds);
+ Tcl_UtfToWCharDString(path, lastValidPathEnd - path, &ds);
wpathlen = GetLongPathNameProc(nativePath,
(WCHAR *) wpath, MAX_PATH);
/*
@@ -2808,7 +2808,7 @@ TclpObjNormalizePath(
*/
Tcl_DStringInit(&ds);
- Tcl_Char16ToUtfDString((const WCHAR *) Tcl_DStringValue(&dsNorm),
+ Tcl_WCharToUtfDString((const WCHAR *) Tcl_DStringValue(&dsNorm),
Tcl_DStringLength(&dsNorm)>>1, &ds);
nextCheckpoint = Tcl_DStringLength(&ds);
if (*lastValidPathEnd != 0) {
@@ -2985,7 +2985,7 @@ TclpNativeToNormalized(
char *copy, *p;
Tcl_DStringInit(&ds);
- Tcl_Char16ToUtfDString((const WCHAR *) clientData, -1, &ds);
+ Tcl_WCharToUtfDString((const WCHAR *) clientData, -1, &ds);
copy = Tcl_DStringValue(&ds);
len = Tcl_DStringLength(&ds);
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 1bd962d..29ace66 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -477,7 +477,7 @@ TclpGetUserName(
}
cchUserNameLen--;
Tcl_DStringInit(bufferPtr);
- Tcl_Char16ToUtfDString(szUserName, cchUserNameLen, bufferPtr);
+ Tcl_WCharToUtfDString(szUserName, cchUserNameLen, bufferPtr);
}
return Tcl_DStringValue(bufferPtr);
}
diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c
index 011ebd7..ae68956 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -96,7 +96,7 @@ TclpDlopen(
ERROR_MOD_NOT_FOUND : GetLastError();
Tcl_DStringInit(&ds);
- nativeName = Tcl_UtfToChar16DString(Tcl_GetString(pathPtr), -1, &ds);
+ nativeName = Tcl_UtfToWCharDString(Tcl_GetString(pathPtr), -1, &ds);
hInstance = LoadLibraryEx(nativeName, NULL,
LOAD_WITH_ALTERED_SEARCH_PATH);
Tcl_DStringFree(&ds);
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index fafdf49..902e01c 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -578,7 +578,7 @@ TclpOpenFile(
}
Tcl_DStringInit(&ds);
- nativePath = Tcl_UtfToChar16DString(path, -1, &ds);
+ nativePath = Tcl_UtfToWCharDString(path, -1, &ds);
/*
* If the file is not being created, use the existing file attributes.
@@ -1292,7 +1292,7 @@ ApplicationType(
Tcl_DStringSetLength(&nameBuf, nameLen);
Tcl_DStringAppend(&nameBuf, extensions[i], -1);
Tcl_DStringInit(&ds);
- nativeName = Tcl_UtfToChar16DString(Tcl_DStringValue(&nameBuf),
+ nativeName = Tcl_UtfToWCharDString(Tcl_DStringValue(&nameBuf),
Tcl_DStringLength(&nameBuf), &ds);
found = SearchPath(NULL, nativeName, NULL, MAX_PATH,
nativeFullPath, &rest);
@@ -1311,7 +1311,7 @@ ApplicationType(
continue;
}
Tcl_DStringInit(&ds);
- strcpy(fullName, Tcl_Char16ToUtfDString(nativeFullPath, -1, &ds));
+ strcpy(fullName, Tcl_WCharToUtfDString(nativeFullPath, -1, &ds));
Tcl_DStringFree(&ds);
ext = strrchr(fullName, '.');
@@ -1403,7 +1403,7 @@ ApplicationType(
GetShortPathName(nativeFullPath, nativeFullPath, MAX_PATH);
Tcl_DStringInit(&ds);
- strcpy(fullName, Tcl_Char16ToUtfDString(nativeFullPath, -1, &ds));
+ strcpy(fullName, Tcl_WCharToUtfDString(nativeFullPath, -1, &ds));
Tcl_DStringFree(&ds);
}
return applType;
@@ -1732,7 +1732,7 @@ BuildCommandLine(
}
Tcl_DStringFree(linePtr);
Tcl_DStringInit(linePtr);
- Tcl_UtfToChar16DString(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds), linePtr);
+ Tcl_UtfToWCharDString(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds), linePtr);
Tcl_DStringFree(&ds);
}
@@ -3215,7 +3215,7 @@ TclpOpenTemporaryFile(
const char *string = TclGetStringFromObj(basenameObj, &length);
Tcl_DStringInit(&buf);
- Tcl_UtfToChar16DString(string, length, &buf);
+ Tcl_UtfToWCharDString(string, length, &buf);
memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf));
namePtr += Tcl_DStringLength(&buf);
Tcl_DStringFree(&buf);
@@ -3236,7 +3236,7 @@ TclpOpenTemporaryFile(
sprintf(number, "%d.TMP", counter);
counter = (unsigned short) (counter + 1);
Tcl_DStringInit(&buf);
- Tcl_UtfToChar16DString(number, strlen(number), &buf);
+ Tcl_UtfToWCharDString(number, strlen(number), &buf);
Tcl_DStringSetLength(&buf, Tcl_DStringLength(&buf) + 1);
memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf) + 1);
Tcl_DStringFree(&buf);
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index 3de91be..4411e89 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -1670,7 +1670,7 @@ SerialSetOptionProc(
goto getStateFailed;
}
Tcl_DStringInit(&ds);
- native = Tcl_UtfToChar16DString(value, -1, &ds);
+ native = Tcl_UtfToWCharDString(value, -1, &ds);
result = BuildCommDCB(native, &dcb);
Tcl_DStringFree(&ds);
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 88953c0..e483eb4 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -373,7 +373,7 @@ InitializeHostName(
* Convert string from native to UTF then change to lowercase.
*/
- Tcl_UtfToLower(Tcl_Char16ToUtfDString(tbuf, -1, &ds));
+ Tcl_UtfToLower(Tcl_WCharToUtfDString(tbuf, -1, &ds));
} else {
if (TclpHasSockets(NULL) == TCL_OK) {