#include <thmlgbf.h>
this filter converts ThML text to GBF text
Definition at line 33 of file thmlgbf.h.
virtual const char* SWFilter::getHeader |
( |
| ) |
const |
|
inlinevirtualinherited |
This method processes and appropriately modifies the text given it for a particular filter task
- Parameters
-
text | The text to be filtered/converted |
key | Current key That was used. |
module | Current module. |
- Returns
- 0
Implements SWFilter.
Definition at line 35 of file thmlgbf.cpp.
40 bool ampersand =
false;
47 for (text =
""; *from; from++) {
57 else if (*from ==
'&') {
60 memset(token, 0, 2048);
64 if (*from ==
';' && ampersand) {
67 if (!strncmp(
"nbsp", token, 4)) text +=
' ';
68 else if (!strncmp(
"quot", token, 4)) text +=
'"';
69 else if (!strncmp(
"amp", token, 3)) text +=
'&';
70 else if (!strncmp(
"lt", token, 2)) text +=
'<';
71 else if (!strncmp(
"gt", token, 2)) text +=
'>';
72 else if (!strncmp(
"brvbar", token, 6)) text +=
'�';
73 else if (!strncmp(
"sect", token, 4)) text +=
'�';
74 else if (!strncmp(
"copy", token, 4)) text +=
'�';
75 else if (!strncmp(
"laquo", token, 5)) text +=
'�';
76 else if (!strncmp(
"reg", token, 3)) text +=
'�';
77 else if (!strncmp(
"acute", token, 5)) text +=
'�';
78 else if (!strncmp(
"para", token, 4)) text +=
'�';
79 else if (!strncmp(
"raquo", token, 5)) text +=
'�';
81 else if (!strncmp(
"Aacute", token, 6)) text +=
'�';
82 else if (!strncmp(
"Agrave", token, 6)) text +=
'�';
83 else if (!strncmp(
"Acirc", token, 5)) text +=
'�';
84 else if (!strncmp(
"Auml", token, 4)) text +=
'�';
85 else if (!strncmp(
"Atilde", token, 6)) text +=
'�';
86 else if (!strncmp(
"Aring", token, 5)) text +=
'�';
87 else if (!strncmp(
"aacute", token, 6)) text +=
'�'
else if (!strncmp("agrave", token, 6)) text += '�';
else if (!strncmp("acirc", token, 5)) text += '�';
else if (!strncmp("auml", token, 4)) text += '�';
else if (!strncmp("atilde", token, 6)) text += '�';
else if (!strncmp("aring", token, 5)) text += '�';
else if (!strncmp("Eacute", token, 6)) text += '�';
else if (!strncmp("Egrave", token, 6)) text += '�';
else if (!strncmp("Ecirc", token, 5)) text += '�';
else if (!strncmp("Euml", token, 4)) text += '�';
else if (!strncmp("eacute", token, 6)) text += '�';
else if (!strncmp("egrave", token, 6)) text += '�';
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
88 else if (!strncmp(
"agrave", token, 6)) text +=
'�'
else if (!strncmp("acirc", token, 5)) text += '�';
else if (!strncmp("auml", token, 4)) text += '�';
else if (!strncmp("atilde", token, 6)) text += '�';
else if (!strncmp("aring", token, 5)) text += '�';
else if (!strncmp("Eacute", token, 6)) text += '�';
else if (!strncmp("Egrave", token, 6)) text += '�';
else if (!strncmp("Ecirc", token, 5)) text += '�';
else if (!strncmp("Euml", token, 4)) text += '�';
else if (!strncmp("eacute", token, 6)) text += '�';
else if (!strncmp("egrave", token, 6)) text += '�';
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
89 else if (!strncmp(
"acirc", token, 5)) text +=
'�'
else if (!strncmp("auml", token, 4)) text += '�';
else if (!strncmp("atilde", token, 6)) text += '�';
else if (!strncmp("aring", token, 5)) text += '�';
else if (!strncmp("Eacute", token, 6)) text += '�';
else if (!strncmp("Egrave", token, 6)) text += '�';
else if (!strncmp("Ecirc", token, 5)) text += '�';
else if (!strncmp("Euml", token, 4)) text += '�';
else if (!strncmp("eacute", token, 6)) text += '�';
else if (!strncmp("egrave", token, 6)) text += '�';
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
90 else if (!strncmp(
"auml", token, 4)) text +=
'�'
else if (!strncmp("atilde", token, 6)) text += '�';
else if (!strncmp("aring", token, 5)) text += '�';
else if (!strncmp("Eacute", token, 6)) text += '�';
else if (!strncmp("Egrave", token, 6)) text += '�';
else if (!strncmp("Ecirc", token, 5)) text += '�';
else if (!strncmp("Euml", token, 4)) text += '�';
else if (!strncmp("eacute", token, 6)) text += '�';
else if (!strncmp("egrave", token, 6)) text += '�';
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
91 else if (!strncmp(
"atilde", token, 6)) text +=
'�'
else if (!strncmp("aring", token, 5)) text += '�';
else if (!strncmp("Eacute", token, 6)) text += '�';
else if (!strncmp("Egrave", token, 6)) text += '�';
else if (!strncmp("Ecirc", token, 5)) text += '�';
else if (!strncmp("Euml", token, 4)) text += '�';
else if (!strncmp("eacute", token, 6)) text += '�';
else if (!strncmp("egrave", token, 6)) text += '�';
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
92 else if (!strncmp(
"aring", token, 5)) text +=
'�'
else if (!strncmp("Eacute", token, 6)) text += '�';
else if (!strncmp("Egrave", token, 6)) text += '�';
else if (!strncmp("Ecirc", token, 5)) text += '�';
else if (!strncmp("Euml", token, 4)) text += '�';
else if (!strncmp("eacute", token, 6)) text += '�';
else if (!strncmp("egrave", token, 6)) text += '�';
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
93 else if (!strncmp(
"Eacute", token, 6)) text +=
'�';
94 else if (!strncmp(
"Egrave", token, 6)) text +=
'�';
95 else if (!strncmp(
"Ecirc", token, 5)) text +=
'�';
96 else if (!strncmp(
"Euml", token, 4)) text +=
'�';
97 else if (!strncmp(
"eacute", token, 6)) text +=
'�'
else if (!strncmp("egrave", token, 6)) text += '�';
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
98 else if (!strncmp(
"egrave", token, 6)) text +=
'�'
else if (!strncmp("ecirc", token, 5)) text += '�';
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
99 else if (!strncmp(
"ecirc", token, 5)) text +=
'�'
else if (!strncmp("euml", token, 4)) text += '�';
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
100 else if (!strncmp(
"euml", token, 4)) text +=
'�'
else if (!strncmp("Iacute", token, 6)) text += '�';
else if (!strncmp("Igrave", token, 6)) text += '�';
else if (!strncmp("Icirc", token, 5)) text += '�';
else if (!strncmp("Iuml", token, 4)) text += '�';
else if (!strncmp("iacute", token, 6)) text += '�';
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
101 else if (!strncmp(
"Iacute", token, 6)) text +=
'�';
102 else if (!strncmp(
"Igrave", token, 6)) text +=
'�';
103 else if (!strncmp(
"Icirc", token, 5)) text +=
'�';
104 else if (!strncmp(
"Iuml", token, 4)) text +=
'�';
105 else if (!strncmp(
"iacute", token, 6)) text +=
'�'
else if (!strncmp("igrave", token, 6)) text += '�';
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
106 else if (!strncmp(
"igrave", token, 6)) text +=
'�'
else if (!strncmp("icirc", token, 5)) text += '�';
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
107 else if (!strncmp(
"icirc", token, 5)) text +=
'�'
else if (!strncmp("iuml", token, 4)) text += '�';
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
108 else if (!strncmp(
"iuml", token, 4)) text +=
'�'
else if (!strncmp("Oacute", token, 6)) text += '�';
else if (!strncmp("Ograve", token, 6)) text += '�';
else if (!strncmp("Ocirc", token, 5)) text += '�';
else if (!strncmp("Ouml", token, 4)) text += '�';
else if (!strncmp("Otilde", token, 6)) text += '�';
else if (!strncmp("oacute", token, 6)) text += '�';
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
109 else if (!strncmp(
"Oacute", token, 6)) text +=
'�';
110 else if (!strncmp(
"Ograve", token, 6)) text +=
'�';
111 else if (!strncmp(
"Ocirc", token, 5)) text +=
'�';
112 else if (!strncmp(
"Ouml", token, 4)) text +=
'�';
113 else if (!strncmp(
"Otilde", token, 6)) text +=
'�';
114 else if (!strncmp(
"oacute", token, 6)) text +=
'�'
else if (!strncmp("ograve", token, 6)) text += '�';
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
115 else if (!strncmp(
"ograve", token, 6)) text +=
'�'
else if (!strncmp("ocirc", token, 5)) text += '�';
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
116 else if (!strncmp(
"ocirc", token, 5)) text +=
'�'
else if (!strncmp("ouml", token, 4)) text += '�';
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
117 else if (!strncmp(
"ouml", token, 4)) text +=
'�'
else if (!strncmp("otilde", token, 6)) text += '�';
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
118 else if (!strncmp(
"otilde", token, 6)) text +=
'�'
else if (!strncmp("Uacute", token, 6)) text += '�';
else if (!strncmp("Ugrave", token, 6)) text += '�';
else if (!strncmp("Ucirc", token, 5)) text += '�';
else if (!strncmp("Uuml", token, 4)) text += '�';
else if (!strncmp("uacute", token, 6)) text += '�';
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
119 else if (!strncmp(
"Uacute", token, 6)) text +=
'�';
120 else if (!strncmp(
"Ugrave", token, 6)) text +=
'�';
121 else if (!strncmp(
"Ucirc", token, 5)) text +=
'�';
122 else if (!strncmp(
"Uuml", token, 4)) text +=
'�';
123 else if (!strncmp(
"uacute", token, 6)) text +=
'�'
else if (!strncmp("ugrave", token, 6)) text += '�';
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
124 else if (!strncmp(
"ugrave", token, 6)) text +=
'�'
else if (!strncmp("ucirc", token, 5)) text += '�';
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
125 else if (!strncmp(
"ucirc", token, 5)) text +=
'�'
else if (!strncmp("uuml", token, 4)) text += '�';
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
126 else if (!strncmp(
"uuml", token, 4)) text +=
'�'
else if (!strncmp("Yacute", token, 6)) text += '�';
else if (!strncmp("yacute", token, 6)) text += '�';
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
127 else if (!strncmp(
"Yacute", token, 6)) text +=
'�';
128 else if (!strncmp(
"yacute", token, 6)) text +=
'�'
else if (!strncmp("yuml", token, 4)) text += '�';
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
129 else if (!strncmp(
"yuml", token, 4)) text +=
'�'
else if (!strncmp("deg", token, 3)) text += '�';
else if (!strncmp("plusmn", token, 6)) text += '�';
else if (!strncmp("sup2", token, 4)) text += '�';
else if (!strncmp("sup3", token, 4)) text += '�';
else if (!strncmp("sup1", token, 4)) text += '�';
else if (!strncmp("nbsp", token, 4)) text += '�';
else if (!strncmp("pound", token, 5)) text += '�';
else if (!strncmp("cent", token, 4)) text += '�';
else if (!strncmp("frac14", token, 6)) text += '�';
else if (!strncmp("frac12", token, 6)) text += '�';
else if (!strncmp("frac34", token, 6)) text += '�';
else if (!strncmp("iquest", token, 6)) text += '�';
else if (!strncmp("iexcl", token, 5)) text += '�';
else if (!strncmp("ETH", token, 3)) text += '�';
else if (!strncmp("eth", token, 3)) text += '�';
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
131 else if (!strncmp(
"deg", token, 3)) text +=
'�';
132 else if (!strncmp(
"plusmn", token, 6)) text +=
'�';
133 else if (!strncmp(
"sup2", token, 4)) text +=
'�';
134 else if (!strncmp(
"sup3", token, 4)) text +=
'�';
135 else if (!strncmp(
"sup1", token, 4)) text +=
'�';
136 else if (!strncmp(
"nbsp", token, 4)) text +=
'�';
137 else if (!strncmp(
"pound", token, 5)) text +=
'�';
138 else if (!strncmp(
"cent", token, 4)) text +=
'�';
139 else if (!strncmp(
"frac14", token, 6)) text +=
'�';
140 else if (!strncmp(
"frac12", token, 6)) text +=
'�';
141 else if (!strncmp(
"frac34", token, 6)) text +=
'�';
142 else if (!strncmp(
"iquest", token, 6)) text +=
'�';
143 else if (!strncmp(
"iexcl", token, 5)) text +=
'�';
144 else if (!strncmp(
"ETH", token, 3)) text +=
'�';
145 else if (!strncmp(
"eth", token, 3)) text +=
'�'
else if (!strncmp("THORN", token, 5)) text += '�';
else if (!strncmp("thorn", token, 5)) text += '�';
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
146 else if (!strncmp(
"THORN", token, 5)) text +=
'�';
147 else if (!strncmp(
"thorn", token, 5)) text +=
'�'
else if (!strncmp("AElig", token, 5)) text += '�';
else if (!strncmp("aelig", token, 5)) text += '�';
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
148 else if (!strncmp(
"AElig", token, 5)) text +=
'�';
149 else if (!strncmp(
"aelig", token, 5)) text +=
'�'
else if (!strncmp("Oslash", token, 6)) text += '�';
else if (!strncmp("curren", token, 6)) text += '�';
else if (!strncmp("Ccedil", token, 6)) text += '�';
else if (!strncmp("ccedil", token, 6)) text += '�';
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
150 else if (!strncmp(
"Oslash", token, 6)) text +=
'�';
151 else if (!strncmp(
"curren", token, 6)) text +=
'�';
152 else if (!strncmp(
"Ccedil", token, 6)) text +=
'�';
153 else if (!strncmp(
"ccedil", token, 6)) text +=
'�'
else if (!strncmp("szlig", token, 5)) text += '�';
else if (!strncmp("Ntilde", token, 6)) text += '�';
else if (!strncmp("ntilde", token, 6)) text += '�';
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
154 else if (!strncmp(
"szlig", token, 5)) text +=
'�';
155 else if (!strncmp(
"Ntilde", token, 6)) text +=
'�';
156 else if (!strncmp(
"ntilde", token, 6)) text +=
'�'
else if (!strncmp("yen", token, 3)) text += '�';
else if (!strncmp("not", token, 3)) text += '�';
else if (!strncmp("ordf", token, 4)) text += '�';
else if (!strncmp("uml", token, 3)) text += '�';
else if (!strncmp("shy", token, 3)) text += '�';
else if (!strncmp("macr", token, 4)) text += '�';
else if (!strncmp("micro", token, 5)) text += "�";
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
;
157 else if (!strncmp(
"yen", token, 3)) text +=
'�';
158 else if (!strncmp(
"not", token, 3)) text +=
'�';
159 else if (!strncmp(
"ordf", token, 4)) text +=
'�';
160 else if (!strncmp(
"uml", token, 3)) text +=
'�';
161 else if (!strncmp(
"shy", token, 3)) text +=
'�';
162 else if (!strncmp(
"macr", token, 4)) text +=
'�';
163 else if (!strncmp(
"micro", token, 5)) text +=
"�;
else if (!strncmp("middot", token, 6)) text +="�";
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
";
164 else if (!strncmp(
"middot", token, 6)) text +=
"�;
else if (!strncmp("cedil", token, 5)) text += "�";
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
";
165 else if (!strncmp(
"cedil", token, 5)) text +=
"�;
else if (!strncmp("ordm", token, 4)) text += "�";
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
";
166 else if (!strncmp(
"ordm", token, 4)) text +=
"�;
else if (!strncmp("times", token, 5)) text += "�";
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
";
167 else if (!strncmp(
"times", token, 5)) text +=
"�;
else if (!strncmp("divide", token, 6)) text +="�";
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
";
168 else if (!strncmp(
"divide", token, 6)) text +=
"�;
else if (!strncmp("oslash", token, 6)) text +="�";
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
";
169 else if (!strncmp(
"oslash", token, 6)) text +=
"�;
continue;
}
else if (*from == '>' && !ampersand) {
intoken = false;
// process desired tokens
if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
text += "<W";
for (unsigned int i = 27; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
text += "<WT";
for (unsigned int i = 25; token[i] != '\"'; i++)
text += token[i];
text += '>';
continue;
}
else if (!strncmp(token, "scripRef", 8)) {
text += "<RX>";
continue;
}
else if (!strncmp(token, "/scripRef", 9)) {
text += "<Rx>";
continue;
}
else if (!strncmp(token, "note", 4)) {
text += "<RF>";
continue;
}
else if (!strncmp(token, "/note", 5)) {
text += "<Rf>";
continue;
}
else if (!strncmp(token, "sup", 3)) {
text += "<FS>";
}
else if (!strncmp(token, "/sup", 4)) {
text += "<Fs>";
}
else if (!strnicmp(token, "font color=#ff0000", 18)) {
text += "<FR>";
continue;
}
else if (!strnicmp(token, "/font", 5)) {
text += "<Fr>";
continue;
}
else if (!strncmp(token, "div class=\"sechead\"", 19)) {
text += "<TS>";
sechead = true;
continue;
}
else if (sechead && !strncmp(token, "/div", 19)) {
text += "<Ts>";
sechead = false;
continue;
}
else if (!strncmp(token, "div class=\"title\"", 19)) {
text += "<TT>";
title = true;
continue;
}
else if (title && !strncmp(token, "/div", 19)) {
text += "<Tt>";
title = false;
continue;
}
else if (!strnicmp(token, "br", 2)) {
text += "<CL>";
continue;
}
else switch(*token) {
case 'I': // font tags
case 'i':
text += "<FI>";
continue;
case 'B': // bold start
case 'b':
text += "<FB>";
continue;
case '/':
switch(token[1]) {
case 'P':
case 'p':
text += "<CM>";
continue;
case 'I':
case 'i': // italic end
text += "<Fi>";
continue;
case 'B': // bold start
case 'b':
text += "<Fb>";
continue;
}
}
continue;
}
if (intoken) {
if (tokpos < 2045) {
token[tokpos++] = *from;
// TODO: why is this + 2 ?
token[tokpos+2] = 0;
}
}
else text += *from;
}
orig = text;
from = orig.c_str();
for (text = ""; *from; from++) { //loop to remove extra spaces
if ((strchr(" \t\n\r", *from))) {
while (*(from+1) && (strchr(" \t\n\r", *(from+1)))) {
from++;
}
text += " ";
}
else {
text += *from;
}
}
text += (char)0;
return 0;
}
";
173 else if (*from ==
'>' && !ampersand) {
176 if (!strncmp(token,
"sync type=\"Strongs\" value=\"", 27)) {
178 for (
unsigned int i = 27; token[i] !=
'\"'; i++)
183 if (!strncmp(token,
"sync type=\"morph\" value=\"", 25)) {
185 for (
unsigned int i = 25; token[i] !=
'\"'; i++)
190 else if (!strncmp(token,
"scripRef", 8)) {
194 else if (!strncmp(token,
"/scripRef", 9)) {
198 else if (!strncmp(token,
"note", 4)) {
202 else if (!strncmp(token,
"/note", 5)) {
206 else if (!strncmp(token,
"sup", 3)) {
209 else if (!strncmp(token,
"/sup", 4)) {
212 else if (!
strnicmp(token,
"font color=#ff0000", 18)) {
216 else if (!
strnicmp(token,
"/font", 5)) {
220 else if (!strncmp(token,
"div class=\"sechead\"", 19)) {
225 else if (sechead && !strncmp(token,
"/div", 19)) {
230 else if (!strncmp(token,
"div class=\"title\"", 19)) {
235 else if (title && !strncmp(token,
"/div", 19)) {
240 else if (!
strnicmp(token,
"br", 2)) {
244 else switch(*token) {
273 token[tokpos++] = *from;
283 for (text =
""; *from; from++) {
284 if ((strchr(
" \t\n\r", *from))) {
285 while (*(from+1) && (strchr(
" \t\n\r", *(from+1)))) {
const char * c_str() const
int strnicmp(const char *s1, const char *s2, int len)
The documentation for this class was generated from the following files: