[sword-svn] r3739 - in trunk/src: keys mgr
scribe at crosswire.org
scribe at crosswire.org
Sun May 10 10:40:17 MST 2020
Author: scribe
Date: 2020-05-10 10:40:17 -0700 (Sun, 10 May 2020)
New Revision: 3739
Modified:
trunk/src/keys/versekey.cpp
trunk/src/mgr/versificationmgr.cpp
Log:
disable v11n mapping logging. Patch from ?\208?\154?\208?\190?\209?\129?\209?\130?\209?\143 ?\208?\156?\208?\176?\209?\129?\208?\187?\209?\142?\208?\186 <kostyamaslyuk at gmail.com>
Modified: trunk/src/keys/versekey.cpp
===================================================================
--- trunk/src/keys/versekey.cpp 2020-05-10 17:31:40 UTC (rev 3738)
+++ trunk/src/keys/versekey.cpp 2020-05-10 17:40:17 UTC (rev 3739)
@@ -137,7 +137,7 @@
int map_range = map_verse;
ikey.refSys->translateVerse(refSys, &map_book, &map_chapter, &map_verse, &map_range);
- //printf("verse: %s.%i.%i-%i\n",map_book,map_chapter,map_verse,map_range);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("verse: %s.%i.%i-%i\n", map_book, map_chapter, map_verse, map_range);
book = refSys->getBookNumberByOSISName(map_book);
Modified: trunk/src/mgr/versificationmgr.cpp
===================================================================
--- trunk/src/mgr/versificationmgr.cpp 2020-05-10 17:31:40 UTC (rev 3738)
+++ trunk/src/mgr/versificationmgr.cpp 2020-05-10 17:40:17 UTC (rev 3739)
@@ -429,21 +429,21 @@
}
void VersificationMgr::System::translateVerse(const System *dstSys, const char **book, int *chapter, int *verse, int *verse_end) const {
- SWLog::getSystemLog()->logDebug("translate verse from %s to %s: %s.%i.%i-%i\n",getName(), dstSys->getName(), *book, *chapter, *verse, *verse_end);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("translate verse from %s to %s: %s.%i.%i-%i\n",getName(), dstSys->getName(), *book, *chapter, *verse, *verse_end);
if (!strcmp(getName(),"KJVA") || !strcmp(getName(),"KJV")) {
if (!strcmp(dstSys->getName(),"KJVA") || !strcmp(dstSys->getName(),"KJV"))
return;
// reversed mapping
- SWLog::getSystemLog()->logDebug("Perform reversed mapping.\n");
+ //dbg_mapping SWLog::getSystemLog()->logDebug("Perform reversed mapping.\n");
int b = dstSys->getBookNumberByOSISName(*book)-1;
- SWLog::getSystemLog()->logDebug("\tgetBookNumberByOSISName %i %s.\n", b, *book);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("\tgetBookNumberByOSISName %i %s.\n", b, *book);
if (b < 0) {
- SWLog::getSystemLog()->logDebug("\tmappingsExtraBooks.size() %i.\n", dstSys->p->mappingsExtraBooks.size());
+ //dbg_mapping SWLog::getSystemLog()->logDebug("\tmappingsExtraBooks.size() %i.\n", dstSys->p->mappingsExtraBooks.size());
for (int i=0; i<(int)dstSys->p->mappingsExtraBooks.size(); ++i) {
- SWLog::getSystemLog()->logDebug("\t%s %s.\n", *book, dstSys->p->mappingsExtraBooks[i]);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("\t%s %s.\n", *book, dstSys->p->mappingsExtraBooks[i]);
if (!strcmp(*book, dstSys->p->mappingsExtraBooks[i])) {
b = (int)p->books.size()+i-2;
break;
@@ -451,10 +451,10 @@
}
}
- SWLog::getSystemLog()->logDebug("\tb %i.\n", b);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("\tb %i.\n", b);
if (b >= (int)dstSys->p->mappings.size() || b < 0) {
- SWLog::getSystemLog()->logDebug("no modification");
+ //dbg_mapping SWLog::getSystemLog()->logDebug("no modification");
return;
}
@@ -464,7 +464,7 @@
for (unsigned int i=0; i<dstSys->p->mappings[b].size(); ++i) {
const unsigned char *m = dstSys->p->mappings[b][i];
if (m[4] == *chapter && m[5] <= *verse) {
- SWLog::getSystemLog()->logDebug("found mapping %i %i %i %i %i %i\n",m[1],m[2],m[3],m[4],m[5],m[6]);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("found mapping %i %i %i %i %i %i\n",m[1],m[2],m[3],m[4],m[5],m[6]);
if (m[5] == *verse || (m[6] >= *verse && m[5] <= *verse)) {
// inside of any mapping range
*chapter = m[1];
@@ -482,7 +482,7 @@
}
}
if (a != NULL) {
- SWLog::getSystemLog()->logDebug("set appropriate: %i %i %i %i %i %i\n",a[1],a[2],a[3],a[4],a[5],a[6]);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("set appropriate: %i %i %i %i %i %i\n",a[1],a[2],a[3],a[4],a[5],a[6]);
(*chapter) = a[1];
// shift verse
const int d = (a[3]>a[2]?a[3]:a[2])-(a[6]>a[5]?a[6]:a[5]);
@@ -492,13 +492,13 @@
*verse_end = (*verse) + d;
*verse += d;
if (*a > dstSys->p->books.size()) {
- SWLog::getSystemLog()->logDebug("appropriate: %i %i %i %i %i %i %i %i\n",a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);
- SWLog::getSystemLog()->logDebug("book: %s\n", dstSys->getBook(a[7]-1)->getOSISName());
+ //dbg_mapping SWLog::getSystemLog()->logDebug("appropriate: %i %i %i %i %i %i %i %i\n",a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("book: %s\n", dstSys->getBook(a[7]-1)->getOSISName());
*book = dstSys->getBook(a[7]-1)->getOSISName();
}
return;
}
- SWLog::getSystemLog()->logDebug("There is no mapping.\n");
+ //dbg_mapping SWLog::getSystemLog()->logDebug("There is no mapping.\n");
}
else if (strcmp(dstSys->getName(),"KJVA") && strcmp(dstSys->getName(),"KJV")) {
const System *kjva = getSystemVersificationMgr()->getVersificationSystem("KJVA");
@@ -524,7 +524,7 @@
}
}
else {
- SWLog::getSystemLog()->logDebug("Perform forward mapping.\n");
+ //dbg_mapping SWLog::getSystemLog()->logDebug("Perform forward mapping.\n");
const int b = getBookNumberByOSISName(*book)-1;
if (b >= (int)p->mappings.size())
return;
@@ -536,7 +536,7 @@
return;
}
if (m[1] == *chapter && m[2] <= *verse) {
- SWLog::getSystemLog()->logDebug("found mapping %i %i %i %i %i %i\n",m[1],m[2],m[3],m[4],m[5],m[6]);
+ //dbg_mapping SWLog::getSystemLog()->logDebug("found mapping %i %i %i %i %i %i\n",m[1],m[2],m[3],m[4],m[5],m[6]);
if (m[2] == *verse || (m[3] >= *verse && m[2] <= *verse)) {
*chapter = m[4];
*verse = m[5];
@@ -557,7 +557,7 @@
return;
}
}
- SWLog::getSystemLog()->logDebug("No mapping.\n");
+ //dbg_mapping SWLog::getSystemLog()->logDebug("No mapping.\n");
}
}
More information about the sword-cvs
mailing list