ZealOS/docs/System/DolDoc/DocHighlight.CC

255 lines
25 KiB
HolyC
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V0.05">
<style type="text/css">
body {background-color:#000000;}
.cF0{color:#ffffff;background-color:#000000;}
.cF1{color:#3465a4;background-color:#000000;}
.cF2{color:#4e9a06;background-color:#000000;}
.cF3{color:#06989a;background-color:#000000;}
.cF4{color:#a24444;background-color:#000000;}
.cF5{color:#75507b;background-color:#000000;}
.cF6{color:#ce982f;background-color:#000000;}
.cF7{color:#bcc0b9;background-color:#000000;}
.cF8{color:#555753;background-color:#000000;}
.cF9{color:#729fcf;background-color:#000000;}
.cFA{color:#82bc49;background-color:#000000;}
.cFB{color:#34e2e2;background-color:#000000;}
.cFC{color:#ac3535;background-color:#000000;}
.cFD{color:#ad7fa8;background-color:#000000;}
.cFE{color:#fce94f;background-color:#000000;}
.cFF{color:#000000;background-color:#000000;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;DolDoc/Misc&quot;</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a></span><span class=cF9>CColorROPU32</span><span class=cF0> </span><span class=cFB>highlight_hash_type_colors</span><span class=cF0>[</span><span class=cF3>HTt_TYPES_NUM</span><span class=cF0>] =
<a name="l4"></a> </span><span class=cF3>DOC_COLOR_EXPORT_SYS_SYM</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>DOC_COLOR_DEFINE_STR</span><span class=cF0>, </span><span class=cF3>DOC_COLOR_GLOBAL_VAR</span><span class=cF0>,
<a name="l5"></a> </span><span class=cF3>DOC_COLOR_CLASS</span><span class=cF0>, </span><span class=cF3>DOC_COLOR_KEYWORD</span><span class=cF0>, </span><span class=cF3>DOC_COLOR_FUN</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>DOC_COLOR_KEYWORD</span><span class=cF0>,
<a name="l6"></a> </span><span class=cF3>DOC_COLOR_KEYWORD</span><span class=cF0>, </span><span class=cF3>DOC_COLOR_KEYWORD</span><span class=cF0>, </span><span class=cF3>DOC_COLOR_REG</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF7>}</span><span class=cF0>;
<a name="l7"></a>
<a name="l8"></a></span><span class=cF9>U32</span><span class=cF0> *</span><span class=cF5>DocHighlight</span><span class=cF0>(</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e, </span><span class=cF1>U8</span><span class=cF0> *src, </span><span class=cF9>I64</span><span class=cF0> len, </span><span class=cF9>I64</span><span class=cF0> _tmp_u32_attr)
<a name="l9"></a></span><span class=cF7>{</span><span class=cF2>//Be aware of </span><a href="https://tomawezome.github.io/ZealOS/Demo/ToHtmlToTXTDemo/ToHtml.html#l1"><span class=cF4>::/Demo/ToHtmlToTXTDemo/ToHtml.CC</span></a><span class=cF2>.</span><span class=cF0>
<a name="l10"></a> </span><span class=cF9>U32</span><span class=cF0> *res = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF7>(</span><span class=cF0>len + </span><span class=cFE>1</span><span class=cF7>)</span><span class=cF0> * </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>U32</span><span class=cF7>)</span><span class=cF0>), *dst = res;
<a name="l11"></a> </span><span class=cF1>U8</span><span class=cF0> *ptr;
<a name="l12"></a> </span><span class=cF9>CDocSettings</span><span class=cF0> *s = &amp;doc_e-&gt;settings;
<a name="l13"></a> </span><span class=cF9>I64</span><span class=cF0> count, ch, ch1, ch2, last_ch, tmp_u32_attr, mask_tmp_u32_attr = _tmp_u32_attr &amp; </span><span class=cFE>0xFFFFF000</span><span class=cF0>,
<a name="l14"></a> comment_depth, brace_depth = s-&gt;brace_depth, paren_depth = s-&gt;paren_depth;
<a name="l15"></a> </span><span class=cF9>CHash</span><span class=cF0> *tmph;
<a name="l16"></a>
<a name="l17"></a> </span><span class=cF1>switch</span><span class=cF0> [s-&gt;state]
<a name="l18"></a> {
<a name="l19"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>DOCSS_NORMAL</span><span class=cF0>:
<a name="l20"></a>hl_normal:
<a name="l21"></a> </span><span class=cF1>while</span><span class=cF0> (len)
<a name="l22"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l23"></a> </span><span class=cF1>while</span><span class=cF0> (len &amp;&amp; !</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>char_bmp_alpha_numeric</span><span class=cF0>, *src</span><span class=cF7>)</span><span class=cF0>)
<a name="l24"></a> {
<a name="l25"></a> tmp_u32_attr = _tmp_u32_attr;
<a name="l26"></a> ch1 = *src++;
<a name="l27"></a> </span><span class=cF1>switch</span><span class=cF0> (ch1)
<a name="l28"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l29"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'/'</span><span class=cF0>:
<a name="l30"></a> </span><span class=cF1>if</span><span class=cF0> (len &gt;= </span><span class=cFE>2</span><span class=cF0>)
<a name="l31"></a> {
<a name="l32"></a> </span><span class=cF1>if</span><span class=cF0> (*src == </span><span class=cF6>'/'</span><span class=cF0>)
<a name="l33"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l34"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_COMMENT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l35"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l36"></a> *dst++ = *src++ + tmp_u32_attr;
<a name="l37"></a> len -= </span><span class=cFE>2</span><span class=cF0>;
<a name="l38"></a> </span><span class=cF1>goto</span><span class=cF0> hl_cpp_comment;
<a name="l39"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l40"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (*src == </span><span class=cF6>'*'</span><span class=cF0>)
<a name="l41"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l42"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_COMMENT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l43"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l44"></a> *dst++ = *src++ + tmp_u32_attr;
<a name="l45"></a> len -= </span><span class=cFE>2</span><span class=cF0>;
<a name="l46"></a> comment_depth = </span><span class=cFE>1</span><span class=cF0>;
<a name="l47"></a> </span><span class=cF1>goto</span><span class=cF0> hl_comment;
<a name="l48"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l49"></a> }
<a name="l50"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l51"></a>
<a name="l52"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\''</span><span class=cF0>:
<a name="l53"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_CHAR_CONST</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l54"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l55"></a> len--;
<a name="l56"></a> </span><span class=cF1>goto</span><span class=cF0> hl_single_quote;
<a name="l57"></a>
<a name="l58"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\&quot;'</span><span class=cF0>:
<a name="l59"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_STR</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l60"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l61"></a> len--;
<a name="l62"></a> </span><span class=cF1>goto</span><span class=cF0> hl_dbl_quote;
<a name="l63"></a>
<a name="l64"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'('</span><span class=cF0>:
<a name="l65"></a> </span><span class=cF1>if</span><span class=cF0> (paren_depth++ &amp; </span><span class=cFE>1</span><span class=cF0>)
<a name="l66"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_ALT_TEXT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l67"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l68"></a>
<a name="l69"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>')'</span><span class=cF0>:
<a name="l70"></a> </span><span class=cF1>if</span><span class=cF0> (--paren_depth &amp; </span><span class=cFE>1</span><span class=cF0>)
<a name="l71"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_ALT_TEXT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l72"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l73"></a>
<a name="l74"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'{'</span><span class=cF0>:
<a name="l75"></a> </span><span class=cF1>if</span><span class=cF0> (brace_depth++ &amp; </span><span class=cFE>1</span><span class=cF0>)
<a name="l76"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_ALT_TEXT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l77"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l78"></a>
<a name="l79"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'}'</span><span class=cF0>:
<a name="l80"></a> </span><span class=cF1>if</span><span class=cF0> (--brace_depth &amp; </span><span class=cFE>1</span><span class=cF0>)
<a name="l81"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_ALT_TEXT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l82"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l83"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l84"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l85"></a> </span><span class=cF1>if</span><span class=cF0> (!--len)
<a name="l86"></a> </span><span class=cF1>goto</span><span class=cF0> hl_normal_done;
<a name="l87"></a> }
<a name="l88"></a>
<a name="l89"></a> ptr = src;
<a name="l90"></a> </span><span class=cF1>if</span><span class=cF0> (*ptr++ == </span><span class=cF6>'0'</span><span class=cF0>)
<a name="l91"></a> {
<a name="l92"></a> ch2 = *ptr--;
<a name="l93"></a> </span><span class=cF1>if</span><span class=cF0> (ch2 == </span><span class=cF6>'x'</span><span class=cF0> || ch2 == </span><span class=cF6>'b'</span><span class=cF0>)
<a name="l94"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l95"></a> count = </span><span class=cFE>0</span><span class=cF0>;
<a name="l96"></a> </span><span class=cF1>while</span><span class=cF0> (len &amp;&amp; </span><span class=cF7>(</span><span class=cF5>Bt</span><span class=cF0>(</span><span class=cFB>char_bmp_hex_numeric</span><span class=cF0>, *src) || *src == ch2 &amp;&amp; count &lt; </span><span class=cFE>2</span><span class=cF7>)</span><span class=cF0>)
<a name="l97"></a> {
<a name="l98"></a> count++;
<a name="l99"></a> src++;
<a name="l100"></a> len--;
<a name="l101"></a> }
<a name="l102"></a> ch = *src;
<a name="l103"></a> *src = </span><span class=cF6>'\0'</span><span class=cF0>;
<a name="l104"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_NUMBER</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l105"></a> </span><span class=cF1>while</span><span class=cF0> (ch1 = *ptr++)
<a name="l106"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l107"></a> *src = ch;
<a name="l108"></a> </span><span class=cF1>if</span><span class=cF0> (!len)
<a name="l109"></a> </span><span class=cF1>goto</span><span class=cF0> hl_normal_done;
<a name="l110"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l111"></a> }
<a name="l112"></a>
<a name="l113"></a> ptr = src;
<a name="l114"></a> </span><span class=cF1>while</span><span class=cF0> (len &amp;&amp; </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>char_bmp_dec_numeric</span><span class=cF0>, *src</span><span class=cF7>)</span><span class=cF0>)
<a name="l115"></a> {
<a name="l116"></a> src++;
<a name="l117"></a> len--;
<a name="l118"></a> }
<a name="l119"></a> ch = *src;
<a name="l120"></a> *src = </span><span class=cF6>'\0'</span><span class=cF0>;
<a name="l121"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_NUMBER</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l122"></a> </span><span class=cF1>while</span><span class=cF0> (ch1 = *ptr++)
<a name="l123"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l124"></a> *src = ch;
<a name="l125"></a> </span><span class=cF1>if</span><span class=cF0> (!len)
<a name="l126"></a> </span><span class=cF1>goto</span><span class=cF0> hl_normal_done;
<a name="l127"></a>
<a name="l128"></a> ptr = src;
<a name="l129"></a> </span><span class=cF1>while</span><span class=cF0> (len &amp;&amp; </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>char_bmp_alpha_numeric</span><span class=cF0>, *src</span><span class=cF7>)</span><span class=cF0>)
<a name="l130"></a> {
<a name="l131"></a> src++;
<a name="l132"></a> len--;
<a name="l133"></a> }
<a name="l134"></a> ch = *src;
<a name="l135"></a> *src = </span><span class=cFE>0</span><span class=cF0>;
<a name="l136"></a> </span><span class=cF1>if</span><span class=cF0> (tmph=</span><span class=cF5>HashFind</span><span class=cF7>(</span><span class=cF0>ptr, </span><span class=cFB>sys_task</span><span class=cF0>-&gt;hash_table,
<a name="l137"></a> </span><span class=cF3>HTT_EXPORT_SYS_SYM</span><span class=cF0> | </span><span class=cF3>HTT_DEFINE_STR</span><span class=cF0> | </span><span class=cF3>HTT_GLOBAL_VAR</span><span class=cF0>|</span><span class=cF3>HTT_CLASS</span><span class=cF0> |
<a name="l138"></a> </span><span class=cF3>HTT_INTERNAL_TYPE</span><span class=cF0> | </span><span class=cF3>HTT_FUN</span><span class=cF0> | </span><span class=cF3>HTT_KEYWORD</span><span class=cF0> | </span><span class=cF3>HTT_ASM_KEYWORD</span><span class=cF0> |
<a name="l139"></a> </span><span class=cF3>HTT_OPCODE</span><span class=cF0> | </span><span class=cF3>HTT_REG</span><span class=cF7>)</span><span class=cF0>)
<a name="l140"></a> tmp_u32_attr = </span><span class=cFB>highlight_hash_type_colors</span><span class=cF0>[</span><span class=cF5>HashTypeNum</span><span class=cF0>(tmph)] &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l141"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l142"></a> tmp_u32_attr = _tmp_u32_attr;
<a name="l143"></a> </span><span class=cF1>while</span><span class=cF0> (ch1 = *ptr++)
<a name="l144"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l145"></a> *src = ch;
<a name="l146"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l147"></a>hl_normal_done:
<a name="l148"></a> s-&gt;state = </span><span class=cF3>DOCSS_NORMAL</span><span class=cF0>;
<a name="l149"></a> s-&gt;comment_depth = </span><span class=cFE>0</span><span class=cF0>;
<a name="l150"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l151"></a>
<a name="l152"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>DOCSS_SINGLE_QUOTE</span><span class=cF0>:
<a name="l153"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_CHAR_CONST</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l154"></a>hl_single_quote:
<a name="l155"></a> last_ch = </span><span class=cFE>0</span><span class=cF0>;
<a name="l156"></a> </span><span class=cF1>while</span><span class=cF0> (len--)
<a name="l157"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l158"></a> ch1 = *src++;
<a name="l159"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l160"></a> </span><span class=cF1>if</span><span class=cF0> (last_ch != </span><span class=cF6>'\\'</span><span class=cF0> &amp;&amp; ch1 == </span><span class=cF6>'\''</span><span class=cF0>)
<a name="l161"></a> </span><span class=cF1>goto</span><span class=cF0> hl_normal;
<a name="l162"></a> </span><span class=cF1>if</span><span class=cF0> (last_ch == </span><span class=cF6>'\\'</span><span class=cF0> &amp;&amp; ch1 == </span><span class=cF6>'\\'</span><span class=cF0>)
<a name="l163"></a> last_ch = </span><span class=cFE>0</span><span class=cF0>;
<a name="l164"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l165"></a> last_ch = ch1;
<a name="l166"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l167"></a> s-&gt;state = </span><span class=cF3>DOCSS_SINGLE_QUOTE</span><span class=cF0>;
<a name="l168"></a> s-&gt;comment_depth = </span><span class=cFE>0</span><span class=cF0>;
<a name="l169"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l170"></a>
<a name="l171"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>DOCSS_DBL_QUOTE</span><span class=cF0>:
<a name="l172"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_CHAR_CONST</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l173"></a>hl_dbl_quote:
<a name="l174"></a> last_ch = </span><span class=cFE>0</span><span class=cF0>;
<a name="l175"></a> </span><span class=cF1>while</span><span class=cF0> (len--)
<a name="l176"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l177"></a> ch1 = *src++;
<a name="l178"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l179"></a> </span><span class=cF1>if</span><span class=cF0> (last_ch != </span><span class=cF6>'\\'</span><span class=cF0> &amp;&amp; ch1 == </span><span class=cF6>'\&quot;'</span><span class=cF0>)
<a name="l180"></a> </span><span class=cF1>goto</span><span class=cF0> hl_normal;
<a name="l181"></a> </span><span class=cF1>if</span><span class=cF0> (last_ch == </span><span class=cF6>'\\'</span><span class=cF0> &amp;&amp; ch1 == </span><span class=cF6>'\\'</span><span class=cF0>)
<a name="l182"></a> last_ch = </span><span class=cFE>0</span><span class=cF0>;
<a name="l183"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l184"></a> last_ch = ch1;
<a name="l185"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l186"></a> s-&gt;state = </span><span class=cF3>DOCSS_DBL_QUOTE</span><span class=cF0>;
<a name="l187"></a> s-&gt;comment_depth = </span><span class=cFE>0</span><span class=cF0>;
<a name="l188"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l189"></a>
<a name="l190"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>DOCSS_COMMENT</span><span class=cF0>:
<a name="l191"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_COMMENT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l192"></a> comment_depth = s-&gt;comment_depth;
<a name="l193"></a>hl_comment:
<a name="l194"></a> last_ch = </span><span class=cFE>0</span><span class=cF0>;
<a name="l195"></a> </span><span class=cF1>while</span><span class=cF0> (len--)
<a name="l196"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l197"></a> ch1 = *src++;
<a name="l198"></a> *dst++ = ch1 + tmp_u32_attr;
<a name="l199"></a> </span><span class=cF1>if</span><span class=cF0> (last_ch == </span><span class=cF6>'*'</span><span class=cF0> &amp;&amp; ch1 == </span><span class=cF6>'/'</span><span class=cF0>)
<a name="l200"></a> {
<a name="l201"></a> </span><span class=cF1>if</span><span class=cF0> (!--comment_depth)
<a name="l202"></a> </span><span class=cF1>goto</span><span class=cF0> hl_normal;
<a name="l203"></a> }
<a name="l204"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (last_ch == </span><span class=cF6>'/'</span><span class=cF0> &amp;&amp; ch1 == </span><span class=cF6>'*'</span><span class=cF0>)
<a name="l205"></a> comment_depth++;
<a name="l206"></a> last_ch = ch1;
<a name="l207"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l208"></a> s-&gt;state = </span><span class=cF3>DOCSS_COMMENT</span><span class=cF0>;
<a name="l209"></a> s-&gt;comment_depth = comment_depth;
<a name="l210"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l211"></a>
<a name="l212"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>DOCSS_CPP_Z_COMMENT</span><span class=cF0>:
<a name="l213"></a> tmp_u32_attr = </span><span class=cF3>DOC_COLOR_COMMENT</span><span class=cF0> &lt;&lt; </span><span class=cFE>8</span><span class=cF0> | mask_tmp_u32_attr;
<a name="l214"></a>hl_cpp_comment:
<a name="l215"></a> </span><span class=cF1>while</span><span class=cF0> (len--)
<a name="l216"></a> *dst++ = *src++ + tmp_u32_attr;
<a name="l217"></a> s-&gt;state = </span><span class=cF3>DOCSS_CPP_Z_COMMENT</span><span class=cF0>;
<a name="l218"></a> s-&gt;comment_depth = </span><span class=cFE>0</span><span class=cF0>;
<a name="l219"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l220"></a> }
<a name="l221"></a> s-&gt;paren_depth = paren_depth;
<a name="l222"></a> s-&gt;brace_depth = brace_depth;
<a name="l223"></a> *dst = </span><span class=cFE>0</span><span class=cF0>;
<a name="l224"></a>
<a name="l225"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l226"></a></span><span class=cF7>}</span><span class=cF0>
</span></pre></body>
</html>