[sword-svn] r2546 - in trunk: bindings/java-jni/jni examples/cmdline src/modules/filters
scribe at crosswire.org
scribe at crosswire.org
Wed Sep 8 07:14:37 MST 2010
Author: scribe
Date: 2010-09-08 07:14:37 -0700 (Wed, 08 Sep 2010)
New Revision: 2546
Modified:
trunk/bindings/java-jni/jni/Android.mk
trunk/examples/cmdline/lookup.cpp
trunk/src/modules/filters/osishtmlhref.cpp
Log:
Updated to recognize x-PM line subtype to give an extra break in whitespace
updated android paths
add ability to lookup headers in lookup example
Modified: trunk/bindings/java-jni/jni/Android.mk
===================================================================
--- trunk/bindings/java-jni/jni/Android.mk 2010-09-01 21:48:17 UTC (rev 2545)
+++ trunk/bindings/java-jni/jni/Android.mk 2010-09-08 14:14:37 UTC (rev 2546)
@@ -26,8 +26,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libswordcore
-LOCAL_C_INCLUDES := ../src/sword/include ../src/sword/include/internal/regex
+LOCAL_C_INCLUDES := ../sword/include ../sword/include/internal/regex
LOCAL_CFLAGS += -D__unix__ \
+ -Dunix \
-D_FTPLIB_NO_COMPAT \
-DANDROID \
-DOS_ANDROID
@@ -184,8 +185,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libsword
-LOCAL_C_INCLUDES := ../src/sword/include ../src/sword/include/internal/regex
+LOCAL_C_INCLUDES := ../sword/include ../sword/include/internal/regex
LOCAL_CFLAGS += -D__unix__ \
+ -Dunix \
-D_FTPLIB_NO_COMPAT \
-DANDROID \
-DOS_ANDROID
Modified: trunk/examples/cmdline/lookup.cpp
===================================================================
--- trunk/examples/cmdline/lookup.cpp 2010-09-01 21:48:17 UTC (rev 2545)
+++ trunk/examples/cmdline/lookup.cpp 2010-09-08 14:14:37 UTC (rev 2546)
@@ -25,6 +25,7 @@
#include <swmgr.h>
#include <swmodule.h>
#include <markupfiltmgr.h>
+#include <versekey.h>
using sword::SWMgr;
using sword::MarkupFilterMgr;
@@ -36,6 +37,7 @@
using sword::AttributeTypeList;
using sword::AttributeList;
using sword::AttributeValue;
+using sword::VerseKey;
int main(int argc, char **argv)
{
@@ -67,8 +69,17 @@
manager.setGlobalOption("Lemmas", "Off");
// manager.setGlobalOption("Greek Accents", "Off");
- target->setKey(argv[2]);
+ VerseKey *vk = dynamic_cast<VerseKey *>(target->getKey());
+ if (vk) {
+ // vk->AutoNormalize(false);
+ vk->Headings(true);
+ vk->setText(argv[2]);
+ }
+ else {
+ target->setKey(argv[2]);
+ }
+
target->RenderText(); // force an entry lookup to resolve key to something in the index
std::cout << "==Raw=Entry===============\n";
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2010-09-01 21:48:17 UTC (rev 2545)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2010-09-08 14:14:37 UTC (rev 2546)
@@ -388,12 +388,15 @@
// <milestone type="x-p"/>
// <milestone type="cQuote" marker="x"/>
else if ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type"))) {
- if(!strcmp(tag.getAttribute("type"), "line")) {
+ if (!strcmp(tag.getAttribute("type"), "line")) {
outText("<br />", buf, u);
+ if (tag.getAttribute("subType") && !strcmp(tag.getAttribute("subType"), "x-PM")) {
+ outText("<br />", buf, u);
+ }
userData->supressAdjacentWhitespace = true;
}
- else if(!strcmp(tag.getAttribute("type"),"x-p")) {
- if( tag.getAttribute("marker"))
+ else if (!strcmp(tag.getAttribute("type"),"x-p")) {
+ if (tag.getAttribute("marker"))
outText(tag.getAttribute("marker"), buf, u);
else outText("<!p>", buf, u);
}
More information about the sword-cvs
mailing list