[sword-svn] r2332 - trunk/src/keys

scribe at crosswire.org scribe at crosswire.org
Thu Apr 23 04:02:35 MST 2009


Author: scribe
Date: 2009-04-23 04:02:35 -0700 (Thu, 23 Apr 2009)
New Revision: 2332

Modified:
   trunk/src/keys/versekey.cpp
Log:
Added logic to skip abbrevs not in self's versification



Modified: trunk/src/keys/versekey.cpp
===================================================================
--- trunk/src/keys/versekey.cpp	2009-04-23 10:06:40 UTC (rev 2331)
+++ trunk/src/keys/versekey.cpp	2009-04-23 11:02:35 UTC (rev 2332)
@@ -385,7 +385,15 @@
 					break;
 			}
 
-			retVal = (!diff) ? refSys->getBookNumberByOSISName(abbrevs[target].osis) : -1;
+			if (!diff) {
+				// lets keep moving forward till we find an abbrev in our refSys
+				retVal = refSys->getBookNumberByOSISName(abbrevs[target].osis);
+				while ((retVal < 0)  && (target < max) && (!strncmp(abbr, abbrevs[target+1].ab, abLen))) {
+					target++;
+					retVal = refSys->getBookNumberByOSISName(abbrevs[target].osis);
+				}
+			}
+			else retVal = -1;
 		}
 		if (retVal > 0)
 			break;




More information about the sword-cvs mailing list