[sword-cvs] sword/src/modules/filters thmlosis.cpp,1.21,1.22

sword@www.crosswire.org sword@www.crosswire.org
Sun, 26 Jan 2003 02:57:47 -0700


Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv20580

Modified Files:
	thmlosis.cpp 
Log Message:
changed to make fewer assumptions about a text that were specific to our KJV

Index: thmlosis.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlosis.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** thmlosis.cpp	22 Nov 2002 04:46:03 -0000	1.21
--- thmlosis.cpp	26 Jan 2003 09:57:45 -0000	1.22
***************
*** 95,101 ****
  			}
  
! 			// hebrew titles
  			if (!strcmp(token, "div class=\"sechead\"")) {
! 				pushString(&to, "<title type=\"psalm\">");
  				divEnd = "</title>";
  				newText = true;
--- 95,101 ----
  			}
  
! 			// section titles
  			if (!strcmp(token, "div class=\"sechead\"")) {
! 				pushString(&to, "<title>");
  				divEnd = "</title>";
  				newText = true;
***************
*** 122,151 ****
  				handled = true;
  			}
! 			// Italics assume transchange
! 			if (!stricmp(token, "i")) {
! 				pushString(&to, "<transChange type=\"added\">");
! 				newText = true;
! 				lastspace = false;
! 				handled = true;
! 			}
! 			else	if (!stricmp(token, "/i")) {
! 				pushString(&to, "</transChange>");
! 				lastspace = false;
! 				handled = true;
! 			}
  
  			// Footnote
  			if (!strcmp(token, "note")) {
! 	//			pushString(buf, "<reference work=\"Bible.KJV\" reference=\"");
! 				suspendTextPassThru = true;
  				newText = true;
  				handled = true;
  			}
  			else	if (!strcmp(token, "/note")) {
! 				tmp = "<note type=\"x-StudyNote\">";
! 				tmp.append(textStart, (int)(textEnd - textStart)+1);
! 				tmp += "</note>";
! 				pushString(&to, tmp.c_str());
! 				suspendTextPassThru = false;
  				handled = true;
  			}
--- 122,180 ----
  				handled = true;
  			}
! /*      Usage of italics to represent transChange isn't domaninant;
!         solution: mark in OSIS instead, assume no semantics other than emphasis
!                 of italicized text
!                         if (!strcmp(module->Type(), "Biblical Texts")) {
!         			// Italics assume transchange for Biblical texts
! 	        		if (!stricmp(token, "i")) {
! 		        		pushString(&to, "<transChange type=\"added\">");
! 			        	newText = true;
! 				        lastspace = false;
!         				handled = true;
! 	        		}
! 		        	else	if (!stricmp(token, "/i")) {
! 			        	pushString(&to, "</transChange>");
!         				lastspace = false;
! 	        			handled = true;
! 		        	}
!                         }
!                         else {
!                         	// otherwise, italics are just italics
! */
! 	        		if (!stricmp(token, "i")) {
! 		        		pushString(&to, "<hi type=\"i\">");
! 			        	newText = true;
! 				        lastspace = false;
!         				handled = true;
! 	        		}
! 		        	else	if (!stricmp(token, "/i")) {
! 			        	pushString(&to, "</hi>");
!         				lastspace = false;
! 	        			handled = true;
! 		        	}
! //                        }
! 
! 	        	if (!strcmp(token, "b")) {
! 		        	pushString(&to, "<hi type=\"b\">");
! 			       	newText = true;
! 			        lastspace = false;
!         			handled = true;
! 	        	}
! 		        else	if (!strcmp(token, "/b")) {
! 			       	pushString(&to, "</hi>");
!         			lastspace = false;
! 	        		handled = true;
!                         }
  
  			// Footnote
  			if (!strcmp(token, "note")) {
! 		        	pushString(&to, "<note>");
  				newText = true;
+                                 lastspace = false;
  				handled = true;
  			}
  			else	if (!strcmp(token, "/note")) {
! 				pushString(&to, "</note>");
!                                 lastspace = false;
  				handled = true;
  			}
***************
*** 288,292 ****
  		char ref[254];
  		if (vkey->Verse())
! 			sprintf(ref, "\t\t<verse osisID=\"%s\">", vkey->getOSISRef());
  		else *ref = 0;
  		if (*ref) {
--- 317,321 ----
  		char ref[254];
  		if (vkey->Verse())
! 			sprintf(ref, "<verse osisID=\"%s\">", vkey->getOSISRef());
  		else *ref = 0;
  		if (*ref) {