diff options
Diffstat (limited to 'doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html')
-rw-r--r-- | doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html b/doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html new file mode 100644 index 0000000..a14509c --- /dev/null +++ b/doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html @@ -0,0 +1,69 @@ +<!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>utf8hebrewpoints.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>utf8hebrewpoints.cpp</h1><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font> +00002 <font class="comment"> *</font> +00003 <font class="comment"> * UTF8HebrewPoints - SWFilter decendant to remove UTF-8 Hebrew vowel points</font> +00004 <font class="comment"> *</font> +00005 <font class="comment"> */</font> +00006 +00007 +00008 <font class="preprocessor">#include <stdlib.h></font> +00009 <font class="preprocessor">#include <stdio.h></font> +00010 <font class="preprocessor">#include <utf8hebrewpoints.h></font> +00011 +00012 +00013 <font class="keyword">const</font> <font class="keywordtype">char</font> UTF8HebrewPoints::on[] = <font class="stringliteral">"On"</font>; +00014 <font class="keyword">const</font> <font class="keywordtype">char</font> UTF8HebrewPoints::off[] = <font class="stringliteral">"Off"</font>; +00015 <font class="keyword">const</font> <font class="keywordtype">char</font> UTF8HebrewPoints::optName[] = <font class="stringliteral">"Hebrew Vowel Points"</font>; +00016 <font class="keyword">const</font> <font class="keywordtype">char</font> UTF8HebrewPoints::optTip[] = <font class="stringliteral">"Toggles Hebrew Vowel Points"</font>; +00017 +00018 UTF8HebrewPoints::UTF8HebrewPoints() { +00019 option = <font class="keyword">true</font>; +00020 options.push_back(on); +00021 options.push_back(off); +00022 } +00023 +00024 UTF8HebrewPoints::~UTF8HebrewPoints(){}; +00025 +00026 <font class="keywordtype">void</font> UTF8HebrewPoints::setOptionValue(<font class="keyword">const</font> <font class="keywordtype">char</font> *ival) +00027 { +00028 option = (!stricmp(ival, on)); +00029 } +00030 +00031 <font class="keyword">const</font> <font class="keywordtype">char</font> *UTF8HebrewPoints::getOptionValue() +00032 { +00033 <font class="keywordflow">return</font> (option) ? on:off; +00034 } +00035 +00036 <font class="keywordtype">char</font> UTF8HebrewPoints::ProcessText(<font class="keywordtype">char</font> *text, <font class="keywordtype">int</font> maxlen, <font class="keyword">const</font> <a class="code" href="class_s_w_key.html">SWKey</a> *key, <font class="keyword">const</font> <a class="code" href="class_s_w_module.html">SWModule</a> *module) +00037 { +00038 <font class="keywordflow">if</font> (!option) { +00039 <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> *to, *from; +00040 +00041 to = (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font>*)text; +00042 <font class="comment">//The UTF-8 range 0xD6 0xB0 to 0xD6 0xBF excluding 0xD6 0x consist of Hebrew cantillation marks so block those out.</font> +00043 <font class="keywordflow">for</font> (from = (<font class="keywordtype">unsigned</font> <font class="keywordtype">char</font>*)text; *from; from++) { +00044 <font class="keywordflow">if</font> ((*from == 0xD6) && (*(from + 1) >= 0xB0 && *(from + 1) <= 0xBF) && (*(from + 1) != 0xBE)) { +00045 from++; +00046 } +00047 <font class="keywordflow">else</font> { +00048 *to++ = *from; +00049 } +00050 } +00051 *to++ = 0; +00052 *to = 0; +00053 } +00054 <font class="keywordflow">return</font> 0; +00055 } +</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> |