[sword-cvs] sword/src/modules/filters gbffootnotes.cpp,1.23,1.24 gbfhtmlhref.cpp,1.24,1.25 osisfootnotes.cpp,1.13,1.14 osisheadings.cpp,1.10,1.11 osishtmlhref.cpp,1.19,1.20 osislemma.cpp,1.4,1.5 osismorph.cpp,1.9,1.10 osisplain.cpp,1.13,1.14 osisredletterwords.cpp,1.6,1.7 osisrtf.cpp,1.27,1.28 osisscripref.cpp,1.5,1.6 osiswebif.cpp,1.7,1.8 thmlfootnotes.cpp,1.15,1.16 thmlheadings.cpp,1.13,1.14 thmlhtml.cpp,1.30,1.31 thmlhtmlhref.cpp,1.46,1.47 thmlrtf.cpp,1.42,1.43 thmlscripref.cpp,1.17,1.18 thmlwebif.cpp,1.10,1.11
sword@www.crosswire.org
sword@www.crosswire.org
Fri, 23 Jan 2004 20:11:53 -0700
Update of /cvs/core/sword/src/modules/filters
In directory www:/tmp/cvs-serv21720/src/modules/filters
Modified Files:
gbffootnotes.cpp gbfhtmlhref.cpp osisfootnotes.cpp
osisheadings.cpp osishtmlhref.cpp osislemma.cpp osismorph.cpp
osisplain.cpp osisredletterwords.cpp osisrtf.cpp
osisscripref.cpp osiswebif.cpp thmlfootnotes.cpp
thmlheadings.cpp thmlhtml.cpp thmlhtmlhref.cpp thmlrtf.cpp
thmlscripref.cpp thmlwebif.cpp
Log Message:
no message
Index: gbffootnotes.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/gbffootnotes.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- gbffootnotes.cpp 24 Dec 2003 02:31:22 -0000 1.23
+++ gbffootnotes.cpp 24 Jan 2004 03:11:50 -0000 1.24
@@ -60,14 +60,14 @@
intoken = false;
XMLTag tag(token);
- if (!strcmp(tag.getName(), "RF")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "RF")) {
refs = "";
startTag = tag;
hide = true;
tagText = "";
continue;
}
- else if (!strcmp(tag.getName(), "Rf")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "Rf")) {
if (module->isProcessEntryAttributes()) {
if(tagText.length() == 1 || !strcmp(module->Name(), "IGNT")) {
if (option) { // for ASV marks text in verse then put explanation at end of verse
Index: gbfhtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/gbfhtmlhref.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- gbfhtmlhref.cpp 16 Jan 2004 03:42:42 -0000 1.24
+++ gbfhtmlhref.cpp 24 Jan 2004 03:11:50 -0000 1.25
@@ -153,7 +153,7 @@
buf += "</a>)</em></small>";
}
- else if (!strcmp(tag.getName(), "RX")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "RX")) {
buf += "<a href=\"";
for (tok = token + 3; *tok; tok++) {
if(*tok != '<' && *tok+1 != 'R' && *tok+2 != 'x') {
@@ -165,7 +165,7 @@
}
buf += "\">";
}
- else if (!strcmp(tag.getName(), "RF")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "RF")) {
SWBuf type = tag.getAttribute("type");
SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
VerseKey *vkey;
@@ -181,7 +181,7 @@
}
u->suspendTextPassThru = true;
}
- else if (!strcmp(tag.getName(), "Rf")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "Rf")) {
u->suspendTextPassThru = false;
}
/*
Index: osisfootnotes.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisfootnotes.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- osisfootnotes.cpp 16 Jul 2003 04:55:43 -0000 1.13
+++ osisfootnotes.cpp 24 Jan 2004 03:11:50 -0000 1.14
@@ -66,7 +66,7 @@
intoken = false;
XMLTag tag(token);
- if (!strcmp(tag.getName(), "note")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
if (SWBuf("strongsMarkup") == tag.getAttribute("type")) { // handle bug in KJV2003 module where some note open tags were <note ... />
tag.setEmpty(false);
@@ -105,7 +105,7 @@
}
// if not a heading token, keep token in text
- if ((!strcmp(tag.getName(), "reference")) && (!tag.isEndTag())) {
+ if ((tag.getName()) && (!strcmp(tag.getName(), "reference")) && (!tag.isEndTag())) {
SWBuf osisRef = tag.getAttribute("osisRef");
if (refs.length())
refs += "; ";
Index: osisheadings.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisheadings.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- osisheadings.cpp 24 Nov 2003 09:16:40 -0000 1.10
+++ osisheadings.cpp 24 Jan 2004 03:11:50 -0000 1.11
@@ -54,7 +54,8 @@
intoken = false;
XMLTag tag(token);
- if (!stricmp(tag.getName(), "title")) {
+ SWBuf name = tag.getName();
+ if (name == "title") {
if ((tag.getAttribute("subtype")) && (!stricmp(tag.getAttribute("subtype"), "x-preverse"))) {
hide = true;
preverse = true;
@@ -94,7 +95,6 @@
preverse = false;
}
}
-
// if not a heading token, keep token in text
if (!hide) {
text += '<';
Index: osishtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osishtmlhref.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- osishtmlhref.cpp 16 Jan 2004 03:42:42 -0000 1.19
+++ osishtmlhref.cpp 24 Jan 2004 03:11:50 -0000 1.20
@@ -56,7 +56,7 @@
XMLTag tag(token);
// <w> tag
- if (!strcmp(tag.getName(), "w")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "w")) {
// start <w> tag
if ((!tag.isEmpty()) && (!tag.isEndTag())) {
@@ -134,7 +134,7 @@
}
// <note> tag
- else if (!strcmp(tag.getName(), "note")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
@@ -161,7 +161,7 @@
}
// <p> paragraph tag
- else if (!strcmp(tag.getName(), "p")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "p")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) { // non-empty start tag
buf += "<!P><br />";
}
@@ -176,7 +176,7 @@
}
// <reference> tag
- else if (!strcmp(tag.getName(), "reference")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "reference")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
buf += "<a href=\"\">";
}
@@ -186,7 +186,7 @@
}
// <l> poetry, etc
- else if (!strcmp(tag.getName(), "l")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "l")) {
if (tag.isEmpty()) {
buf += "<br />";
}
@@ -199,13 +199,13 @@
}
// <milestone type="line"/>
- else if ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line"))) {
+ else if ((tag.getName()) && (!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line"))) {
buf += "<br />";
userData->supressAdjacentWhitespace = true;
}
// <title>
- else if (!strcmp(tag.getName(), "title")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "title")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
buf += "<b>";
}
@@ -215,7 +215,7 @@
}
// <hi> hi? hi contrast?
- else if (!strcmp(tag.getName(), "hi")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "hi")) {
SWBuf type = tag.getAttribute("type");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
if (type == "b" || type == "x-b") {
@@ -241,7 +241,7 @@
}
// <q> quote
- else if (!strcmp(tag.getName(), "q")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "q")) {
SWBuf type = tag.getAttribute("type");
SWBuf who = tag.getAttribute("who");
const char *lev = tag.getAttribute("level");
@@ -272,7 +272,7 @@
}
// <transChange>
- else if (!strcmp(tag.getName(), "transChange")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "transChange")) {
SWBuf type = tag.getAttribute("type");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
@@ -289,7 +289,7 @@
}
// image
- else if (!strcmp(tag.getName(), "figure")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "figure")) {
const char *src = tag.getAttribute("src");
if (!src) // assert we have a src attribute
return false;
Index: osislemma.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osislemma.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- osislemma.cpp 7 Jul 2003 01:16:15 -0000 1.4
+++ osislemma.cpp 24 Jan 2004 03:11:50 -0000 1.5
@@ -50,7 +50,7 @@
if (*from == '>') { // process tokens
intoken = false;
XMLTag tag(token);
- if ((!strcmp(tag.getName(), "w")) && (!tag.isEndTag())) { // Lemma
+ if ((tag.getName()) && (!strcmp(tag.getName(), "w")) && (!tag.isEndTag())) { // Lemma
SWBuf lemma = tag.getAttribute("lemma");
if (lemma.length()) {
tag.setAttribute("lemma", 0);
Index: osismorph.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osismorph.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- osismorph.cpp 7 Jul 2003 01:16:15 -0000 1.9
+++ osismorph.cpp 24 Jan 2004 03:11:50 -0000 1.10
@@ -50,7 +50,7 @@
if (*from == '>') { // process tokens
intoken = false;
XMLTag tag(token);
- if ((!strcmp(tag.getName(), "w")) && (!tag.isEndTag())) { // Morph
+ if ((tag.getName()) && (!strcmp(tag.getName(), "w")) && (!tag.isEndTag())) { // Morph
if (tag.getAttribute("morph"))
tag.setAttribute("morph", 0);
}
Index: osisplain.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisplain.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- osisplain.cpp 12 Aug 2003 05:36:30 -0000 1.13
+++ osisplain.cpp 24 Jan 2004 03:11:50 -0000 1.14
@@ -135,7 +135,7 @@
}
// <milestone type="line"/>
- else if ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line"))) {
+ else if ((tag.getName()) && (!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line"))) {
userData->supressAdjacentWhitespace = true;
buf += "\n";
}
Index: osisredletterwords.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisredletterwords.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- osisredletterwords.cpp 7 Jul 2003 01:16:15 -0000 1.6
+++ osisredletterwords.cpp 24 Jan 2004 03:11:50 -0000 1.7
@@ -50,7 +50,8 @@
intoken = false;
XMLTag tag(token);
- if (!stricmp(tag.getName(), "q")) {
+ SWBuf name = tag.getName();
+ if (name == "q") {
if ((tag.getAttribute("who")) && (!stricmp(tag.getAttribute("who"), "Jesus"))) {
tag.setAttribute("who", 0);
text += tag; // tag toString already has < and >
Index: osisrtf.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisrtf.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- osisrtf.cpp 16 Jan 2004 03:42:42 -0000 1.27
+++ osisrtf.cpp 24 Jan 2004 03:11:50 -0000 1.28
@@ -62,7 +62,7 @@
XMLTag tag(token);
// <w> tag
- if (!strcmp(tag.getName(), "w")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "w")) {
// start <w> tag
if ((!tag.isEmpty()) && (!tag.isEndTag())) {
@@ -139,7 +139,7 @@
}
// <note> tag
- else if (!strcmp(tag.getName(), "note")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
@@ -168,7 +168,7 @@
}
// <p> paragraph tag
- else if (!strcmp(tag.getName(), "p")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "p")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) { // non-empty start tag
buf += "{\\par ";
}
@@ -183,7 +183,7 @@
}
// <reference> tag
- else if (!strcmp(tag.getName(), "reference")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "reference")) {
if (!u->inXRefNote) { // only show these if we're not in an xref note
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
buf += "{<a href=\"\">";
@@ -195,7 +195,7 @@
}
// <l> poetry
- else if (!strcmp(tag.getName(), "l")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "l")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
buf += "{";
}
@@ -208,13 +208,13 @@
}
// <milestone type="line"/>
- else if ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line"))) {
+ else if ((tag.getName()) && (!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line"))) {
buf += "{\\par}";
userData->supressAdjacentWhitespace = true;
}
// <title>
- else if (!strcmp(tag.getName(), "title")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "title")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
buf += "{\\par\\i1\\b1 ";
}
@@ -224,7 +224,7 @@
}
// <hi>
- else if (!strcmp(tag.getName(), "hi")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "hi")) {
SWBuf type = tag.getAttribute("type");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
if (type == "b" || type == "x-b")
@@ -238,7 +238,7 @@
}
// <q> quote
- else if (!strcmp(tag.getName(), "q")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "q")) {
SWBuf type = tag.getAttribute("type");
SWBuf who = tag.getAttribute("who");
const char *lev = tag.getAttribute("level");
@@ -268,7 +268,7 @@
}
// <transChange>
- else if (!strcmp(tag.getName(), "transChange")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "transChange")) {
SWBuf type = tag.getAttribute("type");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
@@ -283,7 +283,7 @@
}
// image
- else if (!strcmp(tag.getName(), "figure")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "figure")) {
const char *src = tag.getAttribute("src");
if (!src) // assert we have a src attribute
return false;
Index: osisscripref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisscripref.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- osisscripref.cpp 7 Jul 2003 01:24:16 -0000 1.5
+++ osisscripref.cpp 24 Jan 2004 03:11:50 -0000 1.6
@@ -54,7 +54,7 @@
intoken = false;
XMLTag tag(token);
- if (!strcmp(tag.getName(), "note")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag() && (!tag.isEmpty())) {
startTag = tag;
if ((tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "crossReference"))) {
Index: osiswebif.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osiswebif.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- osiswebif.cpp 16 Jan 2004 03:42:42 -0000 1.7
+++ osiswebif.cpp 24 Jan 2004 03:11:50 -0000 1.8
@@ -36,7 +36,7 @@
XMLTag tag(token);
// <w> tag
- if (!strcmp(tag.getName(), "w")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "w")) {
// start <w> tag
if ((!tag.isEmpty()) && (!tag.isEndTag())) {
@@ -114,7 +114,7 @@
}
// <note> tag
- else if (!strcmp(tag.getName(), "note")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
@@ -140,7 +140,7 @@
}
}
// <title>
- else if (!strcmp(tag.getName(), "title")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "title")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
buf += "<h3>";
}
@@ -150,7 +150,7 @@
}
// <q> quote
- else if (!strcmp(tag.getName(), "q")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "q")) {
SWBuf type = tag.getAttribute("type");
SWBuf who = tag.getAttribute("who");
const char *lev = tag.getAttribute("level");
@@ -181,7 +181,7 @@
}
// <transChange>
- else if (!strcmp(tag.getName(), "transChange")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "transChange")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
SWBuf type = tag.getAttribute("type");
u->lastTransChange = type;
Index: thmlfootnotes.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlfootnotes.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- thmlfootnotes.cpp 21 Dec 2003 23:33:10 -0000 1.15
+++ thmlfootnotes.cpp 24 Jan 2004 03:11:50 -0000 1.16
@@ -57,7 +57,7 @@
intoken = false;
XMLTag tag(token);
- if (!strcmp(tag.getName(), "note")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
refs = "";
@@ -95,7 +95,7 @@
}
// if not a note token, keep token in text
- if ((!strcmp(tag.getName(), "scripRef")) && (!tag.isEndTag())) {
+ if ((tag.getName()) && (!strcmp(tag.getName(), "scripRef")) && (!tag.isEndTag())) {
SWBuf osisRef = tag.getAttribute("passage");
if (refs.length())
refs += "; ";
Index: thmlheadings.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlheadings.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- thmlheadings.cpp 16 Jan 2004 03:42:42 -0000 1.13
+++ thmlheadings.cpp 24 Jan 2004 03:11:50 -0000 1.14
@@ -54,7 +54,7 @@
XMLTag tag(token);
- if (!stricmp(tag.getName(), "div")) { //we only want a div tag
+ if ((tag.getName()) && !stricmp(tag.getName(), "div")) { //we only want a div tag
//std::cout << tag.toString() << " " << tag.isEndTag() << std::endl;
if (tag.getAttribute("class") && !stricmp(tag.getAttribute("class"), "sechead")) {
Index: thmlhtml.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlhtml.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- thmlhtml.cpp 12 Aug 2003 05:36:30 -0000 1.30
+++ thmlhtml.cpp 24 Jan 2004 03:11:50 -0000 1.31
@@ -138,7 +138,7 @@
if (!substituteToken(buf, token)) { // manually process if it wasn't a simple substitution
MyUserData *u = (MyUserData *)userData;
XMLTag tag(token);
- if (!strcmp(tag.getName(), "sync")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "sync")) {
if (tag.getAttribute("type") && tag.getAttribute("value") && !strcmp(tag.getAttribute("type"), "Strongs")) {
const char* value = tag.getAttribute("value");
if (*value == 'H' || *value == 'G' || *value == 'A') {
@@ -166,7 +166,7 @@
buf += ")</em></small>";
}
}
- else if (!strcmp(tag.getName(), "div")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "div")) {
if (tag.isEndTag() && (u->SecHead)) {
buf += "</i></b><br />";
u->SecHead = false;
@@ -182,7 +182,7 @@
}
}
}
- else if (!strcmp(tag.getName(), "img")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "img")) {
const char *src = strstr(token, "src");
if (!src) // assert we have a src attribute
return false;
@@ -208,7 +208,7 @@
}
buf += '>';
}
- else if (!strcmp(tag.getName(), "scripRef")) { //do nothing with scrip refs, we leave them out
+ else if ((tag.getName()) && !strcmp(tag.getName(), "scripRef")) { //do nothing with scrip refs, we leave them out
}
else {
Index: thmlhtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlhtmlhref.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- thmlhtmlhref.cpp 16 Jan 2004 03:42:42 -0000 1.46
+++ thmlhtmlhref.cpp 24 Jan 2004 03:11:50 -0000 1.47
@@ -85,7 +85,7 @@
}
// <note> tag
- else if (!strcmp(tag.getName(), "note")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
@@ -109,7 +109,7 @@
}
}
// <scripRef> tag
- else if (!strcmp(tag.getName(), "scripRef")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "scripRef")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
u->suspendTextPassThru = true;
Index: thmlrtf.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlrtf.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- thmlrtf.cpp 16 Jan 2004 03:42:42 -0000 1.42
+++ thmlrtf.cpp 24 Jan 2004 03:11:50 -0000 1.43
@@ -210,7 +210,7 @@
}
}
// <note> tag
- else if (!strcmp(tag.getName(), "note")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
@@ -235,7 +235,7 @@
}
- else if (!strcmp(tag.getName(), "scripRef")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "scripRef")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
u->suspendTextPassThru = true;
Index: thmlscripref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlscripref.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- thmlscripref.cpp 24 Dec 2003 20:51:36 -0000 1.17
+++ thmlscripref.cpp 24 Jan 2004 03:11:50 -0000 1.18
@@ -56,7 +56,7 @@
intoken = false;
XMLTag tag(token);
- if (!strcmp(tag.getName(), "scripRef")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "scripRef")) {
if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
refs = "";
@@ -94,7 +94,7 @@
}
// if not a scripRef token, keep token in text
- if ((!strcmp(tag.getName(), "scripRef")) && (!tag.isEndTag())) {
+ if ((tag.getName()) && (!strcmp(tag.getName(), "scripRef")) && (!tag.isEndTag())) {
SWBuf osisRef = tag.getAttribute("passage");
if (refs.length())
refs += "; ";
Index: thmlwebif.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlwebif.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- thmlwebif.cpp 18 Nov 2003 20:54:16 -0000 1.10
+++ thmlwebif.cpp 24 Jan 2004 03:11:50 -0000 1.11
@@ -34,7 +34,7 @@
MyUserData *u = (MyUserData *)userData;
XMLTag tag(token);
SWBuf url;
- if (!strcmp(tag.getName(), "sync")) {
+ if ((tag.getName()) && !strcmp(tag.getName(), "sync")) {
const char* value = tag.getAttribute("value");
url = value;
if ((url.length() > 1) && strchr("GH", url[0])) {
@@ -66,7 +66,7 @@
buf += "> </em></small>";
}
}
- else if (!strcmp(tag.getName(), "scripRef")) {
+ else if ((tag.getName()) && !strcmp(tag.getName(), "scripRef")) {
if (tag.isEndTag()) {
if (u->inscriptRef) { // like "<scripRef passage="John 3:16">John 3:16</scripRef>"
u->inscriptRef = false;