[sword-cvs] sword/src/modules/filters osisfootnotes.cpp,1.7,1.8 osislemma.cpp,1.1,1.2 osisrtf.cpp,1.9,1.10 osisstrongs.cpp,1.6,1.7

sword@www.crosswire.org sword@www.crosswire.org
Fri, 27 Jun 2003 14:51:52 -0700


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

Modified Files:
	osisfootnotes.cpp osislemma.cpp osisrtf.cpp osisstrongs.cpp 
Log Message:
no message

Index: osisfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisfootnotes.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** osisfootnotes.cpp	27 Jun 2003 11:31:42 -0000	1.7
--- osisfootnotes.cpp	27 Jun 2003 21:51:50 -0000	1.8
***************
*** 50,54 ****
  	SWBuf tagText;
  	XMLTag startTag;
- 	int tagTextNum  = 1;
  	int footnoteNum = 1;
  	char buf[254];
--- 50,53 ----
***************
*** 58,61 ****
--- 57,69 ----
  
  	for (text = ""; *from; from++) {
+ 
+ 		// remove all newlines temporarily to fix kjv2003 module
+ 		if ((*from == 10) || (*from == 13)) {
+ 			if ((text.length()>1) && (text[text.length()-2] != ' ') && (*(from+1) != ' '))
+ 				text += ' ';
+ 			continue;
+ 		}
+ 
+ 		
  		if (*from == '<') {
  			intoken = true;

Index: osislemma.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osislemma.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** osislemma.cpp	27 Jun 2003 06:18:05 -0000	1.1
--- osislemma.cpp	27 Jun 2003 21:51:50 -0000	1.2
***************
*** 64,69 ****
  				XMLTag tag(token);
  				if ((!strcmp(tag.getName(), "w")) && (!tag.isEndTag())) {	// Lemma
! 					if (tag.getAttribute("lemma"))
  						tag.setAttribute("lemma", 0);
  				}
  				// keep tag, possibly with the lemma removed
--- 64,72 ----
  				XMLTag tag(token);
  				if ((!strcmp(tag.getName(), "w")) && (!tag.isEndTag())) {	// Lemma
! 					SWBuf lemma = tag.getAttribute("lemma");
! 					if (lemma.length()) {
  						tag.setAttribute("lemma", 0);
+ 					 	tag.setAttribute("savlm", lemma.c_str());
+ 					}
  				}
  				// keep tag, possibly with the lemma removed

Index: osisrtf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisrtf.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** osisrtf.cpp	27 Jun 2003 06:13:16 -0000	1.9
--- osisrtf.cpp	27 Jun 2003 21:51:50 -0000	1.10
***************
*** 94,108 ****
  				}
  				if ((attrib = tag.getAttribute("morph")) && (show)) {
! 					int count = tag.getAttributePartCount("morph");
! 					int i = (count > 1) ? 0 : -1;		// -1 for whole value cuz it's faster, but does the same thing as 0
! 					do {
! 						attrib = tag.getAttribute("morph", i);
! 						if (i < 0) i = 0;	// to handle our -1 condition
! 						val = strchr(attrib, ':');
! 						val = (val) ? (val + 1) : attrib;
! 						if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2])))
! 							val+=2;
! 						buf.appendFormatted(" {\\cf4 \\sub (%s)}", val);
! 					} while (++i < count);
  				}
  				if (attrib = tag.getAttribute("POS")) {
--- 94,113 ----
  				}
  				if ((attrib = tag.getAttribute("morph")) && (show)) {
! 					SWBuf savelemma = tag.getAttribute("savlm");
! 					if ((strstr(savelemma.c_str(), "3588")) && (lastText.length() < 1))
! 						show = false;
! 					if (show) {
! 						int count = tag.getAttributePartCount("morph");
! 						int i = (count > 1) ? 0 : -1;		// -1 for whole value cuz it's faster, but does the same thing as 0
! 						do {
! 							attrib = tag.getAttribute("morph", i);
! 							if (i < 0) i = 0;	// to handle our -1 condition
! 							val = strchr(attrib, ':');
! 							val = (val) ? (val + 1) : attrib;
! 							if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2])))
! 								val+=2;
! 							buf.appendFormatted(" {\\cf4 \\sub (%s)}", val);
! 						} while (++i < count);
! 					}
  				}
  				if (attrib = tag.getAttribute("POS")) {

Index: osisstrongs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisstrongs.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** osisstrongs.cpp	27 Jun 2003 06:13:16 -0000	1.6
--- osisstrongs.cpp	27 Jun 2003 21:51:50 -0000	1.7
***************
*** 104,107 ****
--- 104,109 ----
  					char *num = strstr(token, "lemma=\"x-Strongs:");
  					if (num) {
+ 						memcpy(num, "savlm", 5);
+ /*						
  						for (int i = 0; i < 17; i++)
  							*num++ = ' ';
***************
*** 110,113 ****
--- 112,116 ----
  						if (*num)
  							*num = ' ';
+ */
  					}
  				}