diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-05-12 08:21:30 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-05-12 08:21:30 -0400 |
commit | 7a00574163029c0c2b649878c95d5acbd083564a (patch) | |
tree | c13cc5736025834df2874ed87ee8598070025ea6 /src/modules/filters/plainfootnotes.cpp | |
parent | b745315323de9f27538edac9453205ca70e6186e (diff) |
Imported Upstream version 1.7.2+dfsg
Diffstat (limited to 'src/modules/filters/plainfootnotes.cpp')
-rw-r--r-- | src/modules/filters/plainfootnotes.cpp | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/src/modules/filters/plainfootnotes.cpp b/src/modules/filters/plainfootnotes.cpp deleted file mode 100644 index 449f7da..0000000 --- a/src/modules/filters/plainfootnotes.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/*************************************************************************** - * plainfootnotes.cpp - description - * ------------------- - * begin : Wed Oct 13 1999 - * copyright : (C) 1999 by The team of BibleTime - * email : info@bibletime.de - * - * 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. - * - */ - -#include <plainfootnotes.h> -#include <swkey.h> - -#include <stdlib.h> - -SWORD_NAMESPACE_START - -const char oName[] = "Footnotes"; -const char oTip[] = "Toggles Footnotes On and Off In Bible Texts If They Exist"; - -const SWBuf choices[3] = {"Off", "On", ""}; -const StringList oValues(&choices[0], &choices[2]); - -PLAINFootnotes::PLAINFootnotes() : SWOptionFilter(oName, oTip, &oValues) { - setOptionValue("Off"); -} - -PLAINFootnotes::~PLAINFootnotes(){ -} - - -char PLAINFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) { - if (!option) { // if we don't want footnotes - //char token[2048]; - //SWBuf token; - //int tokpos = 0; - //bool intoken = false; - //bool lastspace = false; - - bool hide = false; - - SWBuf orig = text; - const char *from = orig.c_str(); - for (text = ""; *from; from++) { - if (*from == '{') // Footnote start - { - hide = true; - continue; - } - else if (*from == '}') // Footnote end - { - hide = false; - continue; - } - - //if (intoken) { - //if (tokpos < 2045) - // token += *from; - // token[tokpos+2] = 0; - //} - //else { - if (!hide) { - text = *from; - //lastspace = (*from == ' '); - } - //} - } - } - return 0; -} - -SWORD_NAMESPACE_END |