[sword-cvs] sword/tests webiftest.cpp,1.2,1.3
sword@www.crosswire.org
sword@www.crosswire.org
Fri, 6 Jun 2003 13:43:00 -0700
- Previous message: [sword-cvs] sword/src/modules/filters thmlhtml.cpp,1.25,1.26 thmlhtmlhref.cpp,1.28,1.29 thmlmorph.cpp,1.8,1.9 thmlwebif.cpp,1.2,1.3
- Next message: [sword-cvs] sword/src/utilfuns utilweb.cpp,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/local/cvsroot/sword/tests
In directory www:/tmp/cvs-serv12795/tests
Modified Files:
webiftest.cpp
Log Message:
some more filter fixes
Index: webiftest.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/tests/webiftest.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** webiftest.cpp 6 Jun 2003 18:25:56 -0000 1.2
--- webiftest.cpp 6 Jun 2003 20:42:58 -0000 1.3
***************
*** 26,51 ****
int main(int argc, char **argv) {
SWMgr mgr(0, 0, true, new MarkupFilterMgr(FMT_WEBIF, ENC_UTF8));
mgr.setGlobalOption("Strong's Numbers", "on");
mgr.setGlobalOption("Morphological Tags", "on");
! SWModule *module = mgr.Modules["TSK"];
if (!module) {
module = mgr.Modules.begin()->second;
}
! module->setKey("John");
std::cout << module->RenderText() << std::endl<< std::endl<< std::endl;
//------------------------
! SWMgr mgr2(0, 0, true, new MarkupFilterMgr(FMT_HTML, ENC_UTF8));
mgr2.setGlobalOption("Strong's Numbers", "on");
mgr2.setGlobalOption("Morphological Tags", "on");
! module = mgr2.Modules["TSK"];
if (!module) {
module = mgr2.Modules.begin()->second;
}
! module->setKey("John");
std::cout << module->RenderText() << std::endl;
--- 26,55 ----
int main(int argc, char **argv) {
+
+ const char* modName = (argc >= 2) ? argv[1] : "KJV";
+ const char* keyName = (argc == 3) ? argv[2] : "John 1:1";
+
SWMgr mgr(0, 0, true, new MarkupFilterMgr(FMT_WEBIF, ENC_UTF8));
mgr.setGlobalOption("Strong's Numbers", "on");
mgr.setGlobalOption("Morphological Tags", "on");
! SWModule *module = mgr.Modules[modName];
if (!module) {
module = mgr.Modules.begin()->second;
}
! module->setKey(keyName);
std::cout << module->RenderText() << std::endl<< std::endl<< std::endl;
//------------------------
! SWMgr mgr2(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF, ENC_UTF8));
mgr2.setGlobalOption("Strong's Numbers", "on");
mgr2.setGlobalOption("Morphological Tags", "on");
! module = mgr2.Modules[modName];
if (!module) {
module = mgr2.Modules.begin()->second;
}
! module->setKey(keyName);
std::cout << module->RenderText() << std::endl;
- Previous message: [sword-cvs] sword/src/modules/filters thmlhtml.cpp,1.25,1.26 thmlhtmlhref.cpp,1.28,1.29 thmlmorph.cpp,1.8,1.9 thmlwebif.cpp,1.2,1.3
- Next message: [sword-cvs] sword/src/utilfuns utilweb.cpp,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]