summaryrefslogtreecommitdiffstats
path: root/intf
diff options
context:
space:
mode:
authorTroy A. Griffitts <scribe@crosswire.org>2011-12-09 20:16:21 +0000
committerTroy A. Griffitts <scribe@crosswire.org>2011-12-09 20:16:21 +0000
commitc6488c8c55c9bd9f28b834806d1e20d532672ede (patch)
treed9747e3ebe0a05ce08ed2be3f179694724e1b372 /intf
parent35f68cd9bac0d172c7e8170a71714eb873dce6db (diff)
downloadsword-tools-c6488c8c55c9bd9f28b834806d1e20d532672ede.tar.gz
added better detection of end verse
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@339 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'intf')
-rw-r--r--intf/collate2imp.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/intf/collate2imp.cpp b/intf/collate2imp.cpp
index ee5a359..13a9fe3 100644
--- a/intf/collate2imp.cpp
+++ b/intf/collate2imp.cpp
@@ -41,13 +41,6 @@ int main(int argc, char **argv) {
bool more = true;
do {
more = FileMgr::getLine(fd, lineBuffer)!=0;
- if (inVerse) {
- if (lineBuffer.indexOf("</ab>") > -1) {
- lineBuffer.setSize(lineBuffer.indexOf("</ab>"));
- inVerse = false;
- }
- cout << lineBuffer.trim() << endl;
- }
if (lineBuffer.startsWith(bookTag)) {
lineBuffer << bookTag.length();
SWBuf book = lineBuffer.stripPrefix('"');
@@ -70,7 +63,17 @@ int main(int argc, char **argv) {
else {
inVerse = true;
}
- cout << "$$$" << vk.getOSISRef() << "\n";
+ lineBuffer.trim();
+ if (lineBuffer.length() > 0 && lineBuffer != "&om;") {
+ cout << "$$$" << vk.getOSISRef() << (vk.getVerse() ? "" : ".0") << "\n";
+ cout << lineBuffer << endl;
+ }
+ }
+ else if (inVerse) {
+ if (lineBuffer.indexOf("</ab>") > -1) {
+ lineBuffer.setSize(lineBuffer.indexOf("</ab>"));
+ inVerse = false;
+ }
cout << lineBuffer.trim() << endl;
}
} while (more);