summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-01-10 14:33:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-01-10 14:33:54 (GMT)
commitd34c6b6526e8bb7c96736c2ef47422357e68c8d9 (patch)
tree2f91c61ee4dc1339e052647b0469b35c54f7f768 /win
parentb40ed15606db487315736beef3d23679445b122e (diff)
parent48d6a20861f95be856bef0e780c054757c9c3803 (diff)
downloadtcl-d34c6b6526e8bb7c96736c2ef47422357e68c8d9.zip
tcl-d34c6b6526e8bb7c96736c2ef47422357e68c8d9.tar.gz
tcl-d34c6b6526e8bb7c96736c2ef47422357e68c8d9.tar.bz2
merge core-8-branch
Diffstat (limited to 'win')
-rw-r--r--win/tclWin32Dll.c76
-rw-r--r--win/tclWinInit.c1
2 files changed, 2 insertions, 75 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index da1cdfe..599c126 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -32,10 +32,6 @@ static HINSTANCE hInstance; /* HINSTANCE of this DLL. */
#define cpuid __asm __emit 0fh __asm __emit 0a2h
#endif
-#if TCL_UTF_MAX < 4
-static Tcl_Encoding winTCharEncoding = NULL;
-#endif
-
/*
* The following declaration is for the VC++ DLL entry point.
*/
@@ -196,8 +192,6 @@ TclWinInit(
if (os.dwPlatformId != VER_PLATFORM_WIN32_NT) {
Tcl_Panic("Windows NT is the only supported platform");
}
-
- TclWinResetInterfaces();
}
/*
@@ -234,38 +228,10 @@ TclWinNoBackslash(
/*
*---------------------------------------------------------------------------
*
- * TclpSetInterfaces --
- *
- * A helper proc.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *---------------------------------------------------------------------------
- */
-
-void
-TclpSetInterfaces(void)
-{
-#if TCL_UTF_MAX < 4
- TclWinResetInterfaces();
- winTCharEncoding = Tcl_GetEncoding(NULL, "unicode");
-#endif
-}
-
-/*
- *---------------------------------------------------------------------------
- *
* TclWinEncodingsCleanup --
*
- * Called during finalization to free up any encodings we use.
- *
- * We also clean up any memory allocated in our mount point map which is
- * used to follow certain kinds of symlinks. That code should never be
- * used once encodings are taken down.
+ * Called during finalization to clean up any memory allocated in our
+ * mount point map which is used to follow certain kinds of symlinks.
*
* Results:
* None.
@@ -281,8 +247,6 @@ TclWinEncodingsCleanup(void)
{
MountPointMap *dlIter, *dlIter2;
- TclWinResetInterfaces();
-
/*
* Clean up the mount point map.
*/
@@ -299,32 +263,6 @@ TclWinEncodingsCleanup(void)
}
/*
- *---------------------------------------------------------------------------
- *
- * TclWinResetInterfaces --
- *
- * Called during finalization to reset us to a safe state for reuse.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *---------------------------------------------------------------------------
- */
-void
-TclWinResetInterfaces(void)
-{
-#if TCL_UTF_MAX < 4
- if (winTCharEncoding != NULL) {
- Tcl_FreeEncoding(winTCharEncoding);
- winTCharEncoding = NULL;
- }
-#endif
-}
-
-/*
*--------------------------------------------------------------------
*
* TclWinDriveLetterForVolMountPoint
@@ -533,7 +471,6 @@ Tcl_WinUtfToTChar(
Tcl_DString *dsPtr) /* Uninitialized or free DString in which the
* converted string is stored. */
{
-#if TCL_UTF_MAX > 3
TCHAR *wp;
int size = MultiByteToWideChar(CP_UTF8, 0, string, len, 0, 0);
@@ -545,10 +482,6 @@ Tcl_WinUtfToTChar(
Tcl_DStringSetLength(dsPtr, 2*size);
wp[size] = 0;
return wp;
-#else
- return (TCHAR *) Tcl_UtfToExternalDString(winTCharEncoding,
- string, len, dsPtr);
-#endif
}
char *
@@ -559,7 +492,6 @@ Tcl_WinTCharToUtf(
Tcl_DString *dsPtr) /* Uninitialized or free DString in which the
* converted string is stored. */
{
-#if TCL_UTF_MAX > 3
char *p;
int size;
@@ -575,10 +507,6 @@ Tcl_WinTCharToUtf(
Tcl_DStringSetLength(dsPtr, size);
p[size] = 0;
return p;
-#else
- return Tcl_ExternalToUtfDString(winTCharEncoding,
- (const char *) string, len, dsPtr);
-#endif
}
/*
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 4be8f1f..02fa674 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -487,7 +487,6 @@ TclpSetInitialEncodings(void)
{
Tcl_DString encodingName;
- TclpSetInterfaces();
Tcl_SetSystemEncoding(NULL,
Tcl_GetEncodingNameFromEnvironment(&encodingName));
Tcl_DStringFree(&encodingName);