[sword-svn] r3415 - trunk/utilities
dmsmith at crosswire.org
dmsmith at crosswire.org
Tue Mar 15 07:05:20 MST 2016
Author: dmsmith
Date: 2016-03-15 07:05:20 -0700 (Tue, 15 Mar 2016)
New Revision: 3415
Modified:
trunk/utilities/tei2mod.cpp
Log:
Fixed bug where XZ was set for compressor when none was requested. Reported by Karl Kleinpaste
Modified: trunk/utilities/tei2mod.cpp
===================================================================
--- trunk/utilities/tei2mod.cpp 2016-03-01 21:57:57 UTC (rev 3414)
+++ trunk/utilities/tei2mod.cpp 2016-03-15 14:05:20 UTC (rev 3415)
@@ -390,6 +390,7 @@
for (int i = 3; i < argc; i++) {
if (!strcmp(argv[i], "-z")) {
+cout << "-z\n";
if (modDrv.size()) usage(*argv, "Cannot specify both -z and -s");
compType = "ZIP";
if (i+1 < argc && argv[i+1][0] != '-') {
@@ -404,6 +405,7 @@
recommendedPath += "zld/";
}
else if (!strcmp(argv[i], "-Z")) {
+cout << "-Z\n";
if (compType.size()) usage(*argv, "Cannot specify both -z and -Z");
if (modDrv.size()) usage(*argv, "Cannot specify both -Z and -s");
compType = "LZSS";
@@ -411,6 +413,7 @@
recommendedPath += "zld/";
}
else if (!strcmp(argv[i], "-s")) {
+cout << "-s\n";
if (compType.size()) usage(*argv, "Cannot specify both -s and -z");
if (i+1 < argc) {
int size = atoi(argv[++i]);
@@ -428,15 +431,18 @@
usage(*argv, "-s requires one of <2|4>");
}
else if (!strcmp(argv[i], "-N")) {
+cout << "-N\n";
normalize = false;
}
else if (!strcmp(argv[i], "-c")) {
+cout << "-c\n";
if (i+1 < argc) cipherKey = argv[++i];
else usage(*argv, "-c requires <cipher_key>");
}
else usage(*argv, (((SWBuf)"Unknown argument: ")+ argv[i]).c_str());
}
if (!modDrv.size()) {
+cout << "RawLD4\n";
modDrv = "RawLD4";
recommendedPath += "rawld4/";
}
@@ -465,7 +471,7 @@
usage(*argv, "ERROR: SWORD library not compiled with bzip2 compression support.\n\tBe sure libbz2 is available when compiling SWORD library");
#endif
}
- else if (compType = "XZ") {
+ else if (compType == "XZ") {
#ifndef EXCLUDEXZ
compressor = new XzCompress();
#else
More information about the sword-cvs
mailing list