[sword-svn] r97 - trunk/flashtools
scribe at www.crosswire.org
scribe at www.crosswire.org
Mon Sep 3 17:48:05 MST 2007
Author: scribe
Date: 2007-09-03 17:48:05 -0700 (Mon, 03 Sep 2007)
New Revision: 97
Modified:
trunk/flashtools/Makefile
trunk/flashtools/flash.cpp
Log:
Applied patch from Lyndon Drake fixing strongs def card
and verifying KJV module is installed with user feedback if not
Added standard crosswire header
Modified: trunk/flashtools/Makefile
===================================================================
--- trunk/flashtools/Makefile 2007-09-02 20:00:05 UTC (rev 96)
+++ trunk/flashtools/Makefile 2007-09-04 00:48:05 UTC (rev 97)
@@ -7,6 +7,6 @@
rm $(TARGETS)
.cpp:
- g++ -g `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword`
+ g++ -g `pkg-config --static --cflags sword` $< -o $@ `pkg-config --static --libs sword`
Modified: trunk/flashtools/flash.cpp
===================================================================
--- trunk/flashtools/flash.cpp 2007-09-02 20:00:05 UTC (rev 96)
+++ trunk/flashtools/flash.cpp 2007-09-04 00:48:05 UTC (rev 97)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * flash.cpp - Automation of flashcards generation
+ *
+ * Copyright 2007 CrossWire Bible Society (http://www.crosswire.org)
+ * CrossWire Bible Society
+ * P. O. Box 2528
+ * Tempe, AZ 85280-2528
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * Contributors:
+ * Lyndon Drake <lyndon at arotau dot com>
+ * Troy A. Griffitts <scribe at crosswire dot org>
+ */
+
#include <map>
#include <vector>
#include <iostream>
@@ -201,7 +223,7 @@
}
// if we would rather have short strongs
else {
- SWBuf answers = w.def;
+ answers = w.def;
strip.processText(answers); // remove html tags
answers.replaceBytes("\n\r", ' '); // remove newlines
}
@@ -241,13 +263,19 @@
*/
vector<Word> processWords(const char *range, bool addAll = true) {
SWMgr manager;
- SWModule &bible = *manager.getModule("KJV");
map<SWBuf, Word> wordList;
SWConfig hutf8("hwords.conf");
SWConfig hdefs("hdefs.conf");
SWConfig gutf8("gwords.conf");
SWConfig gdefs("gdefs.conf");
+
+ SWModule *tmpBible = manager.getModule("KJV");
+ if (!tmpBible) {
+ cerr << "Unable to locate KJV module" << endl;
+ exit(1);
+ }
+ SWModule &bible = *tmpBible;
VerseKey parser;
ListKey r = parser.ParseVerseList(range, 0, true);
More information about the sword-cvs
mailing list