[sword-cvs] sword/src/modules/filters cipherfil.cpp,1.17,1.18 gbffootnotes.cpp,1.16,1.17 gbfheadings.cpp,1.7,1.8 gbfhtml.cpp,1.25,1.26 gbfmorph.cpp,1.8,1.9 gbfosis.cpp,1.15,1.16 gbfplain.cpp,1.15,1.16 gbfredletterwords.cpp,1.4,1.5 gbfstrongs.cpp,1.20,1.21 gbfthml.cpp,1.17,1.18 gbfwebif.cpp,1.2,1.3 greeklexattribs.cpp,1.14,1.15 osisfootnotes.cpp,1.4,1.5 osisheadings.cpp,1.4,1.5 osishtmlhref.cpp,1.5,1.6 osismorph.cpp,1.5,1.6 osisplain.cpp,1.2,1.3 osisrtf.cpp,1.7,1.8 osisstrongs.cpp,1.4,1.5 plainfootnotes.cpp,1.10,1.11 rtfhtml.cpp,1.6,1.7 swbasicfilter.cpp,1.22,1.23 thmlfootnotes.cpp,1.9,1.10 thmlgbf.cpp,1.12,1.13 thmlheadings.cpp,1.8,1.9 thmlhtml.cpp,1.26,1.27 thmlhtmlhref.cpp,1.33,1.34 thmllemma.cpp,1.6,1.7 thmlmorph.cpp,1.11,1.12 thmlolb.cpp,1.6,1.7 thmlosis.cpp,1.23,1.24 thmlplain.cpp,1.9,1.10 thmlrtf.cpp,1.30,1.31 thmlscripref.cpp,1.9,1.10 thmlstrongs.cpp,1.14,1.15 thmlvariants.cpp,1.7,1.8 thmlwebif.cpp,1.4,1.5 utf8arshaping.cpp,1.6,1.7 utf8bidireorder.cpp,1.6,1.7 utf8nfc.cpp,1.8,1.9 utf8nfkd.cpp,1.8,1.9 utf8transliterator.cpp,1.27,1.28

sword@www.crosswire.org sword@www.crosswire.org
Thu, 26 Jun 2003 18:41:15 -0700


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

Modified Files:
	cipherfil.cpp gbffootnotes.cpp gbfheadings.cpp gbfhtml.cpp 
	gbfmorph.cpp gbfosis.cpp gbfplain.cpp gbfredletterwords.cpp 
	gbfstrongs.cpp gbfthml.cpp gbfwebif.cpp greeklexattribs.cpp 
	osisfootnotes.cpp osisheadings.cpp osishtmlhref.cpp 
	osismorph.cpp osisplain.cpp osisrtf.cpp osisstrongs.cpp 
	plainfootnotes.cpp rtfhtml.cpp swbasicfilter.cpp 
	thmlfootnotes.cpp thmlgbf.cpp thmlheadings.cpp thmlhtml.cpp 
	thmlhtmlhref.cpp thmllemma.cpp thmlmorph.cpp thmlolb.cpp 
	thmlosis.cpp thmlplain.cpp thmlrtf.cpp thmlscripref.cpp 
	thmlstrongs.cpp thmlvariants.cpp thmlwebif.cpp 
	utf8arshaping.cpp utf8bidireorder.cpp utf8nfc.cpp utf8nfkd.cpp 
	utf8transliterator.cpp 
Log Message:
no message

Index: cipherfil.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/cipherfil.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** cipherfil.cpp	24 Apr 2003 12:50:13 -0000	1.17
--- cipherfil.cpp	27 Jun 2003 01:41:07 -0000	1.18
***************
*** 6,10 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <cipherfil.h>
  
--- 6,9 ----

Index: gbffootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbffootnotes.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** gbffootnotes.cpp	27 Feb 2003 10:41:18 -0000	1.16
--- gbffootnotes.cpp	27 Jun 2003 01:41:07 -0000	1.17
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbffootnotes.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: gbfheadings.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfheadings.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** gbfheadings.cpp	20 Feb 2003 23:01:25 -0000	1.7
--- gbfheadings.cpp	27 Jun 2003 01:41:07 -0000	1.8
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbfheadings.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: gbfhtml.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfhtml.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** gbfhtml.cpp	20 Feb 2003 07:25:20 -0000	1.25
--- gbfhtml.cpp	27 Jun 2003 01:41:07 -0000	1.26
***************
*** 16,25 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbfhtml.h>
  #include <ctype.h>
