[sword-cvs] sword/src/modules/filters gbfhtmlhref.cpp,1.28,1.29 osishtmlhref.cpp,1.22,1.23 thmlhtmlhref.cpp,1.49,1.50
sword@www.crosswire.org
sword@www.crosswire.org
Sat, 27 Mar 2004 12:35:33 -0700
- Previous message: [sword-cvs] sword/include gbfhtmlhref.h,1.8,1.9 osishtmlhref.h,1.9,1.10
- Next message: [sword-cvs] sword-apidoc/html _greek2_greek_8h-source.html,1.11,1.12 _greek_chars_8h-source.html,1.11,1.12 apocrypha_8h-source.html,1.7,1.8 cdsourcemgr_8h-source.html,1.11,1.12 cipherfil_8h-source.html,1.11,1.12 echomod_8h-source.html,1.11,1.12 femain_8h-source.html,1.11,1.12 filemgr_8h-source.html,1.11,1.12 gbffootnotes_8h-source.html,1.11,1.12 gbfheadings_8h-source.html,1.11,1.12 gbfhtml_8h-source.html,1.11,1.12 gbfhtmlhref_8h-source.html,1.11,1.12 gbfmorph_8h-source.html,1.11,1.12 gbfosis_8h-source.html,1.11,1.12 gbfplain_8h-source.html,1.11,1.12 gbfredletterwords_8h-source.html,1.11,1.12 gbfrtf_8h-source.html,1.11,1.12 gbfstrongs_8h-source.html,1.11,1.12 gbfthml_8h-source.html,1.11,1.12 gbfwebif_8h-source.html,1.5,1.6 greeklexattribs_8h-source.html,1.11,1.12 hrefcom_8h-source.html,1.11,1.12 latin1utf16_8h-source.html,1.11,1.12 latin1utf8_8h-source.html,1.11,1.12 listkey_8h-source.html,1.11,1.12 localemgr_8h-source.html,1.11,1.12 lzsscomprs_8h-source.html,1.11,1.12 osisfootnotes_8h-source.html,1.5,1.6 osisheadings_8h-source.html,1.7,1.8 osishtmlhref_8h-source.html,1.5,1.6 osislemma_8h-source.html,1.5,1.6 osismorph_8h-source.html,1.11,1.12 osisosis_8h-source.html,1.1,1.2 osisplain_8h-source.html,1.11,1.12 osisredletterwords_8h-source.html,1.5,1.6 osisrtf_8h-source.html,1.11,1.12 osisscripref_8h-source.html,1.5,1.6 osisstrongs_8h-source.html,1.11,1.12 osiswebif_8h-source.html,1.1,1.2 plainfootnotes_8h-source.html,1.11,1.12 plainhtml_8h-source.html,1.11,1.12 rawcom_8h-source.html,1.11,1.12 rawfiles_8h-source.html,1.11,1.12 rawgbf_8h-source.html,1.11,1.12 rawgenbook_8h-source.html,1.11,1.12 rawld4_8h-source.html,1.11,1.12 rawld_8h-source.html,1.11,1.12 rawstr4_8h-source.html,1.11,1.12 rawstr_8h-source.html,1.11,1.12 rawtext_8h-source.html,1.11,1.12 remotesourcemgr_8h-source.html,1.11,1.12 rtfhtml_8h-source.html,1.11,1.12 scsuutf8_8h-source.html,1.11,1.12 strkey_8h-source.html,1.11,1.12 swbasicfilter_8h-source.html,1.11,1.12 swbuf_8h-source.html,1.11,1.12 swcacher_8h-source.html,1.11,1.12 swcipher_8h-source.html,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/core/sword/src/modules/filters
In directory www:/tmp/cvs-serv1605/src/modules/filters
Modified Files:
gbfhtmlhref.cpp osishtmlhref.cpp thmlhtmlhref.cpp
Log Message:
mg: rolled back Terry's patch after Troy told me it breaks client apps.
Sorry about the trouble I caused.
Suggestion: Let us have more clear communication
on sword-devel in future. Public requests should be answered publically.
Index: gbfhtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/gbfhtmlhref.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- gbfhtmlhref.cpp 27 Mar 2004 10:55:59 -0000 1.28
+++ gbfhtmlhref.cpp 27 Mar 2004 19:35:30 -0000 1.29
@@ -24,12 +24,6 @@
SWORD_NAMESPACE_START
-GBFHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
- if (module) {
- version = module->Name();
- }
-}
-
GBFHTMLHREF::GBFHTMLHREF() {
setTokenStart("<");
setTokenEnd(">");
@@ -149,21 +143,9 @@
}
}
- else if (!strncmp(token, "WG", 2)) { // strong's numbers
- buf += " <small><em><<a href=\"strongs://Greek/";
- for (tok = token+2; *tok; tok++)
- //if(token[i] != '\"')
- buf += *tok;
- buf += "\">";
- for (tok = token + 2; *tok; tok++)
- //if(token[i] != '\"')
- buf += *tok;
- buf += "</a>></em></small>";
- }
-
- else if (!strncmp(token, "WH", 2)) { // strong's numbers
- buf += " <small><em><<a href=\"strongs://Hebrew/";
- for (tok = token+2; *tok; tok++)
+ else if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // strong's numbers
+ buf += " <small><em><<a href=\"type=Strongs value=";
+ for (tok = token+1; *tok; tok++)
//if(token[i] != '\"')
buf += *tok;
buf += "\">";
@@ -173,23 +155,9 @@
buf += "</a>></em></small>";
}
- else if (!strncmp(token, "WTG", 3)) { // strong's numbers tense
-
- buf += " <small><em>(<a href=\"strongs://Greek/";
- for (tok = token + 3; *tok; tok++)
- if(*tok != '\"')
- buf += *tok;
- buf += "\">";
- for (tok = token + 3; *tok; tok++)
- if(*tok != '\"')
- buf += *tok;
- buf += "</a>)</em></small>";
- }
-
- else if (!strncmp(token, "WTH", 3)) { // strong's numbers tense
-
- buf += " <small><em>(<a href=\"strongs://Hebrew/";
- for (tok = token + 3; *tok; tok++)
+ else if (!strncmp(token, "WTG", 3) || !strncmp(token, "WTH", 3)) { // strong's numbers tense
+ buf += " <small><em>(<a href=\"type=Strongs value=";
+ for (tok = token + 2; *tok; tok++)
if(*tok != '\"')
buf += *tok;
buf += "\">";
@@ -200,7 +168,7 @@
}
else if (!strncmp(token, "WT", 2) && strncmp(token, "WTH", 3) && strncmp(token, "WTG", 3)) { // morph tags
- buf += " <small><em>(<a href=\"morph:///";
+ buf += " <small><em>(<a href=\"type=morph class=none value=";
for (tok = token + 2; *tok; tok++)
if(*tok != '\"')
buf += *tok;
@@ -235,7 +203,7 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
//char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"noteID://%s/%s/%c/%s\"><small><sup>*%c</sup></small></a> ", u->version.c_str(), vkey->getText(), 'n', footnoteNumber.c_str(), 'n');
+ buf.appendFormatted("<a href=\"noteID=%s.%c.%s\"><small><sup>*%c</sup></small></a> ", vkey->getText(), 'n', footnoteNumber.c_str(), 'n');
}
u->suspendTextPassThru = true;
}
Index: osishtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osishtmlhref.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- osishtmlhref.cpp 27 Mar 2004 10:55:59 -0000 1.22
+++ osishtmlhref.cpp 27 Mar 2004 19:35:30 -0000 1.23
@@ -25,8 +25,6 @@
OSISHTMLHREF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
- if (module)
- version = module->Name();
}
@@ -97,17 +95,12 @@
if (i < 0) i = 0; // to handle our -1 condition
val = strchr(attrib, ':');
val = (val) ? (val + 1) : attrib;
- SWBuf gh;
- if(*val == 'G')
- gh = "Greek";
- if(*val == 'H')
- gh = "Hebrew";
const char *val2 = val;
if ((strchr("GH", *val)) && (isdigit(val[1])))
val2++;
if ((!strcmp(val2, "3588")) && (lastText.length() < 1))
show = false;
- else buf.appendFormatted(" <small><em><<a href=\"strongs://%s/%s\">%s</a>></em></small> ", (gh.length()) ? gh.c_str() : "", val2, val2);
+ else buf.appendFormatted(" <small><em><<a href=\"type=Strongs value=%s\">%s</a>></em></small> ", val, val2);
} while (++i < count);
}
if ((attrib = tag.getAttribute("morph")) && (show)) {
@@ -125,7 +118,7 @@
const char *val2 = val;
if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2])))
val2+=2;
- buf.appendFormatted(" <small><em>(<a href=\"morph://%s/%s\">%s</a>)</em></small> ", tag.getAttribute("morph"), val, val2);
+ buf.appendFormatted(" <small><em>(<a href=\"type=morph class=%s value=%s\">%s</a>)</em></small> ", tag.getAttribute("morph"), val, val2);
} while (++i < count);
}
}
@@ -156,7 +149,7 @@
SWCATCH ( ... ) { }
if (vkey) {
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"noteID://%s/%s/%c/%s\"><small><sup>*%c</sup></small></a> ", u->version.c_str(), vkey->getText(), ch, footnoteNumber.c_str(), ch);
+ buf.appendFormatted("<a href=\"noteID=%s.%c.%s\"><small><sup>*%c</sup></small></a> ", vkey->getText(), ch, footnoteNumber.c_str(), ch);
}
}
u->suspendTextPassThru = true;
Index: thmlhtmlhref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlhtmlhref.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- thmlhtmlhref.cpp 27 Mar 2004 10:55:59 -0000 1.49
+++ thmlhtmlhref.cpp 27 Mar 2004 19:35:30 -0000 1.50
@@ -53,19 +53,27 @@
if (tag.getName() && !strcmp(tag.getName(), "sync")) {
SWBuf value = tag.getAttribute("value");
if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")) { //>
- buf.appendFormatted("<small><em>(<a href=\"morph://Greek/%s\">",(value.length()) ? value.c_str() : "");
+ buf += "<small><em>(<a href=\"";
+ buf += "type=";
+ buf += tag.getAttribute("type");
+
+ //const char* value = tag.getAttribute("value");
+ buf += " value=";
+ buf += (value.length()) ? value.c_str() : "";
+ buf += "\">";
buf += (value.length()) ? value.c_str() : "";
buf += "</a>) </em></small>";
}
else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Strongs")) {
- if(*value == 'H') {
- value<<1;
- buf.appendFormatted("<small><em><<a href=\"strongs://Hebrew/%s\">",(value.length()) ? value.c_str() : "");
- }
- else if(*value == 'G') {
- value<<1;
- buf.appendFormatted("<small><em><<a href=\"strongs://Greek/%s\">",(value.length()) ? value.c_str() : "");
- }
+ buf += "<small><em><<a href=\"";
+ buf += "type=";
+ buf += tag.getAttribute("type");
+
+ //const char* value = tag.getAttribute("value");
+ buf += " value=";
+ buf += (value.length()) ? value.c_str() : "";
+ buf += "\">";
+ value<<1;
buf += (value.length()) ? value.c_str() : "";
buf += "</a>> </em></small>";
}
@@ -91,7 +99,7 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"noteID://%s/%s/%c/%s\"><small><sup>*%c</sup></small></a> ", u->version.c_str(), vkey->getText(), ch, footnoteNumber.c_str(), ch);
+ buf.appendFormatted("<a href=\"noteID=%s.%c.%s\"><small><sup>*%c</sup></small></a> ", vkey->getText(), ch, footnoteNumber.c_str(), ch);
}
u->suspendTextPassThru = true;
}
@@ -102,7 +110,7 @@
}
// <scripRef> tag
else if (!strcmp(tag.getName(), "scripRef")) {
- if (!tag.isEndTag()) {
+ if (!tag.isEndTag()) {
if (!tag.isEmpty()) {
u->suspendTextPassThru = true;
}
@@ -112,8 +120,16 @@
SWBuf refList = u->startTag.getAttribute("passage");
if (!refList.length())
refList = u->lastTextNode;
- SWBuf version = u->startTag.getAttribute("version");
- buf.appendFormatted(" <a href=\"reference://%s/%s\">",(version.length()) ? version.c_str() : "",(refList.length()) ? refList.c_str() : "");
+ SWBuf version = tag.getAttribute("version");
+ buf += " <a href=\"";
+ if (version.length()) {
+ buf += "version=";
+ buf += version;
+ buf += " ";
+ }
+ buf += "passage=";
+ buf += refList.c_str();
+ buf += "\">";
buf += u->lastTextNode.c_str();
buf += "</a> ";
}
@@ -127,7 +143,7 @@
SWCATCH ( ... ) {}
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
- buf.appendFormatted("<a href=\"noteID://%s/%s/x/%s\"><small><sup>*x</sup></small></a> ",u->version.c_str(), vkey->getText(), footnoteNumber.c_str());
+ buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str());
}
}
- Previous message: [sword-cvs] sword/include gbfhtmlhref.h,1.8,1.9 osishtmlhref.h,1.9,1.10
- Next message: [sword-cvs] sword-apidoc/html _greek2_greek_8h-source.html,1.11,1.12 _greek_chars_8h-source.html,1.11,1.12 apocrypha_8h-source.html,1.7,1.8 cdsourcemgr_8h-source.html,1.11,1.12 cipherfil_8h-source.html,1.11,1.12 echomod_8h-source.html,1.11,1.12 femain_8h-source.html,1.11,1.12 filemgr_8h-source.html,1.11,1.12 gbffootnotes_8h-source.html,1.11,1.12 gbfheadings_8h-source.html,1.11,1.12 gbfhtml_8h-source.html,1.11,1.12 gbfhtmlhref_8h-source.html,1.11,1.12 gbfmorph_8h-source.html,1.11,1.12 gbfosis_8h-source.html,1.11,1.12 gbfplain_8h-source.html,1.11,1.12 gbfredletterwords_8h-source.html,1.11,1.12 gbfrtf_8h-source.html,1.11,1.12 gbfstrongs_8h-source.html,1.11,1.12 gbfthml_8h-source.html,1.11,1.12 gbfwebif_8h-source.html,1.5,1.6 greeklexattribs_8h-source.html,1.11,1.12 hrefcom_8h-source.html,1.11,1.12 latin1utf16_8h-source.html,1.11,1.12 latin1utf8_8h-source.html,1.11,1.12 listkey_8h-source.html,1.11,1.12 localemgr_8h-source.html,1.11,1.12 lzsscomprs_8h-source.html,1.11,1.12 osisfootnotes_8h-source.html,1.5,1.6 osisheadings_8h-source.html,1.7,1.8 osishtmlhref_8h-source.html,1.5,1.6 osislemma_8h-source.html,1.5,1.6 osismorph_8h-source.html,1.11,1.12 osisosis_8h-source.html,1.1,1.2 osisplain_8h-source.html,1.11,1.12 osisredletterwords_8h-source.html,1.5,1.6 osisrtf_8h-source.html,1.11,1.12 osisscripref_8h-source.html,1.5,1.6 osisstrongs_8h-source.html,1.11,1.12 osiswebif_8h-source.html,1.1,1.2 plainfootnotes_8h-source.html,1.11,1.12 plainhtml_8h-source.html,1.11,1.12 rawcom_8h-source.html,1.11,1.12 rawfiles_8h-source.html,1.11,1.12 rawgbf_8h-source.html,1.11,1.12 rawgenbook_8h-source.html,1.11,1.12 rawld4_8h-source.html,1.11,1.12 rawld_8h-source.html,1.11,1.12 rawstr4_8h-source.html,1.11,1.12 rawstr_8h-source.html,1.11,1.12 rawtext_8h-source.html,1.11,1.12 remotesourcemgr_8h-source.html,1.11,1.12 rtfhtml_8h-source.html,1.11,1.12 scsuutf8_8h-source.html,1.11,1.12 strkey_8h-source.html,1.11,1.12 swbasicfilter_8h-source.html,1.11,1.12 swbuf_8h-source.html,1.11,1.12 swcacher_8h-source.html,1.11,1.12 swcipher_8h-source.html,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]