<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>thmlplain.cpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center>
<hr><h1>thmlplain.cpp</h1><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font>
00002 <font class="comment"> *</font>
00003 <font class="comment"> * thmlplain - SWFilter decendant to strip out all ThML tags or convert to</font>
00004 <font class="comment"> * ASCII rendered symbols.</font>
00005 <font class="comment"> */</font>
00006
00007
00008 <font class="preprocessor">#include <stdlib.h></font>
00009 <font class="preprocessor">#include <string.h></font>
00010 <font class="preprocessor">#include <thmlplain.h></font>
00011
00012
00013 ThMLPlain::ThMLPlain() {
00014 }
00015
00016
00017 <font class="keywordtype">char</font> ThMLPlain::ProcessText(<font class="keywordtype">char</font> *text, <font class="keywordtype">int</font> maxlen)
00018 {
00019 <font class="keywordtype">char</font> *to, *from, token[2048];
00020 <font class="keywordtype">int</font> tokpos = 0;
00021 <font class="keywordtype">bool</font> intoken = <font class="keyword">false</font>;
00022 <font class="keywordtype">int</font> len;
00023 <font class="keywordtype">bool</font> ampersand = <font class="keyword">false</font>;
00024
00025 len = strlen(text) + 1; <font class="comment">// shift string to right of buffer</font>
00026 <font class="keywordflow">if</font> (len < maxlen) {
00027 memmove(&text[maxlen - len], text, len);
00028 from = &text[maxlen - len];
00029 }
00030 <font class="keywordflow">else</font> from = text; <font class="comment">// -------------------------------</font>
00031
00032 <font class="keywordflow">for</font> (to = text; *from; from++) {
00033 <font class="keywordflow">if</font> (*from == 10 || *from == 13)
00034 from++;
00035 <font class="keywordflow">if</font> (*from == <font class="charliteral">'<'</font>) {
00036 intoken = <font class="keyword">true</font>;
00037 tokpos = 0;
00038 token[0] = 0;
00039 token[1] = 0;
00040 token[2] = 0;
00041 ampersand = <font class="keyword">false</font>;
00042 <font class="keywordflow">continue</font>;
00043 }
00044 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (*from == <font class="charliteral">'&'</font>) {
00045 intoken = <font class="keyword">true</font>;
00046 tokpos = 0;
00047 token[0] = 0;
00048 token[1] = 0;
00049 token[2] = 0;
00050 ampersand = <font class="keyword">true</font>;
00051 <font class="keywordflow">continue</font>;
00052 }
00053 <font class="keywordflow">if</font> (*from == <font class="charliteral">';'</font> && ampersand) {
00054 intoken = <font class="keyword">false</font>;
00055
00056 <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"nbsp"</font>, token, 4)) *to++ = <font class="charliteral">' '</font>;
00057 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"quot"</font>, token, 4)) *to++ = <font class="charliteral">'"'</font>;
00058 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"amp"</font>, token, 3)) *to++ = <font class="charliteral">'&'</font>;
00059 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"lt"</font>, token, 2)) *to++ = <font class="charliteral">'<'</font>;
00060 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"gt"</font>, token, 2)) *to++ = <font class="charliteral">'>'</font>;
00061 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"brvbar"</font>, token, 6)) *to++ = <font class="charliteral">'|'</font>;
00062 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"sect"</font>, token, 4)) *to++ = <font class="charliteral">'§'</font>;
00063 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"copy"</font>, token, 4)) *to++ = <font class="charliteral">'©'</font>;
00064 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"laquo"</font>, token, 5)) *to++ = <font class="charliteral">'«'</font>;
00065 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"reg"</font>, token, 3)) *to++ = <font class="charliteral">'®'</font>;
00066 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"acute"</font>, token, 5)) *to++ = <font class="charliteral">'´'</font>;
00067 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"para"</font>, token, 4)) *to++ = <font class="charliteral">'¶'</font>;
00068 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"raquo"</font>, token, 5)) *to++ = <font class="charliteral">'»'</font>;
00069
00070 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Aacute"</font>, token, 6)) *to++ = <font class="charliteral">'Á'</font>;
00071 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Agrave"</font>, token, 6)) *to++ = <font class="charliteral">'À'</font>;
00072 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Acirc"</font>, token, 5)) *to++ = <font class="charliteral">'Â'</font>;
00073 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Auml"</font>, token, 4)) *to++ = <font class="charliteral">'Ä'</font>;
00074 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Atilde"</font>, token, 6)) *to++ = <font class="charliteral">'Ã'</font>;
00075 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Aring"</font>, token, 5)) *to++ = <font class="charliteral">'Å'</font>;
00076 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"aacute"</font>, token, 6)) *to++ = <font class="charliteral">'á'</font>;
00077 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"agrave"</font>, token, 6)) *to++ = <font class="charliteral">'à'</font>;
00078 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"acirc"</font>, token, 5)) *to++ = <font class="charliteral">'â'</font>;
00079 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"auml"</font>, token, 4)) *to++ = <font class="charliteral">'ä'</font>;
00080 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"atilde"</font>, token, 6)) *to++ = <font class="charliteral">'ã'</font>;
00081 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"aring"</font>, token, 5)) *to++ = <font class="charliteral">'å'</font>;
00082 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Eacute"</font>, token, 6)) *to++ = <font class="charliteral">'É'</font>;
00083 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Egrave"</font>, token, 6)) *to++ = <font class="charliteral">'È'</font>;
00084 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ecirc"</font>, token, 5)) *to++ = <font class="charliteral">'Ê'</font>;
00085 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Euml"</font>, token, 4)) *to++ = <font class="charliteral">'Ë'</font>;
00086 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"eacute"</font>, token, 6)) *to++ = <font class="charliteral">'é'</font>;
00087 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"egrave"</font>, token, 6)) *to++ = <font class="charliteral">'è'</font>;
00088 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ecirc"</font>, token, 5)) *to++ = <font class="charliteral">'ê'</font>;
00089 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"euml"</font>, token, 4)) *to++ = <font class="charliteral">'ë'</font>;
00090 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Iacute"</font>, token, 6)) *to++ = <font class="charliteral">'Í'</font>;
00091 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Igrave"</font>, token, 6)) *to++ = <font class="charliteral">'Ì'</font>;
00092 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Icirc"</font>, token, 5)) *to++ = <font class="charliteral">'Î'</font>;
00093 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Iuml"</font>, token, 4)) *to++ = <font class="charliteral">'Ï'</font>;
00094 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"iacute"</font>, token, 6)) *to++ = <font class="charliteral">'í'</font>;
00095 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"igrave"</font>, token, 6)) *to++ = <font class="charliteral">'ì'</font>;
00096 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"icirc"</font>, token, 5)) *to++ = <font class="charliteral">'î'</font>;
00097 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"iuml"</font>, token, 4)) *to++ = <font class="charliteral">'ï'</font>;
00098 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Oacute"</font>, token, 6)) *to++ = <font class="charliteral">'Ó'</font>;
00099 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ograve"</font>, token, 6)) *to++ = <font class="charliteral">'Ò'</font>;
00100 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ocirc"</font>, token, 5)) *to++ = <font class="charliteral">'Ô'</font>;
00101 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ouml"</font>, token, 4)) *to++ = <font class="charliteral">'Ö'</font>;
00102 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Otilde"</font>, token, 6)) *to++ = <font class="charliteral">'Õ'</font>;
00103 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"oacute"</font>, token, 6)) *to++ = <font class="charliteral">'ó'</font>;
00104 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ograve"</font>, token, 6)) *to++ = <font class="charliteral">'ò'</font>;
00105 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ocirc"</font>, token, 5)) *to++ = <font class="charliteral">'ô'</font>;
00106 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ouml"</font>, token, 4)) *to++ = <font class="charliteral">'ö'</font>;
00107 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"otilde"</font>, token, 6)) *to++ = <font class="charliteral">'õ'</font>;
00108 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Uacute"</font>, token, 6)) *to++ = <font class="charliteral">'Ú'</font>;
00109 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ugrave"</font>, token, 6)) *to++ = <font class="charliteral">'Ù'</font>;
00110 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ucirc"</font>, token, 5)) *to++ = <font class="charliteral">'Û'</font>;
00111 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Uuml"</font>, token, 4)) *to++ = <font class="charliteral">'Ü'</font>;
00112 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"uacute"</font>, token, 6)) *to++ = <font class="charliteral">'ú'</font>;
00113 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ugrave"</font>, token, 6)) *to++ = <font class="charliteral">'ù'</font>;
00114 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ucirc"</font>, token, 5)) *to++ = <font class="charliteral">'û'</font>;
00115 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"uuml"</font>, token, 4)) *to++ = <font class="charliteral">'ü'</font>;
00116 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Yacute"</font>, token, 6)) *to++ = <font class="charliteral">'Ý'</font>;
00117 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"yacute"</font>, token, 6)) *to++ = <font class="charliteral">'ý'</font>;
00118 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"yuml"</font>, token, 4)) *to++ = <font class="charliteral">'ÿ'</font>;
00119
00120 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"deg"</font>, token, 3)) *to++ = <font class="charliteral">'°'</font>;
00121 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"plusmn"</font>, token, 6)) *to++ = <font class="charliteral">'±'</font>;
00122 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"sup2"</font>, token, 4)) *to++ = <font class="charliteral">'²'</font>;
00123 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"sup3"</font>, token, 4)) *to++ = <font class="charliteral">'³'</font>;
00124 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"sup1"</font>, token, 4)) *to++ = <font class="charliteral">'¹'</font>;
00125 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"nbsp"</font>, token, 4)) *to++ = <font class="charliteral">'º'</font>;
00126 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"pound"</font>, token, 5)) *to++ = <font class="charliteral">'£'</font>;
00127 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"cent"</font>, token, 4)) *to++ = <font class="charliteral">'¢'</font>;
00128 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"frac14"</font>, token, 6)) *to++ = <font class="charliteral">'¼'</font>;
00129 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"frac12"</font>, token, 6)) *to++ = <font class="charliteral">'½'</font>;
00130 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"frac34"</font>, token, 6)) *to++ = <font class="charliteral">'¾'</font>;
00131 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"iquest"</font>, token, 6)) *to++ = <font class="charliteral">'¿'</font>;
00132 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"iexcl"</font>, token, 5)) *to++ = <font class="charliteral">'¡'</font>;
00133 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ETH"</font>, token, 3)) *to++ = <font class="charliteral">'Ð'</font>;
00134 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"eth"</font>, token, 3)) *to++ = <font class="charliteral">'ð'</font>;
00135 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"THORN"</font>, token, 5)) *to++ = <font class="charliteral">'Þ'</font>;
00136 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"thorn"</font>, token, 5)) *to++ = <font class="charliteral">'þ'</font>;
00137 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"AElig"</font>, token, 5)) *to++ = <font class="charliteral">'Æ'</font>;
00138 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"aelig"</font>, token, 5)) *to++ = <font class="charliteral">'æ'</font>;
00139 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Oslash"</font>, token, 6)) *to++ = <font class="charliteral">'Ø'</font>;
00140 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"curren"</font>, token, 6)) *to++ = <font class="charliteral">'¤'</font>;
00141 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ccedil"</font>, token, 6)) *to++ = <font class="charliteral">'Ç'</font>;
00142 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ccedil"</font>, token, 6)) *to++ = <font class="charliteral">'ç'</font>;
00143 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"szlig"</font>, token, 5)) *to++ = <font class="charliteral">'ß'</font>;
00144 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"Ntilde"</font>, token, 6)) *to++ = <font class="charliteral">'Ñ'</font>;
00145 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ntilde"</font>, token, 6)) *to++ = <font class="charliteral">'ñ'</font>;
00146 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"yen"</font>, token, 3)) *to++ = <font class="charliteral">'¥'</font>;
00147 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"not"</font>, token, 3)) *to++ = <font class="charliteral">'¬'</font>;
00148 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"ordf"</font>, token, 4)) *to++ = <font class="charliteral">'ª'</font>;
00149 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"uml"</font>, token, 3)) *to++ = <font class="charliteral">'¨'</font>;
00150 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"shy"</font>, token, 3)) *to++ = <font class="charliteral">''</font>;
00151 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"macr"</font>, token, 4)) *to++ = <font class="charliteral">'¯'</font>;
00152 <font class="keywordflow">continue</font>;
00153
00154 }
00155 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (*from == <font class="charliteral">'>'</font> && !ampersand) {
00156 intoken = <font class="keyword">false</font>;
00157 <font class="comment">// process desired tokens</font>
00158 <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"sync type=\"Strongs\" value=\""</font>, 27)) {
00159 *to++ = <font class="charliteral">' '</font>;
00160 *to++ = <font class="charliteral">'<'</font>;
00161 <font class="keywordflow">for</font> (<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> i = 27; token[i] != <font class="charliteral">'\"'</font>; i++)
00162 *to++ = token[i];
00163 *to++ = <font class="charliteral">'>'</font>;
00164 <font class="keywordflow">continue</font>;
00165 }
00166 <font class="keywordflow">if</font> (!strncmp(token, <font class="stringliteral">"sync type=\"morph\" value=\""</font>, 25)) {
00167 *to++ = <font class="charliteral">' '</font>;
00168 *to++ = <font class="charliteral">'('</font>;
00169 <font class="keywordflow">for</font> (<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> i = 25; token[i] != <font class="charliteral">'\"'</font>; i++)
00170 *to++ = token[i];
00171 *to++ = <font class="charliteral">')'</font>;
00172 <font class="keywordflow">continue</font>;
00173 }
00174 <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"note"</font>, token, 4)) {
00175 *to++ = <font class="charliteral">' '</font>;
00176 *to++ = <font class="charliteral">'('</font>;
00177 }
00178 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"br"</font>, token, 2))
00179 *to++ = <font class="charliteral">'\n'</font>;
00180 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"/p"</font>, token, 2))
00181 *to++ = <font class="charliteral">'\n'</font>;
00182 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (!strncmp(<font class="stringliteral">"/note"</font>, token, 5)) {
00183 *to++ = <font class="charliteral">')'</font>;
00184 *to++ = <font class="charliteral">' '</font>;
00185 }
00186 <font class="keywordflow">continue</font>;
00187 }
00188 <font class="keywordflow">if</font> (intoken) {
00189 <font class="keywordflow">if</font> (tokpos < 2045)
00190 token[tokpos++] = *from;
00191 token[tokpos+2] = 0;
00192 }
00193 <font class="keywordflow">else</font> *to++ = *from;
00194 }
00195 *to++ = 0;
00196 *to = 0;
00197
00198 <font class="keywordflow">return</font> 0;
00199 }
00200
00201
</pre></div><hr><address align="right"><small>Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>