- #include <string>
- 
- using std::string;
  
  SWORD_NAMESPACE_START
--- 16,21 ----

Index: gbfmorph.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfmorph.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** gbfmorph.cpp	26 Feb 2003 01:31:49 -0000	1.8
--- gbfmorph.cpp	27 Jun 2003 01:41:07 -0000	1.9
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbfmorph.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: gbfosis.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfosis.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** gbfosis.cpp	28 Apr 2003 01:08:57 -0000	1.15
--- gbfosis.cpp	27 Jun 2003 01:41:07 -0000	1.16
***************
*** 8,12 ****
  #include <stdlib.h>
  #include <stdio.h>
- #include <string>
  #include <stdarg.h>
  #include <gbfosis.h>
--- 8,11 ----
***************
*** 48,52 ****
  	bool newText = false;
  	bool newWord = false;
! 	std::string tmp;
  	bool suspendTextPassThru = false;
  	bool keepToken = false;
--- 47,51 ----
  	bool newText = false;
  	bool newWord = false;
! 	SWBuf tmp;
  	bool suspendTextPassThru = false;
  	bool keepToken = false;
***************
*** 371,375 ****
  
  const char *GBFOSIS::convertToOSIS(const char *inRef, const SWKey *key) {
! 	static std::string outRef;
  
  	outRef = "";
--- 370,374 ----
  
  const char *GBFOSIS::convertToOSIS(const char *inRef, const SWKey *key) {
! 	static SWBuf outRef;
  
  	outRef = "";

Index: gbfplain.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfplain.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** gbfplain.cpp	20 Feb 2003 12:31:54 -0000	1.15
--- gbfplain.cpp	27 Jun 2003 01:41:07 -0000	1.16
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbfplain.h>
  
--- 7,10 ----

Index: gbfredletterwords.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfredletterwords.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** gbfredletterwords.cpp	28 May 2003 17:42:12 -0000	1.4
--- gbfredletterwords.cpp	27 Jun 2003 01:41:07 -0000	1.5
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbfredletterwords.h>
  #include <swmodule.h>
--- 7,10 ----

Index: gbfstrongs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfstrongs.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** gbfstrongs.cpp	27 Feb 2003 08:26:32 -0000	1.20
--- gbfstrongs.cpp	27 Jun 2003 01:41:07 -0000	1.21
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbfstrongs.h>
  #include <swmodule.h>
--- 7,10 ----
***************
*** 58,62 ****
  	unsigned int textStart = 0, textEnd = 0;
  	bool newText = false;
! 	std::string tmp;
  	const char *from;
  
--- 57,61 ----
  	unsigned int textStart = 0, textEnd = 0;
  	bool newText = false;
! 	SWBuf tmp;
  	const char *from;
  

Index: gbfthml.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfthml.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** gbfthml.cpp	26 Feb 2003 02:17:03 -0000	1.17
--- gbfthml.cpp	27 Jun 2003 01:41:07 -0000	1.18
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <gbfthml.h>
  
--- 16,19 ----

Index: gbfwebif.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfwebif.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gbfwebif.cpp	7 Jun 2003 02:09:16 -0000	1.2
--- gbfwebif.cpp	27 Jun 2003 01:41:07 -0000	1.3
***************
*** 31,35 ****
  	char *valto;
  	const char *num;
! 	std::string url;
  
  	if (!substituteToken(buf, token)) {
--- 31,35 ----
  	char *valto;
  	const char *num;
! 	SWBuf url;
  
  	if (!substituteToken(buf, token)) {

Index: greeklexattribs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/greeklexattribs.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** greeklexattribs.cpp	18 Apr 2003 01:05:40 -0000	1.14
--- greeklexattribs.cpp	27 Jun 2003 01:41:07 -0000	1.15
***************
*** 73,83 ****
  								phrase.erase(phrase.find_first_of(")"), 1);
  								phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1);
! 								module->getEntryAttributes()["AVPhrase"][wordstr]["Alt"] = phrase;
  								phrase = tmp;
  							}
  							phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1);
  							freq.erase(0,freq.find_first_not_of("\r\n\v\t ")); freq.erase(freq.find_last_not_of("\r\n\v\t ")+1);
! 							module->getEntryAttributes()["AVPhrase"][wordstr]["Phrase"] = phrase;
! 							module->getEntryAttributes()["AVPhrase"][wordstr]["Frequency"] = freq;
  							currentPhrase = 0;
  							currentPhraseEnd = 0;
--- 73,83 ----
  								phrase.erase(phrase.find_first_of(")"), 1);
  								phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1);
