From e16df96d28704115312eee43ffc5019a766d2cfd Mon Sep 17 00:00:00 2001 From: hypnotoad Date: Fri, 19 Jan 2018 20:27:15 +0000 Subject: Fixed a problem where a Windows hack was occuring after it was called in the tclZipfs.c file, preventing it from compiling properly. --- generic/tclZipfs.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index b81c58f..bb9d45f 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -2945,6 +2945,24 @@ ZipFSListObjCmd( return TCL_OK; } +#if defined(_WIN32) || defined(_WIN64) +#define LIBRARY_SIZE 64 +static int +ToUtf( + const WCHAR *wSrc, + char *dst) +{ + char *start; + + start = dst; + while (*wSrc != '\0') { + dst += Tcl_UniCharToUtf(*wSrc, dst); + wSrc++; + } + *dst = '\0'; + return (int) (dst - start); +} +#endif Tcl_Obj *TclZipfs_TclLibrary(void) { if(zipfs_literal_tcl_library) { @@ -4422,26 +4440,6 @@ TclZipfs_Init(Tcl_Interp *interp) #endif } -#if defined(_WIN32) || defined(_WIN64) -#define LIBRARY_SIZE 64 -static int -ToUtf( - const WCHAR *wSrc, - char *dst) -{ - char *start; - - start = dst; - while (*wSrc != '\0') { - dst += Tcl_UniCharToUtf(*wSrc, dst); - wSrc++; - } - *dst = '\0'; - return (int) (dst - start); -} - -#endif - static int TclZipfs_AppHook_FindTclInit(const char *archive){ Tcl_Obj *vfsinitscript; int found; -- cgit v0.12