[sword-svn] r1912 - in trunk: bindings/corba/orbitcpp
src/modules/texts/rawtext utilities
scribe at crosswire.org
scribe at crosswire.org
Sat May 6 18:39:30 MST 2006
Author: scribe
Date: 2006-05-06 18:39:28 -0700 (Sat, 06 May 2006)
New Revision: 1912
Modified:
trunk/bindings/corba/orbitcpp/swordorb-impl.cpp
trunk/bindings/corba/orbitcpp/testclient.cpp
trunk/src/modules/texts/rawtext/rawtext.cpp
trunk/utilities/mkfastmod.cpp
Log:
fixed compile bug.
reorg'd help in mkfastmod
Modified: trunk/bindings/corba/orbitcpp/swordorb-impl.cpp
===================================================================
--- trunk/bindings/corba/orbitcpp/swordorb-impl.cpp 2006-04-27 07:21:34 UTC (rev 1911)
+++ trunk/bindings/corba/orbitcpp/swordorb-impl.cpp 2006-05-07 01:39:28 UTC (rev 1912)
@@ -177,7 +177,7 @@
// if we're sorted by score, let's re-sort by verse, because Java can always re-sort by score
result = sword::TOP;
- if ((long)result.getElement()->userData)
+ if ((count) && (long)result.getElement()->userData)
result.sort();
for (result = sword::TOP; !result.Error(); result++) {
Modified: trunk/bindings/corba/orbitcpp/testclient.cpp
===================================================================
--- trunk/bindings/corba/orbitcpp/testclient.cpp 2006-04-27 07:21:34 UTC (rev 1911)
+++ trunk/bindings/corba/orbitcpp/testclient.cpp 2006-05-07 01:39:28 UTC (rev 1912)
@@ -52,31 +52,31 @@
mgr->setJavascript(true);
mgr->setGlobalOption("Textual Variants", "Secondary Reading");
mgr->setGlobalOption("Footnotes", "On");
- module = mgr->getModuleByName("NASB");
+ module = mgr->getModuleByName("WEB");
+/*
module->setKeyText("jas.1.19");
swordorb::StringList *attr = module->getEntryAttribute("Footnote", "", "body", true);
std::cout << "length: " << attr->length() << "\n";
for (int i = 0; i < attr->length(); i++) {
std::cout << (*attr)[i] << "\n";
}
-/*
- for (module->setKeyText("is.53.4"); !module->error(); module->next()) {
+*/
+ int i = 0;
+ for (module->setKeyText("jas.1.1"); !module->error() && i < 30; module->next(), i++) {
std::cout << "KeyText: " << module->getKeyText() << "\n";
std::cout << "Text: " << module->getRenderText() << "\n";
- break;
}
-*/
/*
swordorb::SearchHitList *searchResults;
bool lucene = module->hasSearchFramework();
- searchResults = module->search("God love world", (lucene)?swordorb::LUCENE:swordorb::MULTIWORD, 0, "");
+ searchResults = module->search("David", (lucene)?swordorb::LUCENE:swordorb::MULTIWORD, 0, "");
for (int i = 0; i < searchResults->length(); i++) {
std::cout << (*searchResults)[i].key << "\n";
}
-*/
mgr->setGlobalOption("Greek Accents", "Off");
std::cout << "\nFiltered text: " << mgr->filterText("Greek Accents", "ὁ θεὸς") << "\n";
+*/
} catch(const CORBA::Exception& ex) {
Modified: trunk/src/modules/texts/rawtext/rawtext.cpp
===================================================================
--- trunk/src/modules/texts/rawtext/rawtext.cpp 2006-04-27 07:21:34 UTC (rev 1911)
+++ trunk/src/modules/texts/rawtext/rawtext.cpp 2006-05-07 01:39:28 UTC (rev 1912)
@@ -278,12 +278,12 @@
* justCheckIfSupported - if set, don't search, only tell if this
* function supports requested search.
*
- * RET: listkey set to verses that contain istr
+ * RET: ListKey set to verses that contain istr
*/
ListKey &RawText::search(const char *istr, int searchType, int flags, SWKey *scope, bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData) {
#ifndef USELUCENE
- listkey.ClearList();
+ listKey.ClearList();
if ((fastSearch[0]) && (fastSearch[1])) {
@@ -312,7 +312,7 @@
// If we've gotten this far, then it is supported.
if (justCheckIfSupported) {
*justCheckIfSupported = true;
- return listkey;
+ return listKey;
}
SWKey saveKey = *testKeyType; // save current place
@@ -415,7 +415,7 @@
percent((char)(20 + (float)((j*wordCount)+i)/(wordCount * 2) * 78), percentUserData);
}
- // indexes contains our good verses, lets return them in a listkey
+ // indexes contains our good verses, lets return them in a listKey
indexes.sort();
// iterate thru each good module position that meets the search
@@ -433,9 +433,9 @@
// check to see if it set ok and if so, add to our return list
if (*testKeyType == vk)
- listkey << (const char *) vk;
+ listKey << (const char *) vk;
}
- else listkey << (const char*) vk;
+ else listKey << (const char*) vk;
}
}
(*percent)(98, percentUserData);
@@ -445,9 +445,9 @@
*testKeyType = saveKey; // set current place back to original
- listkey = TOP;
+ listKey = TOP;
(*percent)(100, percentUserData);
- return listkey;
+ return listKey;
}
default:
@@ -458,7 +458,7 @@
// check if we just want to see if search is supported
if (justCheckIfSupported) {
*justCheckIfSupported = false;
- return listkey;
+ return listKey;
}
#endif
Modified: trunk/utilities/mkfastmod.cpp
===================================================================
--- trunk/utilities/mkfastmod.cpp 2006-04-27 07:21:34 UTC (rev 1911)
+++ trunk/utilities/mkfastmod.cpp 2006-05-07 01:39:28 UTC (rev 1912)
@@ -33,10 +33,10 @@
int main(int argc, char **argv)
{
- SWMgr manager(new sword::MarkupFilterMgr(sword::FMT_HTMLHREF, sword::ENC_UTF16));
- SWModule &kjv = *(manager.Modules["KJV"]);
- for (kjv.setKey("Gen 1:1"); ((VerseKey *)kjv.getKey())->Chapter() == 1; kjv++) {
- SWBuf x = kjv.RenderText();
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <modname>\n", argv[0]);
+ exit(-1);
}
SWModule *target;
@@ -44,11 +44,7 @@
VerseKey vk;
ModMap::iterator it;
- if (argc != 2) {
- fprintf(stderr, "usage: %s <modname>\n", argv[0]);
- exit(-1);
- }
-
+ SWMgr manager;
it = manager.Modules.find(argv[1]);
if (it == manager.Modules.end()) {
fprintf(stderr, "Could not find module [%s]. Available modules:\n", argv[1]);
More information about the sword-cvs
mailing list