! 								module->getEntryAttributes()["AVPhrase"][wordstr]["Alt"] = phrase.c_str();
  								phrase = tmp;
  							}
  							phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1);
  							freq.erase(0,freq.find_first_not_of("\r\n\v\t ")); freq.erase(freq.find_last_not_of("\r\n\v\t ")+1);
! 							module->getEntryAttributes()["AVPhrase"][wordstr]["Phrase"] = phrase.c_str();
! 							module->getEntryAttributes()["AVPhrase"][wordstr]["Frequency"] = freq.c_str();
  							currentPhrase = 0;
  							currentPhraseEnd = 0;

Index: osisfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisfootnotes.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** osisfootnotes.cpp	26 Jun 2003 04:33:31 -0000	1.4
--- osisfootnotes.cpp	27 Jun 2003 01:41:07 -0000	1.5
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <osisfootnotes.h>
  #include <swmodule.h>
--- 7,10 ----

Index: osisheadings.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisheadings.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** osisheadings.cpp	18 Jun 2003 20:14:59 -0000	1.4
--- osisheadings.cpp	27 Jun 2003 01:41:07 -0000	1.5
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <osisheadings.h>
  #include <swmodule.h>
--- 7,10 ----

Index: osishtmlhref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osishtmlhref.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** osishtmlhref.cpp	26 Jun 2003 19:43:32 -0000	1.5
--- osishtmlhref.cpp	27 Jun 2003 01:41:07 -0000	1.6
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <osishtmlhref.h>
  #include <utilxml.h>
