summaryrefslogtreecommitdiffstats
path: root/win/tclWin32Dll.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-11 20:32:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-11 20:32:48 (GMT)
commit8e7a963f7fb10cc556337a18a652fd0c78c51029 (patch)
treea88544233a4bc1362697ed19312f29758138a7b2 /win/tclWin32Dll.c
parent3e3f2b135495753cad09a1f4bcaec5e460557e6f (diff)
downloadtcl-8e7a963f7fb10cc556337a18a652fd0c78c51029.zip
tcl-8e7a963f7fb10cc556337a18a652fd0c78c51029.tar.gz
tcl-8e7a963f7fb10cc556337a18a652fd0c78c51029.tar.bz2
Change TCHAR -> WCHAR in many places, since that's what it is since Windows NT
Diffstat (limited to 'win/tclWin32Dll.c')
-rw-r--r--win/tclWin32Dll.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 4c2134b..36205e1 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -46,8 +46,8 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason,
*/
typedef struct MountPointMap {
- TCHAR *volumeName; /* Native wide string volume name. */
- TCHAR driveLetter; /* Drive letter corresponding to the volume
+ WCHAR *volumeName; /* Native wide string volume name. */
+ WCHAR driveLetter; /* Drive letter corresponding to the volume
* name. */
struct MountPointMap *nextPtr;
/* Pointer to next structure in list, or
@@ -286,11 +286,11 @@ TclWinEncodingsCleanup(void)
char
TclWinDriveLetterForVolMountPoint(
- const TCHAR *mountPoint)
+ const WCHAR *mountPoint)
{
MountPointMap *dlIter, *dlPtr2;
- TCHAR Target[55]; /* Target of mount at mount point */
- TCHAR drive[4] = TEXT("A:\\");
+ WCHAR Target[55]; /* Target of mount at mount point */
+ WCHAR drive[4] = TEXT("A:\\");
/*
* Detect the volume mounted there. Unfortunately, there is no simple way
@@ -301,14 +301,14 @@ TclWinDriveLetterForVolMountPoint(
Tcl_MutexLock(&mountPointMap);
dlIter = driveLetterLookup;
while (dlIter != NULL) {
- if (_tcscmp(dlIter->volumeName, mountPoint) == 0) {
+ if (wcscmp(dlIter->volumeName, mountPoint) == 0) {
/*
* We need to check whether this information is still valid, since
* either the user or various programs could have adjusted the
* mount points on the fly.
*/
- drive[0] = (TCHAR) dlIter->driveLetter;
+ drive[0] = (WCHAR) dlIter->driveLetter;
/*
* Try to read the volume mount point and see where it points.
@@ -316,7 +316,7 @@ TclWinDriveLetterForVolMountPoint(
if (GetVolumeNameForVolumeMountPoint(drive,
Target, 55) != 0) {
- if (_tcscmp(dlIter->volumeName, Target) == 0) {
+ if (wcscmp(dlIter->volumeName, Target) == 0) {
/*
* Nothing has changed.
*/
@@ -379,7 +379,7 @@ TclWinDriveLetterForVolMountPoint(
for (dlIter = driveLetterLookup; dlIter != NULL;
dlIter = dlIter->nextPtr) {
- if (_tcscmp(dlIter->volumeName, Target) == 0) {
+ if (wcscmp(dlIter->volumeName, Target) == 0) {
alreadyStored = 1;
break;
}
@@ -400,7 +400,7 @@ TclWinDriveLetterForVolMountPoint(
for (dlIter = driveLetterLookup; dlIter != NULL;
dlIter = dlIter->nextPtr) {
- if (_tcscmp(dlIter->volumeName, mountPoint) == 0) {
+ if (wcscmp(dlIter->volumeName, mountPoint) == 0) {
Tcl_MutexUnlock(&mountPointMap);
return (char) dlIter->driveLetter;
}
@@ -447,7 +447,7 @@ TclWinDriveLetterForVolMountPoint(
* nativeBuffer <- UtfToExternal(encoding, utfBuffer);
* Tcl_FreeEncoding(encoding);
*
- * By convention, in Windows a TCHAR is a Unicode character. If you plan
+ * By convention, in Windows a WCHAR is a Unicode character. If you plan
* on targeting a Unicode interface when running on Windows, these
* functions should be used. If you plan on targetting a "char" oriented
* function on Windows, use Tcl_UtfToExternal() with an encoding of NULL.
@@ -463,7 +463,7 @@ TclWinDriveLetterForVolMountPoint(
*---------------------------------------------------------------------------
*/
-TCHAR *
+WCHAR *
Tcl_WinUtfToTChar(
const char *string, /* Source string in UTF-8. */
int len, /* Source string length in bytes, or -1 for