diff options
Diffstat (limited to 'src/modules/filters/gbffootnotes.cpp')
-rw-r--r-- | src/modules/filters/gbffootnotes.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/modules/filters/gbffootnotes.cpp b/src/modules/filters/gbffootnotes.cpp index bef29b8..a5384cb 100644 --- a/src/modules/filters/gbffootnotes.cpp +++ b/src/modules/filters/gbffootnotes.cpp @@ -2,6 +2,21 @@ * * gbffootnotes - SWFilter descendant to hide or show footnotes * in a GBF module. + * + * Copyright 2009 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. + * */ @@ -33,7 +48,7 @@ GBFFootnotes::~GBFFootnotes() { char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *module) { - + SWBuf token; bool intoken = false; bool hide = false; @@ -42,11 +57,10 @@ char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *m SWBuf refs = ""; int footnoteNum = 1; char buf[254]; - VerseKey parser = key->getText(); SWBuf orig = text; const char *from = orig.c_str(); - + //XMLTag tag; for (text = ""; *from; from++) { @@ -61,7 +75,7 @@ char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *m //XMLTag tag(token); if (!strncmp(token, "RF",2)) { // tag = token; - + refs = ""; startTag = token; hide = true; @@ -71,7 +85,7 @@ char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *m else if (!strncmp(token, "Rf",2)) { if (module->isProcessEntryAttributes()) { //tag = token; - + if((tagText.length() == 1) || !strcmp(module->Name(), "IGNT")) { if (option) { // for ASV marks text in verse then put explanation at end of verse text.append(" <FS>["); @@ -93,7 +107,7 @@ char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *m startTag.setAttribute("swordFootnote", buf); } hide = false; - if (option) { + if (option) { text.append(startTag); text.append(tagText); } @@ -120,7 +134,7 @@ char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *m else tagText.append(*from); } return 0; - + /* if (!option) { // if we don't want footnotes char token[4096]; // cheese. Fix. |