--- 16,19 ----
***************
*** 112,116 ****
  		else if (!strcmp(tag.getName(), "note")) {	
  			if (!tag.isEmpty() && !tag.isEndTag()) {		
! 				string footnoteNum = userData["fn"];
  				SWBuf type = tag.getAttribute("type");
  				
--- 111,115 ----
  		else if (!strcmp(tag.getName(), "note")) {	
  			if (!tag.isEmpty() && !tag.isEndTag()) {		
! 				SWBuf footnoteNum = userData["fn"];
  				SWBuf type = tag.getAttribute("type");
  				

Index: osismorph.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osismorph.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** osismorph.cpp	19 Jun 2003 16:58:30 -0000	1.5
--- osismorph.cpp	27 Jun 2003 01:41:07 -0000	1.6
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <osismorph.h>
  #include <utilxml.h>
--- 7,10 ----

Index: osisplain.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisplain.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** osisplain.cpp	26 Feb 2003 19:32:30 -0000	1.2
--- osisplain.cpp	27 Jun 2003 01:41:07 -0000	1.3
***************
*** 16,116 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <osisplain.h>
  
  SWORD_NAMESPACE_START
  
! OSISPlain::OSISPlain()
! {
!   setTokenStart("<");
!   setTokenEnd(">");
    
!   setEscapeStart("&");
!   setEscapeEnd(";");
    
!   setEscapeStringCaseSensitive(true);
    
!   addEscapeStringSubstitute("amp", "&");
!   addEscapeStringSubstitute("apos", "'");
!   addEscapeStringSubstitute("lt", "<");
!   addEscapeStringSubstitute("gt", ">");
!   addEscapeStringSubstitute("quot", "\"");
    
!   setTokenCaseSensitive(true);  
  }
  
  bool OSISPlain::handleToken(SWBuf &buf, const char *token, DualStringMap &userData) {
    // manually process if it wasn't a simple substitution
!   if (!substituteToken(buf, token)) {
!     //w
!     if (!strncmp(token, "w", 1)) {
!       userData["w"] == token;
!     }
!     else if (!strncmp(token, "/w", 2)) {
!       pos1 = userData["w"].find("xlit=\"", 0);
!       if (pos1 != string::npos) {
! 	pos1 = userData["w"].find(":", pos1) + 1;
! 	pos2 = userData["w"].find("\"", pos1) - 1;
! 	tagData = userData["w"].substr(pos1, pos2-pos1);
! 	buf.appendFormatted(" <%s>", tagData.c_str() );
!       }
!       pos1 = userData["w"].find("gloss=\"", 0);
!       if (pos1 != string::npos) {
! 	pos1 = userData["w"].find(":", pos1) + 1;
! 	pos2 = userData["w"].find("\"", pos1) - 1;
! 	tagData = userData["w"].substr(pos1, pos2-pos1);
! 	buf.appendFormatted(" <%s>", tagData.c_str() );
!       }
!       pos1 = userData["w"].find("lemma=\"", 0);
!       if (pos1 != string::npos) {
! 	pos1 = userData["w"].find(":", pos1) + 1;
! 	pos2 = userData["w"].find("\"", pos1) - 1;
! 	tagData = userData["w"].substr(pos1, pos2-pos1);
! 	buf.appendFormatted(" <%s>", tagData.c_str() );
!       }
!       pos1 = userData["w"].find("morph=\"", 0);
!       if (pos1 != string::npos) {
! 	pos1 = userData["w"].find(":", pos1) + 1;
! 	pos2 = userData["w"].find("\"", pos1) - 1;
! 	tagData = userData["w"].substr(pos1, pos2-pos1);
! 	buf.appendFormatted(" <%s>", tagData.c_str() );
!       }
!       pos1 = userData["w"].find("POS=\"", 0);
!       if (pos1 != string::npos) {
! 	pos1 = userData["w"].find(":", pos1) + 1;
! 	pos2 = userData["w"].find("\"", pos1) - 1;
! 	tagData = userData["w"].substr(pos1, pos2-pos1);
! 	buf.appendFormatted(" <%s>", tagData.c_str() );
!       }      
!     }
!     
!     //p
!     else if (!strncmp(token, "p", 1)) {
!       buf += "\n\n";
!     }
  
!     //line
!     else if (!strncmp(token, "line", 4)) {
!       buf += "\n";
!     }
  
!     //note
!     else if (!strncmp(token, "note", 4)) {
!       buf += " (";
!     }
!     else if (!strncmp(token, "/note", 5)) {
!       buf += ")";
!     }
!     
!     //title
!     else if (!strncmp(token, "/title", 6)) {
!       buf += "\n";
!     }
  
!     else {
!       return false;  // we still didn't handle token
  		}
!   }
!   return true;
  }
  
--- 16,197 ----
  
  #include <stdlib.h>
  #include <osisplain.h>
+ #include <utilxml.h>
  
  SWORD_NAMESPACE_START
  
! OSISPlain::OSISPlain() {
! 	setTokenStart("<");
! 	setTokenEnd(">");
    
! 	setEscapeStart("&");
! 	setEscapeEnd(";");
    
! 	setEscapeStringCaseSensitive(true);
    
! 	addEscapeStringSubstitute("amp", "&");
! 	addEscapeStringSubstitute("apos", "'");
! 	addEscapeStringSubstitute("lt", "<");
! 	addEscapeStringSubstitute("gt", ">");
! 	addEscapeStringSubstitute("quot", "\"");
    
! 	setTokenCaseSensitive(true);  
  }
  
  bool OSISPlain::handleToken(SWBuf &buf, const char *token, DualStringMap &userData) {
    // manually process if it wasn't a simple substitution
! 	if (!substituteToken(buf, token)) {
! 		XMLTag tag(token);
! 		
! 		// <w> tag
! 		if (!strcmp(tag.getName(), "w")) {
  
! 			// start <w> tag
! 			if ((!tag.isEmpty()) && (!tag.isEndTag())) {
! 				userData["w"] = token;
! 			}
  
! 			// end or empty <w> tag
! 			else {
! 				bool endTag = tag.isEndTag();
! 				SWBuf lastText;
! 				bool show = true;	// to handle unplaced article in kjv2003-- temporary till combined
  
! 				if (endTag) {
! 					tag = userData["w"].c_str();
! 					lastText = userData["lastTextNode"].c_str();
! 				}
! 				else lastText = "stuff";
! 					
! 				const char *attrib;
! 				const char *val;
! 				if (attrib = tag.getAttribute("xlit")) {
! 					val = strchr(attrib, ':');
! 					val = (val) ? (val + 1) : attrib;
! 					buf.appendFormatted(" <%s>", val);
! 				}
! 				if (attrib = tag.getAttribute("gloss")) {
! 					val = strchr(attrib, ':');
! 					val = (val) ? (val + 1) : attrib;
! 					buf.appendFormatted(" <%s>", val);
! 				}
! 				if (attrib = tag.getAttribute("lemma")) {
! 					int count = tag.getAttributePartCount("lemma");
! 					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("lemma", i);
! 						if (i < 0) i = 0;	// to handle our -1 condition
! 						val = strchr(attrib, ':');
! 						val = (val) ? (val + 1) : attrib;
! 						if ((strchr("GH", *val)) && (isdigit(val[1])))
! 							val++;
! 						if ((!strcmp(val, "3588")) && (lastText.length() < 1))
! 							show = false;
! 						else	buf.appendFormatted(" <%s>}", val);
! 					} while (++i < count);
! 				}
! 				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(" (%s)", val);
! 					} while (++i < count);
! 				}
! 				if (attrib = tag.getAttribute("POS")) {
! 					val = strchr(attrib, ':');
! 					val = (val) ? (val + 1) : attrib;
! 					buf.appendFormatted(" <%s>", val);
! 				}
! 			}
  		}
! 
! 		// <note> tag
! 		else if (!strcmp(tag.getName(), "note")) {
! 			if (!tag.isEmpty() && !tag.isEndTag()) {
! 				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
! 					buf += " (";
! 				}
! 				else	userData["suspendTextPassThru"] = "true";
! 			}
! 			if (tag.isEndTag()) {
! 				if (userData["suspendTextPassThru"] == "false")
! 					buf += ")";
! 				else	userData["suspendTextPassThru"] = "false";
! 			}
! 		}
! 
! 		// <p> paragraph tag
! 		else if (!strcmp(tag.getName(), "p")) {
! 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {	// non-empty start tag
! 				buf += "\n";
! 			}
! 			else if (tag.isEndTag()) {	// end tag
! 				buf += "\n";
! 			}
! 			else {					// empty paragraph break marker
! 				buf += "\n\n";
! 			}
! 		}
! 
! 		// <line> poetry, etc
! 		else if (!strcmp(tag.getName(), "line")) {
! 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
! 			}
! 			else if (tag.isEndTag()) {
! 				buf += "\n";
! 			}
! 			else {	// empty line marker
! 				buf += "\n";
! 			}
! 		}
! 
! 		// <title>
! 		else if (!strcmp(tag.getName(), "title")) {
! 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
! 			}
! 			else if (tag.isEndTag()) {
! 				buf += "\n";
! 			}
! 			else {	// empty title marker
! 				// what to do?  is this even valid?
! 				buf += "\n";
! 			}
! 		}
! 
! 		// <q> quote
! 		else if (!strcmp(tag.getName(), "q")) {
! 			SWBuf type = tag.getAttribute("type");
! 			SWBuf who = tag.getAttribute("who");
! 			const char *lev = tag.getAttribute("level");
! 			int level = (lev) ? atoi(lev) : 1;
! 			
! 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
! 
! 				//alternate " and '
! 				buf += (level % 2) ? '\'' : '\"';
! 			}
! 			else if (tag.isEndTag()) {
! 				//alternate " and '
! 				buf += (level % 2) ? '\'' : '\"';
! 			}
! 			else {	// empty quote marker
! 				//alternate " and '
! 				buf += (level % 2) ? '\'' : '\"';
! 			}
! 		}
! 
! 		else {
! 			return false;  // we still didn't handle token
! 		}
! 	}
! 	return true;
  }
  

