[sword-cvs] sword/src/modules/filters swoptfilter.cpp,NONE,1.1 Makefile.am,1.21,1.22 gbffootnotes.cpp,1.18,1.19 gbfheadings.cpp,1.9,1.10 gbfmorph.cpp,1.10,1.11 gbfredletterwords.cpp,1.6,1.7 gbfstrongs.cpp,1.22,1.23 osisfootnotes.cpp,1.9,1.10 osisheadings.cpp,1.6,1.7 osislemma.cpp,1.2,1.3 osismorph.cpp,1.7,1.8 osisredletterwords.cpp,1.4,1.5 osisscripref.cpp,1.2,1.3 osisstrongs.cpp,1.7,1.8 plainfootnotes.cpp,1.11,1.12 thmlfootnotes.cpp,1.11,1.12 thmlheadings.cpp,1.10,1.11 thmllemma.cpp,1.8,1.9 thmlmorph.cpp,1.13,1.14 thmlscripref.cpp,1.11,1.12 thmlstrongs.cpp,1.16,1.17 utf8cantillation.cpp,1.7,1.8 utf8greekaccents.cpp,1.9,1.10 utf8hebrewpoints.cpp,1.9,1.10

sword@www.crosswire.org sword@www.crosswire.org
Fri, 4 Jul 2003 21:58:45 -0700


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

Modified Files:
	Makefile.am gbffootnotes.cpp gbfheadings.cpp gbfmorph.cpp 
	gbfredletterwords.cpp gbfstrongs.cpp osisfootnotes.cpp 
	osisheadings.cpp osislemma.cpp osismorph.cpp 
	osisredletterwords.cpp osisscripref.cpp osisstrongs.cpp 
	plainfootnotes.cpp thmlfootnotes.cpp thmlheadings.cpp 
	thmllemma.cpp thmlmorph.cpp thmlscripref.cpp thmlstrongs.cpp 
	utf8cantillation.cpp utf8greekaccents.cpp utf8hebrewpoints.cpp 
Added Files:
	swoptfilter.cpp 
Log Message:
Added SWOptionFilter


--- NEW FILE: swoptfilter.cpp ---
/******************************************************************************
 *
 * osisstrongs -	SWFilter descendant to hide or show strongs number
 *			in a OSIS module.
 */


#include <swoptfilter.h>

SWORD_NAMESPACE_START


SWOptionFilter::SWOptionFilter(const char *oName, const char *oTip, const StringList *oValues) {
	optName   = oName;
	optTip    = oTip;
	optValues = oValues;
}


SWOptionFilter::~SWOptionFilter() {
}


void SWOptionFilter::setOptionValue(const char *ival) {
	for (StringList::const_iterator loop = optValues->begin(); loop != optValues->end(); loop++) {
		if (!stricmp(loop->c_str(), ival)) {
			optionValue = *loop;
			option = (!stricmp(ival, "On"));	// convenience for boolean filters
			break;
		}
	}
}

const char *SWOptionFilter::getOptionValue() {
	return optionValue;
}


SWORD_NAMESPACE_END

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Makefile.am	27 Jun 2003 09:51:01 -0000	1.21
--- Makefile.am	5 Jul 2003 04:58:42 -0000	1.22
***************
*** 2,5 ****
--- 2,6 ----
  
  libsword_la_SOURCES += $(filtersdir)/swbasicfilter.cpp
+ libsword_la_SOURCES += $(filtersdir)/swoptfilter.cpp
  
  libsword_la_SOURCES += $(filtersdir)/gbfhtml.cpp

Index: gbffootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbffootnotes.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** gbffootnotes.cpp	27 Jun 2003 06:13:16 -0000	1.18
--- gbffootnotes.cpp	5 Jul 2003 04:58:42 -0000	1.19
***************
*** 15,28 ****
  SWORD_NAMESPACE_START
  
! const char GBFFootnotes::on[] = "On";
! const char GBFFootnotes::off[] = "Off";
! const char GBFFootnotes::optName[] = "Footnotes";
! const char GBFFootnotes::optTip[] = "Toggles Footnotes On and Off if they exist";
  
  
! GBFFootnotes::GBFFootnotes() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 15,27 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Footnotes";
! const char oTip[] = "Toggles Footnotes On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! 
! GBFFootnotes::GBFFootnotes() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 31,43 ****
  }
  
