[sword-svn] r2858 - in trunk: cmake include lib/vcppmake/vc8 src/mgr src/modules/common

chrislit at crosswire.org chrislit at crosswire.org
Sun Jul 7 20:08:11 MST 2013


Author: chrislit
Date: 2013-07-07 20:08:10 -0700 (Sun, 07 Jul 2013)
New Revision: 2858

Added:
   trunk/include/bz2comprs.h
Removed:
   trunk/include/bz2comprs .h
Modified:
   trunk/cmake/sources.cmake
   trunk/lib/vcppmake/vc8/libsword.vcxproj
   trunk/src/mgr/swmgr.cpp
   trunk/src/modules/common/Makefile.am
   trunk/src/modules/common/bz2comprs.cpp
Log:
plugged Bzip2Compress & XzCompress into the API, though these remain clones of the ZipCompress class and will not be supported in 1.7.0


Modified: trunk/cmake/sources.cmake
===================================================================
--- trunk/cmake/sources.cmake	2013-07-08 02:14:10 UTC (rev 2857)
+++ trunk/cmake/sources.cmake	2013-07-08 03:08:10 UTC (rev 2858)
@@ -185,6 +185,8 @@
 # Sources relying on ZLib
 SET(sword_zlib_used_SOURCES
 	src/modules/common/zipcomprs.cpp
+	src/modules/common/bz2comprs.cpp
+	src/modules/common/xzcomprs.cpp
 	src/utilfuns/zlib/untgz.c
 )
 SET(sword_zlib_nofound_SOURCES

Deleted: trunk/include/bz2comprs .h
===================================================================
--- trunk/include/bz2comprs .h	2013-07-08 02:14:10 UTC (rev 2857)
+++ trunk/include/bz2comprs .h	2013-07-08 03:08:10 UTC (rev 2858)
@@ -1,45 +0,0 @@
-/******************************************************************************
- *
- *  bz2comprs.h -	Bzip2Compress, a driver class that provides bzip2
- *			compression (Burrows–Wheeler with Huffman coding)
- *
- * $Id$
- *
- * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#ifndef BZ2COMPRS_H
-#define BZ2COMPRS_H
-
-#include <swcomprs.h>
-
-#include <defs.h>
-
-SWORD_NAMESPACE_START
-
-class SWDLLEXPORT Bzip2Compress : public SWCompress {
-
-protected:
-public:
-	Bzip2Compress();
-	virtual ~Bzip2Compress();
-
-	virtual void Encode(void);
-	virtual void Decode(void);
-};
-
-SWORD_NAMESPACE_END
-#endif

Copied: trunk/include/bz2comprs.h (from rev 2857, trunk/include/bz2comprs .h)
===================================================================
--- trunk/include/bz2comprs.h	                        (rev 0)
+++ trunk/include/bz2comprs.h	2013-07-08 03:08:10 UTC (rev 2858)
@@ -0,0 +1,45 @@
+/******************************************************************************
+ *
+ *  bz2comprs.h -	Bzip2Compress, a driver class that provides bzip2
+ *			compression (Burrows–Wheeler with Huffman coding)
+ *
+ * $Id$
+ *
+ * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
+ *	CrossWire Bible Society
+ *	P. O. Box 2528
+ *	Tempe, AZ  85280-2528
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ */
+
+#ifndef BZ2COMPRS_H
+#define BZ2COMPRS_H
+
+#include <swcomprs.h>
+
+#include <defs.h>
+
+SWORD_NAMESPACE_START
+
+class SWDLLEXPORT Bzip2Compress : public SWCompress {
+
+protected:
+public:
+	Bzip2Compress();
+	virtual ~Bzip2Compress();
+
+	virtual void Encode(void);
+	virtual void Decode(void);
+};
+
+SWORD_NAMESPACE_END
+#endif

Modified: trunk/lib/vcppmake/vc8/libsword.vcxproj
===================================================================
--- trunk/lib/vcppmake/vc8/libsword.vcxproj	2013-07-08 02:14:10 UTC (rev 2857)
+++ trunk/lib/vcppmake/vc8/libsword.vcxproj	2013-07-08 03:08:10 UTC (rev 2858)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug with ICU|Win32">
@@ -401,6 +401,8 @@
     <ClCompile Include="..\..\..\src\keys\versetreekey.cpp" />
     <ClCompile Include="..\..\..\src\modules\comments\zcom\zcom.cpp" />
     <ClCompile Include="..\..\..\src\modules\common\zipcomprs.cpp" />
+    <ClCompile Include="..\..\..\src\modules\common\bz2comprs.cpp" />
+    <ClCompile Include="..\..\..\src\modules\common\xzcomprs.cpp" />
     <ClCompile Include="..\..\..\src\modules\lexdict\zld\zld.cpp" />
     <ClCompile Include="..\..\..\src\modules\common\zstr.cpp" />
     <ClCompile Include="..\..\..\src\modules\texts\ztext\ztext.cpp" />
@@ -569,6 +571,8 @@
     <ClInclude Include="..\..\..\include\zcom.h" />
     <ClInclude Include="..\..\..\include\zconf.h" />
     <ClInclude Include="..\..\..\include\zipcomprs.h" />
+    <ClInclude Include="..\..\..\include\bz2comprs.h" />
+    <ClInclude Include="..\..\..\include\xzcomprs.h" />
     <ClInclude Include="..\..\..\include\zld.h" />
     <ClInclude Include="..\..\..\include\zlib.h" />
     <ClInclude Include="..\..\..\include\zstr.h" />

Modified: trunk/src/mgr/swmgr.cpp
===================================================================
--- trunk/src/mgr/swmgr.cpp	2013-07-08 02:14:10 UTC (rev 2857)
+++ trunk/src/mgr/swmgr.cpp	2013-07-08 03:08:10 UTC (rev 2858)
@@ -91,6 +91,8 @@
 
 #ifndef EXCLUDEZLIB
 #include "zipcomprs.h"
+#include "bz2comprs.h"
+#include "xzcomprs.h"
 #endif
 
 
@@ -931,6 +933,12 @@
 		if (!stricmp(misc1.c_str(), "ZIP"))
 			compress = new ZipCompress();
 		else
+		if (!stricmp(misc1.c_str(), "BZIP2_UNSUPPORTED"))
+			compress = new Bzip2Compress();
+		else
+		if (!stricmp(misc1.c_str(), "XZ_UNSUPPORTED"))
+			compress = new XzCompress();
+		else
 #endif
 		if (!stricmp(misc1.c_str(), "LZSS"))
 			compress = new LZSSCompress();

Modified: trunk/src/modules/common/Makefile.am
===================================================================
--- trunk/src/modules/common/Makefile.am	2013-07-08 02:14:10 UTC (rev 2857)
+++ trunk/src/modules/common/Makefile.am	2013-07-08 03:08:10 UTC (rev 2858)
@@ -6,7 +6,9 @@
 libsword_la_SOURCES += $(commondir)/lzsscomprs.cpp
 
 if HAVE_LIBZ
-SWZLIB = $(commondir)/zipcomprs.cpp
+SWZLIB =  $(commondir)/zipcomprs.cpp
+SWZLIB += $(commondir)/bz2comprs.cpp
+SWZLIB += $(commondir)/xzcomprs.cpp
 else
 SWZLIB =
 endif

Modified: trunk/src/modules/common/bz2comprs.cpp
===================================================================
--- trunk/src/modules/common/bz2comprs.cpp	2013-07-08 02:14:10 UTC (rev 2857)
+++ trunk/src/modules/common/bz2comprs.cpp	2013-07-08 03:08:10 UTC (rev 2858)
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
-#include <bzcomprs.h>
+#include <bz2comprs.h>
 #include <zlib.h>
 
 SWORD_NAMESPACE_START




More information about the sword-cvs mailing list