Index: osisrtf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisrtf.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** osisrtf.cpp	26 Jun 2003 04:33:31 -0000	1.7
--- osisrtf.cpp	27 Jun 2003 01:41:07 -0000	1.8
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <osisrtf.h>
  #include <utilxml.h>
--- 16,19 ----
***************
*** 23,43 ****
  SWORD_NAMESPACE_START
  
! OSISRTF::OSISRTF()
! {
!   setTokenStart("<");
!   setTokenEnd(">");
    
!   setEscapeStart("&");
!   setEscapeEnd(";");
    
!   setEscapeStringCaseSensitive(true);
    
!   addEscapeStringSubstitute("amp", "&");
!   addEscapeStringSubstitute("apos", "'");
!   addEscapeStringSubstitute("lt", "<");
!   addEscapeStringSubstitute("gt", ">");
!   addEscapeStringSubstitute("quot", "\"");
    
!   setTokenCaseSensitive(true);  
  }
  
--- 22,41 ----
  SWORD_NAMESPACE_START
  
! OSISRTF::OSISRTF() {
! 	setTokenStart("<");
! 	setTokenEnd(">");
    
! 	setEscapeStart("&");
! 	setEscapeEnd(";");
    
! 	setEscapeStringCaseSensitive(true);
    
! 	addEscapeStringSubstitute("amp", "&");
! 	addEscapeStringSubstitute("apos", "'");
! 	addEscapeStringSubstitute("lt", "<");
! 	addEscapeStringSubstitute("gt", ">");
! 	addEscapeStringSubstitute("quot", "\"");
    
! 	setTokenCaseSensitive(true);  
  }
  
