[sword-svn] r2375 - in trunk: include src/mgr src/modules/filters tests
scribe at crosswire.org
scribe at crosswire.org
Mon May 4 00:39:10 MST 2009
Author: scribe
Date: 2009-05-04 00:39:10 -0700 (Mon, 04 May 2009)
New Revision: 2375
Modified:
trunk/include/config.h
trunk/src/mgr/versemgr.cpp
trunk/src/modules/filters/osishtmlhref.cpp
trunk/src/modules/filters/thmlhtmlhref.cpp
trunk/tests/parsekey.cpp
Log:
moved registrations to the top near the includes to make things easier to maintain
applied Jonathan Marsden's patch to fix image output problem:
http://www.crosswire.org/bugs/browse/API-98
cleaned up whitespace
Modified: trunk/include/config.h
===================================================================
--- trunk/include/config.h 2009-05-04 03:48:01 UTC (rev 2374)
+++ trunk/include/config.h 2009-05-04 07:39:10 UTC (rev 2375)
@@ -40,10 +40,6 @@
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
/* Name of package */
#define PACKAGE "sword"
Modified: trunk/src/mgr/versemgr.cpp
===================================================================
--- trunk/src/mgr/versemgr.cpp 2009-05-04 03:48:01 UTC (rev 2374)
+++ trunk/src/mgr/versemgr.cpp 2009-05-04 07:39:10 UTC (rev 2375)
@@ -44,6 +44,20 @@
SWORD_NAMESPACE_START
+VerseMgr *VerseMgr::getSystemVerseMgr() {
+ if (!systemVerseMgr) {
+ systemVerseMgr = new VerseMgr();
+ systemVerseMgr->registerVersificationSystem("KJV", otbooks, ntbooks, vm);
+ systemVerseMgr->registerVersificationSystem("Leningrad", otbooks_leningrad, ntbooks_null, vm_leningrad);
+ systemVerseMgr->registerVersificationSystem("MT", otbooks_mt, ntbooks_null, vm_mt);
+ systemVerseMgr->registerVersificationSystem("KJVA", otbooks_kjva, ntbooks, vm_kjva);
+ systemVerseMgr->registerVersificationSystem("NRSV", otbooks, ntbooks, vm_nrsv);
+ systemVerseMgr->registerVersificationSystem("NRSVA", otbooks_nrsva, ntbooks, vm_nrsva);
+ }
+ return systemVerseMgr;
+}
+
+
class VerseMgr::System::Private {
public:
/** Array[chapmax] of maximum verses in chapters */
@@ -319,20 +333,6 @@
}
-VerseMgr *VerseMgr::getSystemVerseMgr() {
- if (!systemVerseMgr) {
- systemVerseMgr = new VerseMgr();
- systemVerseMgr->registerVersificationSystem("KJV", otbooks, ntbooks, vm);
- systemVerseMgr->registerVersificationSystem("Leningrad", otbooks_leningrad, ntbooks_null, vm_leningrad);
- systemVerseMgr->registerVersificationSystem("MT", otbooks_mt, ntbooks_null, vm_mt);
- systemVerseMgr->registerVersificationSystem("KJVA", otbooks_kjva, ntbooks, vm_kjva);
- systemVerseMgr->registerVersificationSystem("NRSV", otbooks, ntbooks, vm_nrsv);
- systemVerseMgr->registerVersificationSystem("NRSVA", otbooks_nrsva, ntbooks, vm_nrsva);
- }
- return systemVerseMgr;
-}
-
-
void VerseMgr::setSystemVerseMgr(VerseMgr *newVerseMgr) {
if (systemVerseMgr)
delete systemVerseMgr;
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2009-05-04 03:48:01 UTC (rev 2374)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2009-05-04 07:39:10 UTC (rev 2375)
@@ -602,8 +602,7 @@
outText(URL::encode(u->version.c_str()).c_str(), buf, u);
outText("\">", buf, u);
-// we do this because BibleCS looks for this EXACT format for an image tag
- outText("<image border=0 src=\"", buf, u);
+ outText("<img border=0 src=\"", buf, u);
outText(filepath, buf, u);
outText("\" />", buf, u);
Modified: trunk/src/modules/filters/thmlhtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/thmlhtmlhref.cpp 2009-05-04 03:48:01 UTC (rev 2374)
+++ trunk/src/modules/filters/thmlhtmlhref.cpp 2009-05-04 07:39:10 UTC (rev 2375)
@@ -328,8 +328,8 @@
URL::encode(u->version.c_str()).c_str());
for (c = token; *c; c++) {
- if ((*c == '/') && (*(c+1) == '\0'))
- continue;
+ if ((*c == '/') && (*(c+1) == '\0'))
+ continue;
if (c == src) {
for (;((*c) && (*c != '"')); c++)
buf += *c;
Modified: trunk/tests/parsekey.cpp
===================================================================
--- trunk/tests/parsekey.cpp 2009-05-04 03:48:01 UTC (rev 2374)
+++ trunk/tests/parsekey.cpp 2009-05-04 07:39:10 UTC (rev 2375)
@@ -35,7 +35,7 @@
LocaleMgr::getSystemLocaleMgr()->setDefaultLocaleName(argv[2]);
VerseKey DefaultVSKey;
-// DefaultVSKey.AutoNormalize(0);
+ DefaultVSKey.AutoNormalize(0);
if (argc > 3)
DefaultVSKey.setVersificationSystem(argv[3]);
More information about the sword-cvs
mailing list