[sword-svn] r2213 - trunk/utilities

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Tue Dec 2 10:24:47 MST 2008


Author: dmsmith
Date: 2008-12-02 10:24:46 -0700 (Tue, 02 Dec 2008)
New Revision: 2213

Modified:
   trunk/utilities/osis2mod.cpp
Log:
Added revision to an osis2mod created module

Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp	2008-12-02 15:42:49 UTC (rev 2212)
+++ trunk/utilities/osis2mod.cpp	2008-12-02 17:24:46 UTC (rev 2213)
@@ -371,6 +371,10 @@
 void writeEntry(SWBuf &text, bool force = false) {
 	char keyOsisID[255];
 
+	static const char* revision = "<milestone type=\"x-importer\" subType=\"x-osis2mod\" n=\"$Rev:$\"/>";
+	static bool firstOT = true;
+	static bool firstNT = true;
+
 	if (!inCanonicalOSISBook) {
 		return;
 	}
@@ -431,6 +435,28 @@
 		}
 #endif
 
+		// Put the revision into the module
+		int testmt = currentVerse.Testament();
+		if ((testmt == 1 && firstOT) || (testmt == 2 && firstNT)) {
+			VerseKey t;
+			t.AutoNormalize(0);
+			t.Headings(1);
+			t = currentVerse;
+			currentVerse.Book(0);
+			currentVerse.Chapter(0);
+			currentVerse.Verse(0);
+			module->setEntry(revision);
+			currentVerse = t;
+			switch (testmt) {
+			case 1:
+				firstOT = false;
+				break;
+			case 2:
+				firstNT = false;
+				break;
+			}
+                }
+
 		// If the entry already exists, then append this entry to the text.
 		// This is for verses that are outside the KJV versification. They are appended to the prior verse.
 		// The space should not be needed if we retained verse tags.




More information about the sword-cvs mailing list