***************
*** 122,126 ****
  		else if (!strcmp(tag.getName(), "note")) {
  			if (!tag.isEmpty() && !tag.isEndTag()) {
! 				string footnoteNum = userData["fn"];
  				SWBuf type = tag.getAttribute("type");
  
--- 120,124 ----
  		else if (!strcmp(tag.getName(), "note")) {
  			if (!tag.isEmpty() && !tag.isEndTag()) {
! 				SWBuf footnoteNum = userData["fn"];
  				SWBuf type = tag.getAttribute("type");
  

Index: osisstrongs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisstrongs.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** osisstrongs.cpp	27 Feb 2003 08:26:32 -0000	1.4
--- osisstrongs.cpp	27 Jun 2003 01:41:07 -0000	1.5
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <osisstrongs.h>
  #include <swmodule.h>
--- 7,10 ----
***************
*** 59,63 ****
  	unsigned int textStart = 0, textEnd = 0;
  	bool newText = false;
! 	std::string tmp;
  
  	SWBuf orig = text;
--- 58,62 ----
  	unsigned int textStart = 0, textEnd = 0;
  	bool newText = false;
! 	SWBuf tmp;
  
  	SWBuf orig = text;

Index: plainfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/plainfootnotes.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** plainfootnotes.cpp	8 Mar 2003 23:58:24 -0000	1.10
--- plainfootnotes.cpp	27 Jun 2003 01:41:07 -0000	1.11
***************
*** 20,24 ****
  
  #include <stdlib.h>
- #include <string.h>
  #ifndef __GNUC__
  #else
--- 20,23 ----

Index: rtfhtml.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/rtfhtml.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** rtfhtml.cpp	8 Mar 2003 23:58:24 -0000	1.6
--- rtfhtml.cpp	27 Jun 2003 01:41:07 -0000	1.7
***************
*** 17,21 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <rtfhtml.h>
  
--- 17,20 ----

Index: swbasicfilter.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/swbasicfilter.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** swbasicfilter.cpp	20 Feb 2003 07:53:15 -0000	1.22
--- swbasicfilter.cpp	27 Jun 2003 01:41:07 -0000	1.23
***************
*** 24,28 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <swbasicfilter.h>
  #include <stdio.h>
--- 24,27 ----
***************
*** 195,199 ****
  	char tokenStartPos = 0, tokenEndPos = 0;
  	DualStringMap userData;
! 	std::string lastTextNode;
  
  	bool suspendTextPassThru = false;
--- 194,198 ----
  	char tokenStartPos = 0, tokenEndPos = 0;
  	DualStringMap userData;
! 	SWBuf lastTextNode;
  
  	bool suspendTextPassThru = false;

Index: thmlfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlfootnotes.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** thmlfootnotes.cpp	12 Jun 2003 15:30:21 -0000	1.9
--- thmlfootnotes.cpp	27 Jun 2003 01:41:07 -0000	1.10
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlfootnotes.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: thmlgbf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlgbf.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** thmlgbf.cpp	26 Feb 2003 02:28:57 -0000	1.12
--- thmlgbf.cpp	27 Jun 2003 01:41:07 -0000	1.13
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlgbf.h>
  
--- 16,19 ----

Index: thmlheadings.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlheadings.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** thmlheadings.cpp	1 Jun 2003 21:04:01 -0000	1.8
--- thmlheadings.cpp	27 Jun 2003 01:41:07 -0000	1.9
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlheadings.h>
  #include <utilxml.h>
--- 7,10 ----

Index: thmlhtml.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlhtml.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** thmlhtml.cpp	6 Jun 2003 20:42:58 -0000	1.26
--- thmlhtml.cpp	27 Jun 2003 01:41:07 -0000	1.27
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlhtml.h>
  #include <swmodule.h>
--- 16,19 ----

Index: thmlhtmlhref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlhtmlhref.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** thmlhtmlhref.cpp	20 Jun 2003 17:47:53 -0000	1.33
--- thmlhtmlhref.cpp	27 Jun 2003 01:41:07 -0000	1.34
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlhtmlhref.h>
  #include <swmodule.h>
--- 16,19 ----

Index: thmllemma.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmllemma.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** thmllemma.cpp	7 Mar 2003 14:48:18 -0000	1.6
--- thmllemma.cpp	27 Jun 2003 01:41:07 -0000	1.7
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmllemma.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: thmlmorph.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlmorph.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** thmlmorph.cpp	20 Jun 2003 16:28:51 -0000	1.11
--- thmlmorph.cpp	27 Jun 2003 01:41:08 -0000	1.12
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlmorph.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: thmlolb.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlolb.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** thmlolb.cpp	22 Feb 2003 07:25:04 -0000	1.6
--- thmlolb.cpp	27 Jun 2003 01:41:08 -0000	1.7
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlolb.h>
  
--- 16,19 ----

Index: thmlosis.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlosis.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** thmlosis.cpp	27 Feb 2003 00:56:31 -0000	1.23
--- thmlosis.cpp	27 Jun 2003 01:41:08 -0000	1.24
***************
*** 8,12 ****
  #include <stdlib.h>
  #include <stdio.h>
- #include <string>
  #include <stdarg.h>
  #include <thmlosis.h>
--- 8,11 ----
***************
*** 49,57 ****
  	bool newText = false;
  	bool newWord = false;
! 	std::string tmp;
  	bool suspendTextPassThru = false;
  	bool keepToken = false;
  	bool handled = false;
! 	std::string divEnd = "";
  
  
--- 48,56 ----
  	bool newText = false;
  	bool newWord = false;
! 	SWBuf tmp;
  	bool suspendTextPassThru = false;
  	bool keepToken = false;
  	bool handled = false;
! 	SWBuf divEnd = "";
  
  
***************
*** 356,360 ****
  
  const char *ThMLOSIS::convertToOSIS(const char *inRef, const SWKey *key) {
! 	static std::string outRef;
  
  	outRef = "";
--- 355,359 ----
  
  const char *ThMLOSIS::convertToOSIS(const char *inRef, const SWKey *key) {
! 	static SWBuf outRef;
  
  	outRef = "";

Index: thmlplain.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlplain.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** thmlplain.cpp	20 Feb 2003 23:06:47 -0000	1.9
--- thmlplain.cpp	27 Jun 2003 01:41:08 -0000	1.10
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlplain.h>
  
--- 7,10 ----

Index: thmlrtf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlrtf.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** thmlrtf.cpp	26 Jun 2003 16:37:33 -0000	1.30
--- thmlrtf.cpp	27 Jun 2003 01:41:08 -0000	1.31
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlrtf.h>
  #include <swmodule.h>
--- 16,19 ----

Index: thmlscripref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlscripref.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** thmlscripref.cpp	12 Jun 2003 15:30:21 -0000	1.9
--- thmlscripref.cpp	27 Jun 2003 01:41:08 -0000	1.10
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlscripref.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: thmlstrongs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlstrongs.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** thmlstrongs.cpp	27 Feb 2003 08:26:32 -0000	1.14
--- thmlstrongs.cpp	27 Jun 2003 01:41:08 -0000	1.15
***************
*** 8,12 ****
  #include <stdlib.h>
  #include <stdio.h>
- #include <string.h>
  #include <thmlstrongs.h>
  #include <swmodule.h>
--- 8,11 ----
***************
*** 58,62 ****
  	char *ch;
  	unsigned int textStart = 0, textEnd = 0;
! 	std::string tmp;
  	bool newText = false;
  
--- 57,61 ----
  	char *ch;
  	unsigned int textStart = 0, textEnd = 0;
! 	SWBuf tmp;
  	bool newText = false;
  

Index: thmlvariants.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlvariants.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** thmlvariants.cpp	5 Apr 2003 08:51:08 -0000	1.7
--- thmlvariants.cpp	27 Jun 2003 01:41:08 -0000	1.8
***************
*** 7,11 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlvariants.h>
  #ifndef __GNUC__
--- 7,10 ----

Index: thmlwebif.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlwebif.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** thmlwebif.cpp	7 Jun 2003 02:09:17 -0000	1.4
--- thmlwebif.cpp	27 Jun 2003 01:41:08 -0000	1.5
***************
*** 16,20 ****
  
  #include <stdlib.h>
- #include <string.h>
  #include <thmlwebif.h>
  #include <swmodule.h>
--- 16,19 ----
***************
*** 33,37 ****
  	if (!substituteToken(buf, token)) { // manually process if it wasn't a simple substitution
  		XMLTag tag(token);
! 		std::string url;
  		if (!strcmp(tag.getName(), "sync")) {
  			const char* value = tag.getAttribute("value");
--- 32,36 ----
  	if (!substituteToken(buf, token)) { // manually process if it wasn't a simple substitution
  		XMLTag tag(token);
! 		SWBuf url;
  		if (!strcmp(tag.getName(), "sync")) {
  			const char* value = tag.getAttribute("value");

Index: utf8arshaping.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8arshaping.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** utf8arshaping.cpp	27 Feb 2003 07:39:37 -0000	1.6
--- utf8arshaping.cpp	27 Jun 2003 01:41:08 -0000	1.7
***************
*** 8,12 ****
  
  #include <stdlib.h>
- #include <string.h>
  
  #ifdef __GNUC__
--- 8,11 ----

Index: utf8bidireorder.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8bidireorder.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** utf8bidireorder.cpp	27 Feb 2003 07:39:37 -0000	1.6
--- utf8bidireorder.cpp	27 Jun 2003 01:41:08 -0000	1.7
***************
*** 8,12 ****
  
  #include <stdlib.h>
- #include <string.h>
  
  #ifdef __GNUC__
--- 8,11 ----

Index: utf8nfc.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8nfc.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** utf8nfc.cpp	27 Feb 2003 07:39:37 -0000	1.8
--- utf8nfc.cpp	27 Jun 2003 01:41:08 -0000	1.9
***************
*** 8,12 ****
  
  #include <stdlib.h>
- #include <string.h>
  
  #ifdef __GNUC__
--- 8,11 ----

Index: utf8nfkd.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8nfkd.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** utf8nfkd.cpp	27 Feb 2003 07:39:37 -0000	1.8
--- utf8nfkd.cpp	27 Jun 2003 01:41:08 -0000	1.9
***************
*** 8,12 ****
  
  #include <stdlib.h>
- #include <string.h>
  
  #ifdef __GNUC__
--- 8,11 ----

Index: utf8transliterator.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8transliterator.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** utf8transliterator.cpp	27 Feb 2003 07:39:37 -0000	1.27
--- utf8transliterator.cpp	27 Jun 2003 01:41:08 -0000	1.28
***************
*** 8,12 ****
  
  #include <stdlib.h>
- #include <string.h>
  
  #ifdef __GNUC__
--- 8,11 ----