[sword-svn] r2090 - trunk/utilities

scribe at www.crosswire.org scribe at www.crosswire.org
Thu Sep 27 15:44:21 MST 2007


Author: scribe
Date: 2007-09-27 15:44:20 -0700 (Thu, 27 Sep 2007)
New Revision: 2090

Modified:
   trunk/utilities/osis2mod.cpp
Log:
added "unknown option" output


Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp	2007-09-27 22:23:57 UTC (rev 2089)
+++ trunk/utilities/osis2mod.cpp	2007-09-27 22:44:20 UTC (rev 2090)
@@ -639,11 +639,10 @@
 }
 
 void usage(const char *app, const char *error = 0) {
-	if (error) {
-		fprintf(stderr, "\n%s: %s\n", app, error);
-	}
-	fprintf(stderr,
-"\nusage: %s <output/path> <osisDoc> [OPTIONS]\n", app);
+
+	if (error) fprintf(stderr, "\n%s: %s\n", app, error);
+
+	fprintf(stderr, "\nusage: %s <output/path> <osisDoc> [OPTIONS]\n", app);
 	fprintf(stderr, "  -a\t\t\t augment module if exists (default is to create new)\n");
 	fprintf(stderr, "  -z\t\t\t use ZIP compression (default no compression)\n");
 	fprintf(stderr, "  -Z\t\t\t use LZSS compression (default no compression)\n");
@@ -694,9 +693,10 @@
 			usage(*argv, "-b requires one of <2|3|4>");
 		}
 		else if (!strcmp(argv[i], "-c")) {
-			if (i+1 < argc) cipherKey = argv[i];
+			if (i+1 < argc) cipherKey = argv[++i];
 			else usage(*argv, "-c requires <cipher_key>");
 		}
+		else usage(*argv, (((SWBuf)"Unknown argument: ")+ argv[i]).c_str());
 	}
 
 	switch (compType) {	// these are deleted by zText




More information about the sword-cvs mailing list