[sword-svn] r1939 - in trunk: lib/bcppmake src/modules/filters

scribe at crosswire.org scribe at crosswire.org
Sat Jul 1 14:44:00 MST 2006


Author: scribe
Date: 2006-07-01 14:43:54 -0700 (Sat, 01 Jul 2006)
New Revision: 1939

Modified:
   trunk/lib/bcppmake/libsword.bpr
   trunk/src/modules/filters/osisfootnotes.cpp
   trunk/src/modules/filters/osisheadings.cpp
   trunk/src/modules/filters/osisrtf.cpp
Log:
Improved support for KJV2006 work.

Modified: trunk/lib/bcppmake/libsword.bpr
===================================================================
--- trunk/lib/bcppmake/libsword.bpr	2006-06-30 07:47:31 UTC (rev 1938)
+++ trunk/lib/bcppmake/libsword.bpr	2006-07-01 21:43:54 UTC (rev 1939)
@@ -128,7 +128,7 @@
     <PATHRC value=".;"/>
     <PATHASM value=".;"/>
     <LINKER value="TLib"/>
-    <USERDEFINES value="UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG"/>
+    <USERDEFINES value="UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING"/>
     <SYSDEFINES value="NO_STRICT"/>
     <MAINSOURCE value="libsword.bpf"/>
     <INCLUDEPATH value="..\..\src\modules\tests;..\..\src\utilfuns\zlib;..\..\src\modules\lexdict\zld;..\..\src\modules\lexdict\rawld4;..\..\src\modules\comments\zcom;..\..\src\modules\genbook\rawgenbook;..\..\src\modules\genbook;..\..\src\modules\texts\ztext;..\..\src\modules\texts\rawtext;..\..\src\modules\texts;..\..\src\modules\lexdict\rawld;..\..\src\modules\lexdict;..\..\src\modules\filters;..\..\src\modules\common;..\..\src\modules\comments\rawfiles;..\..\src\modules\comments\rawcom;..\..\src\modules\comments\hrefcom;..\..\src\modules\comments;..\..\src\modules;..\..\src\frontend;..\..\src\utilfuns;..\..\src\mgr;..\..\src\keys;..\..\..\icu-sword\source\common;..\..\apps\windoze\CBuilder5\InstallMgr\curl\include;..\..\include;$(BCB)\include;$(BCB)\include\vcl;..\..\..\icu-sword\source\i18n;..\..\..\biblecs\clucene\src;..\..\..\biblecs\apps\InstallMgr\curl\include"/>
@@ -154,9 +154,9 @@
       -I..\..\..\biblecs\apps\InstallMgr\curl\include -src_suffix cpp -DUNICODE 
       -D_ICU_ -D_ICUSWORD_ -DUSBINARY -DU_HAVE_PLACEMENT_NEW=0 -DUSELUCENE 
       -D_WIN32 -D_CL_DISABLE_MULTITHREADING -no_tie -boa"/>
-    <CFLAG1 value="-Od -Vx -X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM"/>
-    <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
-    <AFLAGS value="/mx /w2 /zi"/>
+    <CFLAG1 value="-O2 -Vx -X- -a8 -b- -k- -vi -c -tW -tWM"/>
+    <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+    <AFLAGS value="/mx /w2 /zn"/>
     <LFLAGS value="/P512"/>
   </OPTIONS>
   <LINKER>
@@ -230,8 +230,8 @@
 
 [HistoryLists\hlConditionals]
 Count=22
-Item0=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG
-Item1=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING
+Item0=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING
+Item1=UNICODE;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;_DEBUG
 Item2=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING
 Item3=_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING;UNICODE
 Item4=_UCS2;_ICU_;_ICUSWORD_;USBINARY;U_HAVE_PLACEMENT_NEW=0;USELUCENE;_WIN32;_CL_DISABLE_MULTITHREADING