- void GBFFootnotes::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
- 
- const char *GBFFootnotes::getOptionValue()
- {
- 	return (option) ? on:off;
- }
  
  char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *module)
--- 30,33 ----

Index: gbfheadings.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfheadings.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** gbfheadings.cpp	27 Jun 2003 06:13:16 -0000	1.9
--- gbfheadings.cpp	5 Jul 2003 04:58:42 -0000	1.10
***************
*** 16,29 ****
  
  
! const char GBFHeadings::on[] = "On";
! const char GBFHeadings::off[] = "Off";
! const char GBFHeadings::optName[] = "Headings";
! const char GBFHeadings::optTip[] = "Toggles Headings On and Off if they exist";
  
  
! GBFHeadings::GBFHeadings() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 16,27 ----
  
  
! const char oName[] = "Headings";
! const char oTip[] = "Toggles Headings On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! GBFHeadings::GBFHeadings() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 32,47 ****
  }
  
- void GBFHeadings::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *GBFHeadings::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char GBFHeadings::processText (SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want headings
  		char token[2048]; // cheese.  Fix.
--- 30,35 ----
  }
  
  
! char GBFHeadings::processText (SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want headings
  		char token[2048]; // cheese.  Fix.

Index: gbfmorph.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfmorph.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** gbfmorph.cpp	27 Jun 2003 06:13:16 -0000	1.10
--- gbfmorph.cpp	5 Jul 2003 04:58:42 -0000	1.11
***************
*** 15,28 ****
  SWORD_NAMESPACE_START
  
! const char GBFMorph::on[] = "On";
! const char GBFMorph::off[] = "Off";
! const char GBFMorph::optName[] = "Morphological Tags";
! const char GBFMorph::optTip[] = "Toggles Morphological Tags On and Off if they exist";
  
  
! GBFMorph::GBFMorph() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 15,26 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Morphological Tags";
! const char oTip[] = "Toggles Morphological Tags On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! GBFMorph::GBFMorph() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 31,43 ****
  }
  
- void GBFMorph::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
- 
- const char *GBFMorph::getOptionValue()
- {
- 	return (option) ? on:off;
- }
  
  char GBFMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
--- 29,32 ----

Index: gbfredletterwords.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfredletterwords.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** gbfredletterwords.cpp	27 Jun 2003 06:13:16 -0000	1.6
--- gbfredletterwords.cpp	5 Jul 2003 04:58:42 -0000	1.7
***************
*** 17,30 ****
  SWORD_NAMESPACE_START
  
! const char GBFRedLetterWords::on[] = "On";
! const char GBFRedLetterWords::off[] = "Off";
! const char GBFRedLetterWords::optName[] = "Words of Christ in Red";
! const char GBFRedLetterWords::optTip[] = "Toggles Red Coloring for Words of Christ On and Off if they are marked";
  
  
! GBFRedLetterWords::GBFRedLetterWords() {
! 	option = true;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 17,28 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Words of Christ in Red";
! const char oTip[] = "Toggles Red Coloring for Words of Christ On and Off if they are marked";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! GBFRedLetterWords::GBFRedLetterWords() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 33,48 ****
  }
  
