summaryrefslogtreecommitdiff
path: root/src/modules/filters/plainhtml.cpp
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
commit7a00574163029c0c2b649878c95d5acbd083564a (patch)
treec13cc5736025834df2874ed87ee8598070025ea6 /src/modules/filters/plainhtml.cpp
parentb745315323de9f27538edac9453205ca70e6186e (diff)
Imported Upstream version 1.7.2+dfsg
Diffstat (limited to 'src/modules/filters/plainhtml.cpp')
-rw-r--r--src/modules/filters/plainhtml.cpp89
1 files changed, 0 insertions, 89 deletions
diff --git a/src/modules/filters/plainhtml.cpp b/src/modules/filters/plainhtml.cpp
deleted file mode 100644
index 3f989fa..0000000
--- a/src/modules/filters/plainhtml.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/***************************************************************************
- * plainhtml.cpp - description
- * -------------------
- * begin : Thu Jun 24 1999
- * copyright : (C) 1999 by Torsten Uhlmann
- * email : TUhlmann@gmx.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 <plainhtml.h>
-#include <swbuf.h>
-
-SWORD_NAMESPACE_START
-
-PLAINHTML::PLAINHTML()
-{
-}
-
-
-char PLAINHTML::processText(SWBuf &text, const SWKey *key, const SWModule *module)
-{
- int count = 0;
-
- SWBuf orig = text;
- const char *from = orig.c_str();
- for (text = ""; *from; from++)
- {
- if ((*from == '\n') && (from[1] == '\n')) // two newlinea are a paragraph
- {
- text += "<P>";
- from++;
- continue;
- } else {
- if ((*from == '\n')) // && (from[1] != '\n')) // only one new line
- {
- text += "<BR>";
- continue;
- }
- }
-
- if (*from == '{') { //footnote start
- text += "<FONT COLOR=\"#80000\"><SMALL> (";
- continue;
- }
- else if (*from == '}') //footnote end
- {
- text += ") </SMALL></FONT>";
- continue;
- }
- else if (*from == '<') {
- text += "&lt;";
- continue;
- }
- else if (*from == '>') {
- text += "&gt;";
- continue;
- }
- else if (*from == '&') {
- text += "&amp;";
- continue;
- }
- else if ((*from == ' ') && (count > 5000))
- {
- text += "<WBR>";
- count = 0;
- continue;
- }
-
- text += *from;
- count++;
- }
- return 0;
-}
-
-SWORD_NAMESPACE_END