Modified: trunk/src/modules/filters/osisfootnotes.cpp
===================================================================
--- trunk/src/modules/filters/osisfootnotes.cpp	2006-06-30 07:47:31 UTC (rev 1938)
+++ trunk/src/modules/filters/osisfootnotes.cpp	2006-07-01 21:43:54 UTC (rev 1939)
@@ -74,8 +74,10 @@
 				tag = token;
 				
 				if (!tag.isEndTag()) {
-					if (tag.getAttribute("type") && !strcmp("strongsMarkup", tag.getAttribute("type"))) {  // handle bug in KJV2003 module where some note open tags were <note ... />
-						tag.setEmpty(false);
+					if (tag.getAttribute("type") && (!strcmp("x-strongsMarkup", tag.getAttribute("type"))
+											|| !strcmp("strongsMarkup", tag.getAttribute("type")))	// deprecated
+							) {
+						tag.setEmpty(false);  // handle bug in KJV2003 module where some note open tags were <note ... />
 						strongsMarkup = true;
 					}
 					

Modified: trunk/src/modules/filters/osisheadings.cpp
===================================================================
--- trunk/src/modules/filters/osisheadings.cpp	2006-06-30 07:47:31 UTC (rev 1938)
+++ trunk/src/modules/filters/osisheadings.cpp	2006-07-01 21:43:54 UTC (rev 1939)
@@ -34,6 +34,7 @@
 	bool intoken    = false;
 	bool hide       = false;
 	bool preverse   = false;
+	bool canonical  = false;
 	SWBuf header;
 	int headerNum   = 0;
 	int pvHeaderNum = 0;
@@ -64,16 +65,19 @@
 					}
 				}
 				
-				if (tag.getAttribute("subtype") && !stricmp(tag.getAttribute("subtype"), "x-preverse")) {
+				if (         (tag.getAttribute("subType") && !stricmp(tag.getAttribute("subType"), "x-preverse"))
+						|| (tag.getAttribute("subtype") && !stricmp(tag.getAttribute("subtype"), "x-preverse"))	// deprecated
+						) {
 					hide = true;
 					preverse = true;
 					header = "";
+					canonical = (tag.getAttribute("canonical") && (!stricmp(tag.getAttribute("canonical"), "true")));
 					continue;
 				}
 				if (!tag.isEndTag()) { //start tag
 					hide = true;
 					header = "";
-					if (option) {	// we want the tag in the text
+					if (option || canonical) {	// we want the tag in the text
 						text.append('<');
 						text.append(token);
 						text.append('>');
@@ -81,7 +85,7 @@
 					continue;
 				}
 				if (hide && tag.isEndTag()) {
-					if (module->isProcessEntryAttributes() && (option || (!preverse))) {
+					if (module->isProcessEntryAttributes() && ((option || canonical) || (!preverse))) {
 						if (preverse) {
 							sprintf(buf, "%i", pvHeaderNum++);
 							module->getEntryAttributes()["Heading"]["Preverse"][buf] = header;
@@ -89,7 +93,7 @@
 						else {
 							sprintf(buf, "%i", headerNum++);
 							module->getEntryAttributes()["Heading"]["Interverse"][buf] = header;
-							if (option) {	// we want the tag in the text
+							if (option || canonical) {	// we want the tag in the text
 								text.append(header);
 							}
 						}
@@ -101,7 +105,7 @@
 					}
 					
 					hide = false;
-					if (!option || preverse) {	// we don't want the tag in the text anymore
+					if (!(option || canonical) || preverse) {	// we don't want the tag in the text anymore
 						preverse = false;
 						continue;
 					}

Modified: trunk/src/modules/filters/osisrtf.cpp
===================================================================
--- trunk/src/modules/filters/osisrtf.cpp	2006-06-30 07:47:31 UTC (rev 1938)
+++ trunk/src/modules/filters/osisrtf.cpp	2006-07-01 21:43:54 UTC (rev 1939)
@@ -149,7 +149,9 @@
 				if (!tag.isEmpty()) {
 					SWBuf type = tag.getAttribute("type");
 
-					if (type != "strongsMarkup") {	// leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off
+					if (		   (type != "x-strongsMarkup")	// leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off
+							&& (type != "strongsMarkup")		// deprecated
+							) {
 						SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
 						VerseKey *vkey;
 						// see if we have a VerseKey * or descendant
@@ -311,9 +313,6 @@
 		else if (!strcmp(tag.getName(), "divineName")) {
 
 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
-
-// just do all transChange tags this way for now
-//				if (type == "supplied")
 				u->suspendTextPassThru = true;
 			}
 			else if (tag.isEndTag()) {
@@ -326,6 +325,16 @@
 			}
 		}
 
+		// <div>
+		else if (!strcmp(tag.getName(), "div")) {
+
+			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+				buf.append("\\par\\par\\pard ");
+			}
+			else if (tag.isEndTag()) {
+			}
+		}
+
 		// image
 		else if (!strcmp(tag.getName(), "figure")) {
 			const char *src = tag.getAttribute("src");



More information about the sword-cvs mailing list