This function is called for every token encountered in the input text.
90 MyUserData *u = (MyUserData *)userData;
95 if (!strncmp(token,
"WG", 2)) {
97 buf +=
" <small><em class=\"strongs\"><<a href=\"passagestudy.jsp?action=showStrongs&type=Greek&value=";
98 for (tok = token+2; *tok; tok++)
101 buf +=
"\" class=\"strongs\">";
102 for (tok = token + 2; *tok; tok++)
105 buf +=
"</a>></em></small>";
107 else if (!strncmp(token,
"WH", 2)) {
109 buf +=
" <small><em class=\"strongs\"><<a href=\"passagestudy.jsp?action=showStrongs&type=Hebrew&value=";
110 for (tok = token+2; *tok; tok++)
113 buf +=
"\" class=\"strongs\">";
114 for (tok = token + 2; *tok; tok++)
117 buf +=
"</a>></em></small>";
119 else if (!strncmp(token,
"WTG", 3)) {
121 buf +=
" <small><em class=\"strongs\">(<a href=\"passagestudy.jsp?action=showStrongs&type=Greek&value=";
122 for (tok = token + 3; *tok; tok++)
125 buf +=
"\" class=\"strongs\">";
126 for (tok = token + 3; *tok; tok++)
129 buf +=
"</a>)</em></small>";
131 else if (!strncmp(token,
"WTH", 3)) {
133 buf +=
" <small><em class=\"strongs\">(<a href=\"passagestudy.jsp?action=showStrongs&type=Hebrew&value=";
134 for (tok = token + 3; *tok; tok++)
137 buf +=
"\" class=\"strongs\">";
138 for (tok = token + 3; *tok; tok++)
141 buf +=
"</a>)</em></small>";
144 else if (!strncmp(token,
"WT", 2) && strncmp(token,
"WTH", 3) && strncmp(token,
"WTG", 3)) {
146 buf +=
" <small><em class=\"morph\">(<a href=\"passagestudy.jsp?action=showMorph&type=Greek&value=";
148 for (tok = token + 2; *tok; tok++)
151 buf +=
"\" class=\"morph\">";
152 for (tok = token + 2; *tok; tok++)
155 buf +=
"</a>)</em></small>";
158 else if (!strcmp(tag.getName(),
"RX")) {
160 for (tok = token + 3; *tok; tok++) {
161 if(*tok !=
'<' && *tok+1 !=
'R' && *tok+2 !=
'x') {
170 else if (!strcmp(tag.getName(),
"RF")) {
171 SWBuf type = tag.getAttribute(
"type");
172 SWBuf footnoteNumber = tag.getAttribute(
"swordFootnote");
173 SWBuf noteName = tag.getAttribute(
"n");
174 SWBuf classExtras =
"";
183 buf.
appendFormatted(
"<a class=\"noteMarker%s\" href=\"passagestudy.jsp?action=showNote&type=n&value=%s&module=%s&passage=%s\"><small><sup class=\"n\">*n%s</sup></small></a> ",
190 u->suspendTextPassThru =
true;
192 else if (!strcmp(tag.getName(),
"Rf")) {
193 u->suspendTextPassThru =
false;
218 else if (!strncmp(token,
"FN", 2)) {
219 buf +=
"<font face=\"";
220 for (tok = token + 2; *tok; tok++)
226 else if (!strncmp(token,
"CA", 2)) {
227 buf += (char)atoi(&token[2]);
SWBuf & appendFormatted(const char *format,...)
bool substituteToken(SWBuf &buf, const char *token)
const char * c_str() const
SWBuf & append(const char *str, long max=-1)
unsigned long size() const
static const SWBuf encode(const char *urlText)