From 18f4f46bd0bf73109a15d4a888083be356141d65 Mon Sep 17 00:00:00 2001 From: danglassey Date: Fri, 25 Oct 2002 13:02:10 +0000 Subject: sync with crosswire 20021025-1300 --- doc/ads/de/sword_cd.sxw | Bin 17493 -> 17609 bytes doc/ads/de/sword_cd_cover.sxd | Bin 32274 -> 32386 bytes src/modules/filters/gbfosis.cpp | 39 +++++++++++++++++++++++++++++++++++---- usrinst.sh | 14 +++++++++----- 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/doc/ads/de/sword_cd.sxw b/doc/ads/de/sword_cd.sxw index e116513..1d0c908 100644 Binary files a/doc/ads/de/sword_cd.sxw and b/doc/ads/de/sword_cd.sxw differ diff --git a/doc/ads/de/sword_cd_cover.sxd b/doc/ads/de/sword_cd_cover.sxd index 45b19f4..8b8ed12 100644 Binary files a/doc/ads/de/sword_cd_cover.sxd and b/doc/ads/de/sword_cd_cover.sxd differ diff --git a/src/modules/filters/gbfosis.cpp b/src/modules/filters/gbfosis.cpp index a921225..ac41e5b 100644 --- a/src/modules/filters/gbfosis.cpp +++ b/src/modules/filters/gbfosis.cpp @@ -50,6 +50,7 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu std::string tmp; bool suspendTextPassThru = false; bool keepToken = false; + bool handled = false; len = strlen(text) + 1; // shift string to right of buffer if (len < maxlen) { @@ -82,7 +83,7 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu keepToken = false; suspendTextPassThru = false; newWord = true; - + handled = false; while (wordStart < (text+maxlen)) { // if (strchr(" ,;.?!()'\"", *wordStart)) @@ -101,6 +102,7 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu // pushString(buf, ""); newText = true; lastspace = false; + handled = true; } else if (!strcmp(token, "Rf")) { pushString(&to, ""); lastspace = false; + handled = true; + } + // Italics assume transchange + if (!strcmp(token, "FI")) { + pushString(&to, ""); + newText = true; + lastspace = false; + handled = true; + } + else if (!strcmp(token, "Fi")) { + pushString(&to, ""); + lastspace = false; + handled = true; + } + // Paragraph break. For now use empty paragraph element + if (!strcmp(token, "CM")) { + pushString(&to, "

"); + newText = true; + lastspace = false; + handled = true; } // Figure else if (!strncmp(token, "img ", 4)) { const char *src = strstr(token, "src"); if (!src) // assert we have a src attribute - return false; + continue; +// return false; pushString(&to, "

"); lastspace = false; - return true; + handled = true; } // Strongs numbers @@ -184,6 +209,7 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu lastspace = false; } } + handled = true; } // Morphology @@ -217,9 +243,14 @@ char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModu pushString(&to, ""); lastspace = false; } + handled = true; } - if (!keepToken) { // if we don't want strongs + if (!keepToken) { + if (!handled) { + SWLog::systemlog->LogError("Unprocessed Token: <%s>", token); +// exit(-1); + } if (from[1] && strchr(" ,;.:?!()'\"", from[1])) { if (lastspace) to--; diff --git a/usrinst.sh b/usrinst.sh index a89e4f9..fc54a88 100755 --- a/usrinst.sh +++ b/usrinst.sh @@ -1,10 +1,14 @@ #!/bin/sh -CPPFLAGS=-DUSBINARY ./configure --prefix=/usr \ - --disable-shared --without-conf --sysconfdir=/etc \ - --with-vcl \ -# --enable-debug --enable-profile \ - $* +OPTIONS="--prefix=/usr" +OPTIONS="--disable-shared $OPTIONS" +OPTIONS="--without-conf $OPTIONS" +OPTIONS="--sysconfdir=/etc $OPTIONS" +OPTIONS="--with-vcl $OPTIONS" +OPTIONS="--enable-debug $OPTIONS" +#OPTIONS="--enable-profile $OPTIONS" + +CPPFLAGS=-DUSBINARY ./configure $OPTIONS $* echo "" echo "" -- cgit