- void GBFRedLetterWords::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *GBFRedLetterWords::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char GBFRedLetterWords::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  /** This function removes the red letter words in Bible like the WEB
  * The words are marked by <FR> as start and <Fr> as end tag.
--- 31,36 ----
  }
  
  
! char GBFRedLetterWords::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  /** This function removes the red letter words in Bible like the WEB
  * The words are marked by <FR> as start and <Fr> as end tag.

Index: gbfstrongs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/gbfstrongs.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** gbfstrongs.cpp	27 Jun 2003 06:13:16 -0000	1.22
--- gbfstrongs.cpp	5 Jul 2003 04:58:42 -0000	1.23
***************
*** 17,30 ****
  SWORD_NAMESPACE_START
  
! const char GBFStrongs::on[] = "On";
! const char GBFStrongs::off[] = "Off";
! const char GBFStrongs::optName[] = "Strong's Numbers";
! const char GBFStrongs::optTip[] = "Toggles Strong's Numbers On and Off if they exist";
  
  
! GBFStrongs::GBFStrongs() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 17,28 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Strong's Numbers";
! const char oTip[] = "Toggles Strong's Numbers On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! GBFStrongs::GBFStrongs() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 33,48 ****
  }
  
- void GBFStrongs::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *GBFStrongs::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char GBFStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	char token[2048]; // cheese.  Fix.
  	int tokpos = 0;
--- 31,36 ----
  }
  
  
! char GBFStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	char token[2048]; // cheese.  Fix.
  	int tokpos = 0;

Index: osisfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisfootnotes.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** osisfootnotes.cpp	5 Jul 2003 01:16:46 -0000	1.9
--- osisfootnotes.cpp	5 Jul 2003 04:58:42 -0000	1.10
***************
*** 19,32 ****
  SWORD_NAMESPACE_START
  
! const char OSISFootnotes::on[] = "On";
! const char OSISFootnotes::off[] = "Off";
! const char OSISFootnotes::optName[] = "Footnotes";
! const char OSISFootnotes::optTip[] = "Toggles Footnotes On and Off if they exist";
  
  
! OSISFootnotes::OSISFootnotes() {
! 	option = true;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 19,30 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Footnotes";
! const char oTip[] = "Toggles Footnotes On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! OSISFootnotes::OSISFootnotes() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 35,47 ****
  }
  
- void OSISFootnotes::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
- 
- const char *OSISFootnotes::getOptionValue()
- {
- 	return (option) ? on:off;
- }
  
  char OSISFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
--- 33,36 ----
***************
*** 89,94 ****
  					if (module->isProcessEntryAttributes()) {
  						sprintf(buf, "%i", footnoteNum++);
! 						ListString attributes = startTag.getAttributeNames();
! 						for (ListString::iterator it = attributes.begin(); it != attributes.end(); it++) {
  							module->getEntryAttributes()["Footnote"][buf][it->c_str()] = startTag.getAttribute(it->c_str());
  						}
--- 78,83 ----
  					if (module->isProcessEntryAttributes()) {
  						sprintf(buf, "%i", footnoteNum++);
! 						StringList attributes = startTag.getAttributeNames();
! 						for (StringList::iterator it = attributes.begin(); it != attributes.end(); it++) {
  							module->getEntryAttributes()["Footnote"][buf][it->c_str()] = startTag.getAttribute(it->c_str());
  						}

Index: osisheadings.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisheadings.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** osisheadings.cpp	27 Jun 2003 06:13:16 -0000	1.6
--- osisheadings.cpp	5 Jul 2003 04:58:42 -0000	1.7
***************
*** 17,30 ****
  SWORD_NAMESPACE_START
  
! const char OSISHeadings::on[] = "On";
! const char OSISHeadings::off[] = "Off";
! const char OSISHeadings::optName[] = "Headings";
! const char OSISHeadings::optTip[] = "Toggles Headings On and Off if they exist";
  
  
! OSISHeadings::OSISHeadings() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 17,28 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Headings";
! const char oTip[] = "Toggles Headings On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! OSISHeadings::OSISHeadings() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 33,48 ****
  }
  
- void OSISHeadings::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *OSISHeadings::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char OSISHeadings::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	SWBuf token;
  	bool intoken    = false;
--- 31,36 ----
  }
  
  
! char OSISHeadings::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	SWBuf token;
  	bool intoken    = false;

Index: osislemma.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osislemma.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** osislemma.cpp	27 Jun 2003 21:51:50 -0000	1.2
--- osislemma.cpp	5 Jul 2003 04:58:42 -0000	1.3
***************
*** 16,29 ****
  SWORD_NAMESPACE_START
  
! const char OSISLemma::on[] = "On";
! const char OSISLemma::off[] = "Off";
! const char OSISLemma::optName[] = "Lemmas";
! const char OSISLemma::optTip[] = "Toggles Lemmas On and Off if they exist";
  
  
! OSISLemma::OSISLemma() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 16,27 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Lemmas";
! const char oTip[] = "Toggles Lemmas On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! OSISLemma::OSISLemma() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 32,47 ****
  }
  
- void OSISLemma::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *OSISLemma::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want lemmas
  		const char *from;
--- 30,35 ----
  }
  
  
! char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want lemmas
  		const char *from;

Index: osismorph.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osismorph.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** osismorph.cpp	27 Jun 2003 06:13:16 -0000	1.7
--- osismorph.cpp	5 Jul 2003 04:58:42 -0000	1.8
***************
*** 16,29 ****
  SWORD_NAMESPACE_START
  
! const char OSISMorph::on[] = "On";
! const char OSISMorph::off[] = "Off";
! const char OSISMorph::optName[] = "Morphological Tags";
! const char OSISMorph::optTip[] = "Toggles Morphological Tags On and Off if they exist";
  
  
! OSISMorph::OSISMorph() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 16,27 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Morphological Tags";
! const char oTip[] = "Toggles Morphological Tags On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! OSISMorph::OSISMorph() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 32,47 ****
  }
  
- void OSISMorph::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *OSISMorph::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char OSISMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want morph tags
  		const char *from;
--- 30,35 ----
  }
  
  
! char OSISMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want morph tags
  		const char *from;

Index: osisredletterwords.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisredletterwords.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** osisredletterwords.cpp	28 Jun 2003 19:20:53 -0000	1.4
--- osisredletterwords.cpp	5 Jul 2003 04:58:42 -0000	1.5
***************
*** 17,30 ****
  SWORD_NAMESPACE_START
  
! const char OSISRedLetterWords::on[] = "On";
! const char OSISRedLetterWords::off[] = "Off";
! const char OSISRedLetterWords::optName[] = "Words of Christ in Red";
! const char OSISRedLetterWords::optTip[] = "Toggles Red Coloring for Words of Christ On and Off if they are marked";
  
  
! OSISRedLetterWords::OSISRedLetterWords() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 17,28 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Words of Christ in Red";
! const char oTip[] = "Toggles Red Coloring for Words of Christ On and Off if they are marked";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! OSISRedLetterWords::OSISRedLetterWords() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("On");
  }
  
***************
*** 33,48 ****
  }
  
- void OSISRedLetterWords::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *OSISRedLetterWords::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char OSISRedLetterWords::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	SWBuf token;
  	bool intoken    = false;
--- 31,36 ----
  }
  
  
! char OSISRedLetterWords::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	SWBuf token;
  	bool intoken    = false;

Index: osisscripref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisscripref.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** osisscripref.cpp	5 Jul 2003 01:16:46 -0000	1.2
--- osisscripref.cpp	5 Jul 2003 04:58:42 -0000	1.3
***************
*** 17,29 ****
  SWORD_NAMESPACE_START
  
! const char OSISScripref::on[] = "On";
! const char OSISScripref::off[] = "Off";
! const char OSISScripref::optName[] = "Scripture Cross-references";
! const char OSISScripref::optTip[] = "Toggles Scripture Cross-references On and Off if they exist";
  
! OSISScripref::OSISScripref() {
! 	option = true;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 17,28 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Scripture Cross-references";
! const char oTip[] = "Toggles Scripture Cross-references On and Off if they exist";
  
! const SWBuf choices[2] = {"On", "Off"};
! const StringList oValues(&choices[0], &choices[1]);
! 
! OSISScripref::OSISScripref() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("On");
  }
  
***************
*** 32,44 ****
  }
  
- void OSISScripref::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
- 
- const char *OSISScripref::getOptionValue()
- {
- 	return (option) ? on:off;
- }
  
  char OSISScripref::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
--- 31,34 ----

Index: osisstrongs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisstrongs.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** osisstrongs.cpp	27 Jun 2003 21:51:50 -0000	1.7
--- osisstrongs.cpp	5 Jul 2003 04:58:42 -0000	1.8
***************
*** 17,30 ****
  SWORD_NAMESPACE_START
  
! const char OSISStrongs::on[] = "On";
! const char OSISStrongs::off[] = "Off";
! const char OSISStrongs::optName[] = "Strong's Numbers";
! const char OSISStrongs::optTip[] = "Toggles Strong's Numbers On and Off if they exist";
  
  
! OSISStrongs::OSISStrongs() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 17,29 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Strong's Numbers";
! const char oTip[] = "Toggles Strong's Numbers On and Off if they exist";
! 
! const SWBuf choices[2] = {"On", "Off"};
! const StringList oValues(&choices[0], &choices[1]);
  
  
! OSISStrongs::OSISStrongs() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 33,48 ****
  }
  
- void OSISStrongs::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *OSISStrongs::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	const char *from;
  	char token[2048]; // cheese.  Fix.
--- 32,37 ----
  }
  
  
! char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	const char *from;
  	char token[2048]; // cheese.  Fix.

Index: plainfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/plainfootnotes.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** plainfootnotes.cpp	27 Jun 2003 01:41:07 -0000	1.11
--- plainfootnotes.cpp	5 Jul 2003 04:58:42 -0000	1.12
***************
*** 27,58 ****
  SWORD_NAMESPACE_START
  
! const char PLAINFootnotes::on[] = "On";
! const char PLAINFootnotes::off[] = "Off";
! const char PLAINFootnotes::optName[] = "Footnotes";
! const char PLAINFootnotes::optTip[] = "Toggles Footnotes On and Off In Bible Texts If They Exist";
! 
! PLAINFootnotes::PLAINFootnotes(){
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
! }
! 
! PLAINFootnotes::~PLAINFootnotes(){
! }
  
  
! void PLAINFootnotes::setOptionValue(const char *ival)
! {
! 	option = (!stricmp(ival, on));
  }
  
! const char *PLAINFootnotes::getOptionValue()
! {
! 	return (option) ? on:off;
  }
  
  
! char PLAINFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want footnotes
  		//char token[2048];
--- 27,45 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Footnotes";
! const char oTip[] = "Toggles Footnotes On and Off In Bible Texts If They Exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! PLAINFootnotes::PLAINFootnotes() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
! PLAINFootnotes::~PLAINFootnotes(){
  }
  
  
! char PLAINFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want footnotes
  		//char token[2048];

Index: thmlfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlfootnotes.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** thmlfootnotes.cpp	27 Jun 2003 06:13:16 -0000	1.11
--- thmlfootnotes.cpp	5 Jul 2003 04:58:42 -0000	1.12
***************
*** 15,28 ****
  SWORD_NAMESPACE_START
  
! const char ThMLFootnotes::on[] = "On";
! const char ThMLFootnotes::off[] = "Off";
! const char ThMLFootnotes::optName[] = "Footnotes";
! const char ThMLFootnotes::optTip[] = "Toggles Footnotes On and Off if they exist";
  
  
! ThMLFootnotes::ThMLFootnotes() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 15,26 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Footnotes";
! const char oTip[] = "Toggles Footnotes On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! ThMLFootnotes::ThMLFootnotes() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 31,46 ****
  }
  
- void ThMLFootnotes::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *ThMLFootnotes::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char ThMLFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want footnotes
  		bool intoken = false;
--- 29,34 ----
  }
  
  
! char ThMLFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want footnotes
  		bool intoken = false;

Index: thmlheadings.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlheadings.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** thmlheadings.cpp	27 Jun 2003 06:13:16 -0000	1.10
--- thmlheadings.cpp	5 Jul 2003 04:58:42 -0000	1.11
***************
*** 19,32 ****
  SWORD_NAMESPACE_START
  
! const char ThMLHeadings::on[] = "On";
! const char ThMLHeadings::off[] = "Off";
! const char ThMLHeadings::optName[] = "Headings";
! const char ThMLHeadings::optTip[] = "Toggles Headings On and Off if they exist";
  
  
! ThMLHeadings::ThMLHeadings() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 19,30 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Headings";
! const char oTip[] = "Toggles Headings On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! ThMLHeadings::ThMLHeadings() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 35,50 ****
  }
  
- void ThMLHeadings::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *ThMLHeadings::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char ThMLHeadings::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want headings
  		SWBuf token;
--- 33,38 ----
  }
  
  
! char ThMLHeadings::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want headings
  		SWBuf token;

Index: thmllemma.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmllemma.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** thmllemma.cpp	27 Jun 2003 06:13:16 -0000	1.8
--- thmllemma.cpp	5 Jul 2003 04:58:42 -0000	1.9
***************
*** 15,27 ****
  SWORD_NAMESPACE_START
  
! const char ThMLLemma::on[] = "On";
! const char ThMLLemma::off[] = "Off";
! const char ThMLLemma::optName[] = "Lemmas";
! const char ThMLLemma::optTip[] = "Toggles Lemmas On and Off if they exist";
  
! ThMLLemma::ThMLLemma() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 15,26 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Lemmas";
! const char oTip[] = "Toggles Lemmas On and Off if they exist";
  
! const SWBuf choices[2] = {"On", "Off"};
! const StringList oValues(&choices[0], &choices[1]);
! 
! ThMLLemma::ThMLLemma() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 30,45 ****
  }
  
- void ThMLLemma::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *ThMLLemma::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char ThMLLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want lemmas
  		bool intoken = false;
--- 29,34 ----
  }
  
  
! char ThMLLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want lemmas
  		bool intoken = false;

Index: thmlmorph.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlmorph.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** thmlmorph.cpp	27 Jun 2003 06:13:16 -0000	1.13
--- thmlmorph.cpp	5 Jul 2003 04:58:42 -0000	1.14
***************
*** 15,28 ****
  SWORD_NAMESPACE_START
  
! const char ThMLMorph::on[] = "On";
! const char ThMLMorph::off[] = "Off";
! const char ThMLMorph::optName[] = "Morphological Tags";
! const char ThMLMorph::optTip[] = "Toggles Morphological Tags On and Off if they exist";
  
  
! ThMLMorph::ThMLMorph() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 15,26 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Morphological Tags";
! const char oTip[] = "Toggles Morphological Tags On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! ThMLMorph::ThMLMorph() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 31,46 ****
  }
  
- void ThMLMorph::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *ThMLMorph::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char ThMLMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want morph tags
  		bool intoken = false;
--- 29,34 ----
  }
  
  
! char ThMLMorph::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want morph tags
  		bool intoken = false;

Index: thmlscripref.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlscripref.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** thmlscripref.cpp	27 Jun 2003 06:13:16 -0000	1.11
--- thmlscripref.cpp	5 Jul 2003 04:58:42 -0000	1.12
***************
*** 15,28 ****
  SWORD_NAMESPACE_START
  
! const char ThMLScripref::on[] = "On";
! const char ThMLScripref::off[] = "Off";
! const char ThMLScripref::optName[] = "Scripture Cross-references";
! const char ThMLScripref::optTip[] = "Toggles Scripture Cross-references On and Off if they exist";
  
  
! ThMLScripref::ThMLScripref() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 15,26 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Scripture Cross-references";
! const char oTip[] = "Toggles Scripture Cross-references On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! ThMLScripref::ThMLScripref() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 31,46 ****
  }
  
- void ThMLScripref::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *ThMLScripref::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char ThMLScripref::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {	// if we don't want scriprefs
  		bool intoken = false;
--- 29,34 ----
  }
  
  
! char ThMLScripref::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {	// if we don't want scriprefs
  		bool intoken = false;

Index: thmlstrongs.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlstrongs.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** thmlstrongs.cpp	27 Jun 2003 06:13:16 -0000	1.16
--- thmlstrongs.cpp	5 Jul 2003 04:58:42 -0000	1.17
***************
*** 18,31 ****
  SWORD_NAMESPACE_START
  
! const char ThMLStrongs::on[] = "On";
! const char ThMLStrongs::off[] = "Off";
! const char ThMLStrongs::optName[] = "Strong's Numbers";
! const char ThMLStrongs::optTip[] = "Toggles Strong's Numbers On and Off if they exist";
  
  
! ThMLStrongs::ThMLStrongs() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
--- 18,29 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Strong's Numbers";
! const char oTip[] = "Toggles Strong's Numbers On and Off if they exist";
  
+ const SWBuf choices[2] = {"On", "Off"};
+ const StringList oValues(&choices[0], &choices[1]);
  
! ThMLStrongs::ThMLStrongs() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
***************
*** 34,46 ****
  }
  
- void ThMLStrongs::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
- 
- const char *ThMLStrongs::getOptionValue()
- {
- 	return (option) ? on:off;
- }
  
  char ThMLStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
--- 32,35 ----

Index: utf8cantillation.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8cantillation.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** utf8cantillation.cpp	27 Jun 2003 06:13:16 -0000	1.7
--- utf8cantillation.cpp	5 Jul 2003 04:58:42 -0000	1.8
***************
*** 12,40 ****
  SWORD_NAMESPACE_START
  
! const char UTF8Cantillation::on[] = "On";
! const char UTF8Cantillation::off[] = "Off";
! const char UTF8Cantillation::optName[] = "Hebrew Cantillation";
! const char UTF8Cantillation::optTip[] = "Toggles Hebrew Cantillation Marks";
  
! UTF8Cantillation::UTF8Cantillation() {
! 	option = false;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
- UTF8Cantillation::~UTF8Cantillation(){};
  
! void UTF8Cantillation::setOptionValue(const char *ival)
! {
! 	option = (!stricmp(ival, on));
! }
  
- const char *UTF8Cantillation::getOptionValue()
- {
- 	return (option) ? on:off;
- }
  
! char UTF8Cantillation::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {
  		//The UTF-8 range 0xD6 0x90 to 0xD6 0xAF and 0xD7 0x84 consist of Hebrew cantillation marks so block those out.
--- 12,30 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Hebrew Cantillation";
! const char oTip[] = "Toggles Hebrew Cantillation Marks";
  
! const SWBuf choices[2] = {"On", "Off"};
! const StringList oValues(&choices[0], &choices[1]);
! 
! UTF8Cantillation::UTF8Cantillation() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("Off");
  }
  
  
! UTF8Cantillation::~UTF8Cantillation(){};
  
  
! char UTF8Cantillation::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {
  		//The UTF-8 range 0xD6 0x90 to 0xD6 0xAF and 0xD7 0x84 consist of Hebrew cantillation marks so block those out.

Index: utf8greekaccents.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8greekaccents.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** utf8greekaccents.cpp	27 Jun 2003 06:13:16 -0000	1.9
--- utf8greekaccents.cpp	5 Jul 2003 04:58:42 -0000	1.10
***************
*** 12,37 ****
  SWORD_NAMESPACE_START
  
! const char UTF8GreekAccents::on[] = "On";
! const char UTF8GreekAccents::off[] = "Off";
! const char UTF8GreekAccents::optName[] = "Greek Accents";
! const char UTF8GreekAccents::optTip[] = "Toggles Greek Accents";
  
! UTF8GreekAccents::UTF8GreekAccents() {
! 	option = true;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
  UTF8GreekAccents::~UTF8GreekAccents(){};
  
- void UTF8GreekAccents::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
- 
- const char *UTF8GreekAccents::getOptionValue()
- {
- 	return (option) ? on:off;
- }
  
  char UTF8GreekAccents::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
--- 12,27 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Greek Accents";
! const char oTip[] = "Toggles Greek Accents";
  
! const SWBuf choices[2] = {"On", "Off"};
! const StringList oValues(&choices[0], &choices[1]);
! 
! UTF8GreekAccents::UTF8GreekAccents() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("On");
  }
  
  UTF8GreekAccents::~UTF8GreekAccents(){};
  
  
  char UTF8GreekAccents::processText(SWBuf &text, const SWKey *key, const SWModule *module) {

Index: utf8hebrewpoints.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8hebrewpoints.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** utf8hebrewpoints.cpp	27 Jun 2003 06:13:16 -0000	1.9
--- utf8hebrewpoints.cpp	5 Jul 2003 04:58:42 -0000	1.10
***************
*** 12,40 ****
  SWORD_NAMESPACE_START
  
! const char UTF8HebrewPoints::on[] = "On";
! const char UTF8HebrewPoints::off[] = "Off";
! const char UTF8HebrewPoints::optName[] = "Hebrew Vowel Points";
! const char UTF8HebrewPoints::optTip[] = "Toggles Hebrew Vowel Points";
  
! UTF8HebrewPoints::UTF8HebrewPoints() {
! 	option = true;
! 	options.push_back(on);
! 	options.push_back(off);
  }
  
  UTF8HebrewPoints::~UTF8HebrewPoints(){};
  
- void UTF8HebrewPoints::setOptionValue(const char *ival)
- {
- 	option = (!stricmp(ival, on));
- }
  
! const char *UTF8HebrewPoints::getOptionValue()
! {
! 	return (option) ? on:off;
! }
! 
! char UTF8HebrewPoints::processText(SWBuf &text, const SWKey *key, const SWModule *module)
! {
  	if (!option) {
  		//The UTF-8 range 0xD6 0xB0 to 0xD6 0xBF excluding 0xD6 0x consist of Hebrew cantillation marks so block those out.
--- 12,29 ----
  SWORD_NAMESPACE_START
  
! const char oName[] = "Hebrew Vowel Points";
! const char oTip[] = "Toggles Hebrew Vowel Points";
  
! const SWBuf choices[2] = {"On", "Off"};
! const StringList oValues(&choices[0], &choices[1]);
! 
! UTF8HebrewPoints::UTF8HebrewPoints() : SWOptionFilter(oName, oTip, &oValues) {
! 	setOptionValue("On");
  }
  
  UTF8HebrewPoints::~UTF8HebrewPoints(){};
  
  
! char UTF8HebrewPoints::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
  	if (!option) {
  		//The UTF-8 range 0xD6 0xB0 to 0xD6 0xBF excluding 0xD6 0x consist of Hebrew cantillation marks so block those out.