[sword-svn] r2359 - trunk/utilities

dmsmith at crosswire.org dmsmith at crosswire.org
Tue Apr 28 10:54:46 MST 2009


Author: dmsmith
Date: 2009-04-28 10:54:46 -0700 (Tue, 28 Apr 2009)
New Revision: 2359

Modified:
   trunk/utilities/osis2mod.cpp
Log:
osis2mod: made output of verse tag a compile time option, defaulting to off

Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp	2009-04-28 16:06:08 UTC (rev 2358)
+++ trunk/utilities/osis2mod.cpp	2009-04-28 17:54:46 UTC (rev 2359)
@@ -68,6 +68,9 @@
 // Debug for re-v11n
 //#define DEBUG_REV11N
 
+// Include verse tag
+//#define INCLUDE_VERSE
+
 #ifndef NO_SWORD_NAMESPACE
 using namespace sword;
 #endif
@@ -771,7 +774,14 @@
 				inChapterHeader = false;
 				verseDepth      = tagStack.size();
 
-				text.append(token);
+#ifndef INCLUDE_VERSE
+				// Include the token if it is not a verse
+				if (strcmp(tokenName, "verse")) {
+#endif
+					text.append(token);
+#ifndef INCLUDE_VERSE
+				}
+#endif
 
 				if (inWOC) {
 					text.append(wocTag);
@@ -896,8 +906,16 @@
 				text.append("</q>");
 			}
 
-			text.append(token);
 
+#ifndef INCLUDE_VERSE
+			// Include the token if it is not a verse
+			if (strcmp(tokenName, "verse")) {
+#endif
+				text.append(token);
+#ifndef INCLUDE_VERSE
+			}
+#endif
+
 			writeEntry(text);
 
 			inVerse     = false;




More information about the sword-cvs mailing list