summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIOUtil.c6
-rw-r--r--generic/tclZipfs.h25
-rw-r--r--generic/zipfs.c42
-rw-r--r--win/makefile.vc2
4 files changed, 24 insertions, 51 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 0ef6d3b..79ec894 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -191,9 +191,7 @@ const Tcl_Filesystem tclNativeFilesystem = {
TclpObjChdir
};
-#ifdef ZIPFS_IN_TCL
MODULE_SCOPE Tcl_Filesystem zipfsFilesystem;
-#endif
/*
* Define the tail of the linked list. Note that for unconventional uses of
@@ -1415,7 +1413,6 @@ TclFSNormalizeToUniquePath(
Claim();
for (fsRecPtr=firstFsRecPtr; fsRecPtr!=NULL; fsRecPtr=fsRecPtr->nextPtr) {
-#ifdef ZIPFS_IN_TCL
if (fsRecPtr->fsPtr == &zipfsFilesystem) {
ClientData clientData = NULL;
/*
@@ -1432,7 +1429,6 @@ TclFSNormalizeToUniquePath(
}
continue;
}
-#endif
if (fsRecPtr->fsPtr != &tclNativeFilesystem) {
continue;
}
@@ -1457,11 +1453,9 @@ TclFSNormalizeToUniquePath(
if (fsRecPtr->fsPtr == &tclNativeFilesystem) {
continue;
}
-#ifdef ZIPFS_IN_TCL
if (fsRecPtr->fsPtr == &zipfsFilesystem) {
continue;
}
-#endif
if (fsRecPtr->fsPtr->normalizePathProc != NULL) {
startAt = fsRecPtr->fsPtr->normalizePathProc(interp, pathPtr,
diff --git a/generic/tclZipfs.h b/generic/tclZipfs.h
index 75dcb13..bcf6cef 100644
--- a/generic/tclZipfs.h
+++ b/generic/tclZipfs.h
@@ -22,33 +22,16 @@ extern "C" {
# define ZIPFSAPI extern
#endif
-#ifdef ZIPFS_IN_TK
-#define Zipfs_Mount Tkzipfs_Mount
-#define Zipfs_Unmount Tkzipfs_Unmount
-#define Zipfs_Init Tkzipfs_Init
-#define Zipfs_SafeInit Tkzipfs_SafeInit
-#ifdef BUILD_tk
-# undef ZIPFSAPI
-# define ZIPFSAPI DLLEXPORT
-#endif
-#endif
-
-#ifdef ZIPFS_IN_TCL
-#define Zipfs_Mount Tclzipfs_Mount
-#define Zipfs_Unmount Tclzipfs_Unmount
-#define Zipfs_Init Tclzipfs_Init
-#define Zipfs_SafeInit Tclzipfs_SafeInit
#ifdef BUILD_tcl
# undef ZIPFSAPI
# define ZIPFSAPI DLLEXPORT
#endif
-#endif
-ZIPFSAPI int Zipfs_Mount(Tcl_Interp *interp, const char *zipname,
+ZIPFSAPI int Tclzipfs_Mount(Tcl_Interp *interp, const char *zipname,
const char *mntpt, const char *passwd);
-ZIPFSAPI int Zipfs_Unmount(Tcl_Interp *interp, const char *zipname);
-ZIPFSAPI int Zipfs_Init(Tcl_Interp *interp);
-ZIPFSAPI int Zipfs_SafeInit(Tcl_Interp *interp);
+ZIPFSAPI int Tclzipfs_Unmount(Tcl_Interp *interp, const char *zipname);
+ZIPFSAPI int Tclzipfs_Init(Tcl_Interp *interp);
+ZIPFSAPI int Tclzipfs_SafeInit(Tcl_Interp *interp);
#ifdef __cplusplus
}
diff --git a/generic/zipfs.c b/generic/zipfs.c
index b54d5a2..144be30 100644
--- a/generic/zipfs.c
+++ b/generic/zipfs.c
@@ -1031,7 +1031,7 @@ error:
/*
*-------------------------------------------------------------------------
*
- * Zipfs_Mount --
+ * Tclzipfs_Mount --
*
* This procedure is invoked to mount a given ZIP archive file on
* a given mountpoint with optional ZIP password.
@@ -1047,7 +1047,7 @@ error:
*/
int
-Zipfs_Mount(Tcl_Interp *interp, const char *zipname, const char *mntpt,
+Tclzipfs_Mount(Tcl_Interp *interp, const char *zipname, const char *mntpt,
const char *passwd)
{
char *realname, *p;
@@ -1404,7 +1404,7 @@ nextent:
/*
*-------------------------------------------------------------------------
*
- * Zipfs_Unmount --
+ * Tclzipfs_Unmount --
*
* This procedure is invoked to unmount a given ZIP archive.
*
@@ -1418,7 +1418,7 @@ nextent:
*/
int
-Zipfs_Unmount(Tcl_Interp *interp, const char *zipname)
+Tclzipfs_Unmount(Tcl_Interp *interp, const char *zipname)
{
char *realname;
ZipFile *zf;
@@ -1509,7 +1509,7 @@ ZipFSMountCmd(ClientData clientData, Tcl_Interp *interp,
" ?zipfile ?mountpoint? ?password???\"", 0);
return TCL_ERROR;
}
- return Zipfs_Mount(interp, (argc > 1) ? argv[1] : NULL,
+ return Tclzipfs_Mount(interp, (argc > 1) ? argv[1] : NULL,
(argc > 2) ? argv[2] : NULL,
(argc > 3) ? argv[3] : NULL);
}
@@ -1539,7 +1539,7 @@ ZipFSUnmountCmd(ClientData clientData, Tcl_Interp *interp,
" zipfile\"", (char *) NULL);
return TCL_ERROR;
}
- return Zipfs_Unmount(interp, argv[1]);
+ return Tclzipfs_Unmount(interp, argv[1]);
}
/*
@@ -3870,7 +3870,7 @@ const Tcl_Filesystem zipfsFilesystem = {
/*
*-------------------------------------------------------------------------
*
- * Zipfs_doInit --
+ * doInit --
*
* Perform per interpreter initialization of this module.
*
@@ -3885,7 +3885,7 @@ const Tcl_Filesystem zipfsFilesystem = {
*/
static int
-Zipfs_doInit(Tcl_Interp *interp, int safe)
+doInit(Tcl_Interp *interp, int safe)
{
#ifdef HAVE_ZLIB
static const char findproc[] =
@@ -3929,14 +3929,10 @@ Zipfs_doInit(Tcl_Interp *interp, int safe)
Tcl_InitHashTable(&ZipFS.fileHash, TCL_STRING_KEYS);
Tcl_InitHashTable(&ZipFS.zipHash, TCL_STRING_KEYS);
ZipFS.initialized = ZipFS.idCount = 1;
-#if defined(ZIPFS_IN_TCL) || defined(ZIPFS_IN_TK)
- Tcl_StaticPackage(interp, "zipfs", Zipfs_Init, Zipfs_SafeInit);
-#endif
+ Tcl_StaticPackage(interp, "zipfs", Tclzipfs_Init, Tclzipfs_SafeInit);
}
Unlock();
-#if !defined(ZIPFS_IN_TCL) && !defined(ZIPFS_IN_TK)
Tcl_PkgProvide(interp, "zipfs", "1.0");
-#endif
if (!safe) {
Tcl_CreateCommand(interp, "::zipfs::mount", ZipFSMountCmd, 0, 0);
Tcl_CreateCommand(interp, "::zipfs::unmount", ZipFSUnmountCmd, 0, 0);
@@ -3964,7 +3960,7 @@ Zipfs_doInit(Tcl_Interp *interp, int safe)
/*
*-------------------------------------------------------------------------
*
- * Zipfs_Init, Zipfs_SafeInit --
+ * Tclzipfs_Init, Tclzipfs_SafeInit --
*
* These functions are invoked to perform per interpreter initialization
* of this module.
@@ -3980,15 +3976,15 @@ Zipfs_doInit(Tcl_Interp *interp, int safe)
*/
int
-Zipfs_Init(Tcl_Interp *interp)
+Tclzipfs_Init(Tcl_Interp *interp)
{
- return Zipfs_doInit(interp, 0);
+ return doInit(interp, 0);
}
int
-Zipfs_SafeInit(Tcl_Interp *interp)
+Tclzipfs_SafeInit(Tcl_Interp *interp)
{
- return Zipfs_doInit(interp, 1);
+ return doInit(interp, 1);
}
#ifndef HAVE_ZLIB
@@ -3996,7 +3992,7 @@ Zipfs_SafeInit(Tcl_Interp *interp)
/*
*-------------------------------------------------------------------------
*
- * Zipfs_Mount, Zipfs_Unmount --
+ * Tclzipfs_Mount, Tclzipfs_Unmount --
*
* Dummy version when no ZLIB support available.
*
@@ -4004,16 +4000,16 @@ Zipfs_SafeInit(Tcl_Interp *interp)
*/
int
-Zipfs_Mount(Tcl_Interp *interp, const char *zipname, const char *mntpt,
+Tclzipfs_Mount(Tcl_Interp *interp, const char *zipname, const char *mntpt,
const char *passwd)
{
- return Zipfs_doInit(interp, 1);
+ return doInit(interp, 1);
}
int
-Zipfs_Unmount(Tcl_Interp *interp, const char *zipname)
+Tclzipfs_Unmount(Tcl_Interp *interp, const char *zipname)
{
- return Zipfs_doInit(interp, 1);
+ return doInit(interp, 1);
}
#endif
diff --git a/win/makefile.vc b/win/makefile.vc
index 80682b9..2e04f15 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -504,7 +504,7 @@ crt = -MT
!endif
TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)"
-TCL_DEFINES = -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline -DHAVE_ZLIB=1 -DZIPFS_IN_TCL
+TCL_DEFINES = -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline -DHAVE_ZLIB=1
BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES)
CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE
TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES)