templeos-info/public/Wb/Home/Src/Compiler/LexLib.HC.HTML

307 lines
29 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
<pre id="content">
<a name="l1"></a><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>LexBackupLastChar</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc)
<a name="l2"></a>{
<a name="l3"></a> </span><span class=cF9>CLexFile</span><span class=cF0> *tmpf=cc-&gt;lex_include_stk;
<a name="l4"></a> tmpf-&gt;buf_ptr=cc-&gt;cur_buf_ptr;
<a name="l5"></a> </span><span class=cF1>if</span><span class=cF0> (cc-&gt;flags &amp; </span><span class=cF3>CCF_USE_LAST_U16</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l6"></a> tmpf-&gt;last_U16=cc-&gt;last_U16;
<a name="l7"></a> cc-&gt;flags&amp;=~</span><span class=cF3>CCF_USE_LAST_U16</span><span class=cF0>;
<a name="l8"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l9"></a> tmpf-&gt;last_U16=0;
<a name="l10"></a>}
<a name="l11"></a>
<a name="l12"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LexPush</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc)
<a name="l13"></a>{</span><span class=cF2>//Create token-stream save point.</span><span class=cF0>
<a name="l14"></a> </span><span class=cF9>CLexFile</span><span class=cF0> *tmpf;
<a name="l15"></a> </span><span class=cFD>LexBackupLastChar</span><span class=cF0>(cc);
<a name="l16"></a> </span><span class=cF1>if</span><span class=cF0> (cc-&gt;lex_include_stk-&gt;last_U16)
<a name="l17"></a> cc-&gt;flags|=</span><span class=cF3>CCF_USE_LAST_U16</span><span class=cF0>;
<a name="l18"></a> tmpf=</span><span class=cF5>MAllocIdent</span><span class=cF0>(cc-&gt;lex_include_stk);
<a name="l19"></a> tmpf-&gt;next=cc-&gt;lex_prs_stk;
<a name="l20"></a> cc-&gt;lex_prs_stk=tmpf;
<a name="l21"></a>}
<a name="l22"></a>
<a name="l23"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LexPopRestore</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc)
<a name="l24"></a>{</span><span class=cF2>//Restore token-stream saved-point.</span><span class=cF0>
<a name="l25"></a></span><span class=cF2>//Bad things can happen if you cross an #include file boundary.</span><span class=cF0>
<a name="l26"></a> </span><span class=cF9>CLexFile</span><span class=cF0> *tmpf=cc-&gt;lex_prs_stk;
<a name="l27"></a> cc-&gt;cur_buf_ptr=tmpf-&gt;buf_ptr;
<a name="l28"></a> </span><span class=cF1>if</span><span class=cF0> (cc-&gt;last_U16=tmpf-&gt;last_U16)
<a name="l29"></a> cc-&gt;flags|=</span><span class=cF3>CCF_USE_LAST_U16</span><span class=cF0>;
<a name="l30"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l31"></a> cc-&gt;flags&amp;=~</span><span class=cF3>CCF_USE_LAST_U16</span><span class=cF0>;
<a name="l32"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(cc-&gt;lex_include_stk</span><span class=cF7>(</span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>+</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>,tmpf</span><span class=cF7>(</span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>+</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>,
<a name="l33"></a> </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CLexFile</span><span class=cF7>)</span><span class=cF0>-</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>);
<a name="l34"></a> cc-&gt;lex_prs_stk=tmpf-&gt;next;
<a name="l35"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpf);
<a name="l36"></a>}
<a name="l37"></a>
<a name="l38"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>LexPopNoRestore</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc)
<a name="l39"></a>{</span><span class=cF2>//Don't restore token-stream saved-point.</span><span class=cF0>
<a name="l40"></a> </span><span class=cF9>CLexFile</span><span class=cF0> *tmpf=cc-&gt;lex_prs_stk;
<a name="l41"></a> cc-&gt;lex_prs_stk=tmpf-&gt;next;
<a name="l42"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpf);
<a name="l43"></a>}
<a name="l44"></a>
<a name="l45"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>MemberMetaData</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *needle_str,</span><span class=cF9>CMemberLst</span><span class=cF0> *haystack_member_lst)
<a name="l46"></a>{</span><span class=cF2>//Find meta data name, return meta data val. See </span><a href="/Wb/Demo/ClassMeta.HC.HTML#l1"><span class=cF4>::/Demo/ClassMeta.HC</span></a><span class=cF2>.</span><span class=cF0>
<a name="l47"></a> </span><span class=cF9>CMemberLstMeta</span><span class=cF0> *meta=haystack_member_lst-&gt;meta;
<a name="l48"></a> </span><span class=cF1>while</span><span class=cF0> (meta) </span><span class=cF7>{</span><span class=cF0>
<a name="l49"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>meta-&gt;str,needle_str</span><span class=cF7>)</span><span class=cF0>)
<a name="l50"></a> </span><span class=cF1>return</span><span class=cF0> meta-&gt;user_data;
<a name="l51"></a> meta=meta-&gt;next;
<a name="l52"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l53"></a> </span><span class=cF1>return</span><span class=cF0> 0;
<a name="l54"></a>}
<a name="l55"></a>
<a name="l56"></a></span><span class=cF9>CMemberLstMeta</span><span class=cF0> *</span><span class=cF5>MemberMetaFind</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *needle_str,</span><span class=cF9>CMemberLst</span><span class=cF0> *haystack_member_lst)
<a name="l57"></a>{</span><span class=cF2>//Find meta data name, return meta data struct. See </span><a href="/Wb/Demo/ClassMeta.HC.HTML#l1"><span class=cF4>::/Demo/ClassMeta.HC</span></a><span class=cF2>.</span><span class=cF0>
<a name="l58"></a> </span><span class=cF9>CMemberLstMeta</span><span class=cF0> *meta=haystack_member_lst-&gt;meta;
<a name="l59"></a> </span><span class=cF1>while</span><span class=cF0> (meta) </span><span class=cF7>{</span><span class=cF0>
<a name="l60"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>meta-&gt;str,needle_str</span><span class=cF7>)</span><span class=cF0>)
<a name="l61"></a> </span><span class=cF1>return</span><span class=cF0> meta;
<a name="l62"></a> meta=meta-&gt;next;
<a name="l63"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l64"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l65"></a>}
<a name="l66"></a>
<a name="l67"></a></span><span class=cF9>CMemberLst</span><span class=cF0> *</span><span class=cF5>MemberFind</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *needle_str,</span><span class=cF9>CHashClass</span><span class=cF0> *haystack_class)
<a name="l68"></a>{</span><span class=cF2>//Find class member. See </span><a href="/Wb/Adam/ADbg.HC.HTML#l161"><span class=cF4>ClassRep</span></a><span class=cF2>() and </span><a href="/Wb/Adam/DolDoc/DocForm.HC.HTML#l209"><span class=cF4>DocForm</span></a><span class=cF2>().</span><span class=cF0>
<a name="l69"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l70"></a> </span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm;
<a name="l71"></a> </span><span class=cF1>do</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l72"></a> tmpm=haystack_class-&gt;member_lst_and_root;
<a name="l73"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm) {
<a name="l74"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>i=</span><span class=cF5>StrCmp</span><span class=cF0>(tmpm-&gt;str,needle_str)</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l75"></a> tmpm-&gt;use_cnt++;
<a name="l76"></a> </span><span class=cF1>return</span><span class=cF0> tmpm;
<a name="l77"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l78"></a> </span><span class=cF1>if</span><span class=cF0> (i&lt;=0)
<a name="l79"></a> tmpm=tmpm-&gt;left;
<a name="l80"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l81"></a> tmpm=tmpm-&gt;right;
<a name="l82"></a> }
<a name="l83"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>while</span><span class=cF0> (haystack_class=haystack_class-&gt;base_class);
<a name="l84"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l85"></a>}
<a name="l86"></a>
<a name="l87"></a></span><span class=cF9>CMemberLst</span><span class=cF0> *</span><span class=cF5>MemberClassBaseFind</span><span class=cF0>(</span><span class=cF9>CHashClass</span><span class=cF0> *needle_class,
<a name="l88"></a> </span><span class=cF9>CHashClass</span><span class=cF0> *haystack_class)
<a name="l89"></a>{</span><span class=cF2>//Find class member class base. For finding dup class local vars.</span><span class=cF0>
<a name="l90"></a> </span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm;
<a name="l91"></a> tmpm=haystack_class-&gt;member_class_base_root;
<a name="l92"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm) </span><span class=cF7>{</span><span class=cF0>
<a name="l93"></a> </span><span class=cF1>if</span><span class=cF0> (needle_class==tmpm-&gt;member_class_base)
<a name="l94"></a> </span><span class=cF1>return</span><span class=cF0> tmpm;
<a name="l95"></a> </span><span class=cF1>if</span><span class=cF0> (needle_class&lt;tmpm-&gt;member_class_base)
<a name="l96"></a> tmpm=tmpm-&gt;left_class_base;
<a name="l97"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l98"></a> tmpm=tmpm-&gt;right_class_base;
<a name="l99"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l100"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l101"></a>}
<a name="l102"></a>
<a name="l103"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cFD>MemberAdd</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc,</span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm,</span><span class=cF9>CHashClass</span><span class=cF0> *tmpc,</span><span class=cF9>I64</span><span class=cF0> mode)
<a name="l104"></a>{
<a name="l105"></a> </span><span class=cF1>U8</span><span class=cF0> *st=tmpm-&gt;str;
<a name="l106"></a> </span><span class=cF9>CMemberLst</span><span class=cF0> **tmpm1,*tmpm2;
<a name="l107"></a>
<a name="l108"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>MemberFind</span><span class=cF7>(</span><span class=cF0>st,tmpc</span><span class=cF7>)</span><span class=cF0> &amp;&amp; </span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>st,</span><span class=cF6>&quot;pad&quot;</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l109"></a> </span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>st,</span><span class=cF6>&quot;reserved&quot;</span><span class=cF7>)</span><span class=cF0> &amp;&amp; </span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>st,</span><span class=cF6>&quot;_anon_&quot;</span><span class=cF7>)</span><span class=cF0>)
<a name="l110"></a> </span><span class=cF5>LexExcept</span><span class=cF0>(cc,</span><span class=cF6>&quot;Duplicate member at &quot;</span><span class=cF0>);
<a name="l111"></a> tmpm1=&amp;tmpc-&gt;member_lst_and_root;
<a name="l112"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm2=*tmpm1) </span><span class=cF7>{</span><span class=cF0>
<a name="l113"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>tmpm2-&gt;str,st</span><span class=cF7>)</span><span class=cF0>&lt;=0)
<a name="l114"></a> tmpm1=&amp;tmpm2-&gt;left;
<a name="l115"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l116"></a> tmpm1=&amp;tmpm2-&gt;right;
<a name="l117"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l118"></a> *tmpm1=tmpm;
<a name="l119"></a>
<a name="l120"></a> </span><span class=cF1>if</span><span class=cF0> (mode==</span><span class=cF3>PRS1B_LOCAL_VAR</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l121"></a> tmpm-&gt;member_class_base=
<a name="l122"></a> tmpm-&gt;member_class-tmpm-&gt;member_class-&gt;ptr_stars_cnt;
<a name="l123"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;cc-&gt;opts,</span><span class=cF3>OPTf_WARN_DUP_TYPES</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l124"></a> </span><span class=cF5>MemberClassBaseFind</span><span class=cF7>(</span><span class=cF0>tmpm-&gt;member_class_base,tmpc</span><span class=cF7>)</span><span class=cF0>)
<a name="l125"></a> </span><span class=cF5>LexWarn</span><span class=cF0>(cc,</span><span class=cF6>&quot;Duplicate type at &quot;</span><span class=cF0>);
<a name="l126"></a> tmpm1=&amp;tmpc-&gt;member_class_base_root;
<a name="l127"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm2=*tmpm1) {
<a name="l128"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm-&gt;member_class_base&lt;tmpm2-&gt;member_class_base)
<a name="l129"></a> tmpm1=&amp;tmpm2-&gt;left_class_base;
<a name="l130"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (tmpm-&gt;member_class_base&gt;tmpm2-&gt;member_class_base)
<a name="l131"></a> tmpm1=&amp;tmpm2-&gt;right_class_base;
<a name="l132"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l133"></a> tmpm1=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l134"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l135"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l136"></a> }
<a name="l137"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm1)
<a name="l138"></a> *tmpm1=tmpm;
<a name="l139"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l140"></a> tmpm-&gt;member_class_base=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l141"></a>
<a name="l142"></a> tmpm-&gt;left=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l143"></a> tmpm-&gt;right=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l144"></a> tmpm-&gt;left_class_base=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l145"></a> tmpm-&gt;right_class_base=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l146"></a> tmpm2=tmpc-&gt;last_in_member_lst;
<a name="l147"></a> tmpm2-&gt;next=tmpc-&gt;last_in_member_lst=tmpm;
<a name="l148"></a>}
<a name="l149"></a>
<a name="l150"></a></span><span class=cF9>CMemberLst</span><span class=cF0> *</span><span class=cFD>MemberLstNew</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> _reg)
<a name="l151"></a>{
<a name="l152"></a> </span><span class=cF9>CMemberLst</span><span class=cF0> *res=</span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CMemberLst</span><span class=cF7>)</span><span class=cF0>);
<a name="l153"></a> res-&gt;</span><span class=cF1>reg</span><span class=cF0>=_reg;
<a name="l154"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l155"></a>}
<a name="l156"></a>
<a name="l157"></a></span><span class=cF1>Bool</span><span class=cF0> </span><span class=cFD>MemberLstCmp</span><span class=cF0>(</span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm1,</span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm2,</span><span class=cF9>I64</span><span class=cF0> cnt=</span><span class=cF3>I64_MAX</span><span class=cF0>)
<a name="l158"></a>{
<a name="l159"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm1 &amp;&amp; tmpm2 &amp;&amp; cnt--) </span><span class=cF7>{</span><span class=cF0>
<a name="l160"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>tmpm1-&gt;str,tmpm2-&gt;str</span><span class=cF7>)</span><span class=cF0> ||
<a name="l161"></a> tmpm1-&gt;member_class!=tmpm2-&gt;member_class ||
<a name="l162"></a> tmpm1-&gt;member_class_base!=tmpm2-&gt;member_class_base)
<a name="l163"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l164"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm1-&gt;flags&amp;</span><span class=cF3>MLF_DFT_AVAILABLE</span><span class=cF0> || tmpm2-&gt;flags&amp;</span><span class=cF3>MLF_DFT_AVAILABLE</span><span class=cF0>) {
<a name="l165"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm1-&gt;flags&amp;</span><span class=cF7>(</span><span class=cF3>MLF_DFT_AVAILABLE</span><span class=cF0>|</span><span class=cF3>MLF_STR_DFT_AVAILABLE</span><span class=cF7>)</span><span class=cF0>!=
<a name="l166"></a> tmpm2-&gt;flags&amp;</span><span class=cF7>(</span><span class=cF3>MLF_DFT_AVAILABLE</span><span class=cF0>|</span><span class=cF3>MLF_STR_DFT_AVAILABLE</span><span class=cF7>)</span><span class=cF0>)
<a name="l167"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l168"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm1-&gt;flags&amp;</span><span class=cF3>MLF_STR_DFT_AVAILABLE</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l169"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>tmpm1-&gt;dft_val,tmpm2-&gt;dft_val</span><span class=cF7>)</span><span class=cF0>)
<a name="l170"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l171"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (tmpm1-&gt;dft_val!=tmpm2-&gt;dft_val)
<a name="l172"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l173"></a> }
<a name="l174"></a> tmpm1=tmpm1-&gt;next;
<a name="l175"></a> tmpm2=tmpm2-&gt;next;
<a name="l176"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l177"></a> </span><span class=cF1>if</span><span class=cF0> (cnt&lt;0 || !tmpm1 &amp;&amp; !tmpm2)
<a name="l178"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l179"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l180"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l181"></a>}
<a name="l182"></a>
<a name="l183"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>MemberLstDel</span><span class=cF0>(</span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm)
<a name="l184"></a>{
<a name="l185"></a> </span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm1;
<a name="l186"></a> </span><span class=cF9>CMemberLstMeta</span><span class=cF0> *tmp_meta,*tmp_meta1;
<a name="l187"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm) </span><span class=cF7>{</span><span class=cF0>
<a name="l188"></a> tmpm1=tmpm-&gt;next;
<a name="l189"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpm-&gt;str);
<a name="l190"></a> </span><span class=cF5>LinkedLstDel</span><span class=cF0>(tmpm-&gt;dim.next);
<a name="l191"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm-&gt;flags &amp; </span><span class=cF3>MLF_STR_DFT_AVAILABLE</span><span class=cF0>)
<a name="l192"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpm-&gt;dft_val);
<a name="l193"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm-&gt;flags &amp; </span><span class=cF3>MLF_FUN</span><span class=cF0>)
<a name="l194"></a> </span><span class=cF5>HashDel</span><span class=cF0>(tmpm-&gt;fun_ptr-tmpm-&gt;fun_ptr-&gt;ptr_stars_cnt);
<a name="l195"></a> tmp_meta=tmpm-&gt;meta;
<a name="l196"></a> </span><span class=cF1>while</span><span class=cF0> (tmp_meta) {
<a name="l197"></a> tmp_meta1=tmp_meta-&gt;next;
<a name="l198"></a> </span><span class=cF5>Free</span><span class=cF0>(tmp_meta-&gt;str);
<a name="l199"></a> </span><span class=cF1>if</span><span class=cF0> (tmp_meta-&gt;flags&amp;</span><span class=cF3>MLMF_IS_STR</span><span class=cF0>)
<a name="l200"></a> </span><span class=cF5>Free</span><span class=cF0>(tmp_meta-&gt;user_data);
<a name="l201"></a> </span><span class=cF5>Free</span><span class=cF0>(tmp_meta);
<a name="l202"></a> tmp_meta=tmp_meta1;
<a name="l203"></a> }
<a name="l204"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpm);
<a name="l205"></a> tmpm=tmpm1;
<a name="l206"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l207"></a>}
<a name="l208"></a>
<a name="l209"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>ClassMemberLstDel</span><span class=cF0>(</span><span class=cF9>CHashClass</span><span class=cF0> *tmpc)
<a name="l210"></a>{
<a name="l211"></a> </span><span class=cF5>MemberLstDel</span><span class=cF0>(tmpc-&gt;member_lst_and_root);
<a name="l212"></a> tmpc-&gt;size=0;
<a name="l213"></a> tmpc-&gt;last_in_member_lst=&amp;tmpc-&gt;member_lst_and_root;
<a name="l214"></a> tmpc-&gt;member_lst_and_root=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l215"></a> tmpc-&gt;member_class_base_root=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l216"></a> tmpc-&gt;member_cnt=0;
<a name="l217"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc-&gt;type&amp;</span><span class=cF3>HTT_FUN</span><span class=cF0>)
<a name="l218"></a> tmpc(</span><span class=cF9>CHashFun</span><span class=cF0> *)-&gt;arg_cnt=0;
<a name="l219"></a>}
<a name="l220"></a>
<a name="l221"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cFD>MemberLstSize</span><span class=cF0>(</span><span class=cF9>CHashClass</span><span class=cF0> *tmpc)
<a name="l222"></a>{
<a name="l223"></a> </span><span class=cF9>CMemberLst</span><span class=cF0> *tmpm;
<a name="l224"></a> </span><span class=cF9>CMemberLstMeta</span><span class=cF0> *tmp_meta;
<a name="l225"></a> </span><span class=cF9>I64</span><span class=cF0> res=0;
<a name="l226"></a> tmpm=tmpc-&gt;member_lst_and_root;
<a name="l227"></a> </span><span class=cF1>while</span><span class=cF0> (tmpm) </span><span class=cF7>{</span><span class=cF0>
<a name="l228"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(tmpm-&gt;str);
<a name="l229"></a> res+=</span><span class=cF5>LinkedLstSize</span><span class=cF0>(tmpm-&gt;dim.next);
<a name="l230"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm-&gt;flags &amp; </span><span class=cF3>MLF_STR_DFT_AVAILABLE</span><span class=cF0>)
<a name="l231"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(tmpm-&gt;dft_val);
<a name="l232"></a> </span><span class=cF1>if</span><span class=cF0> (tmpm-&gt;flags &amp; </span><span class=cF3>MLF_FUN</span><span class=cF0>)
<a name="l233"></a> res+=</span><span class=cF5>HashEntrySize2</span><span class=cF0>(tmpm-&gt;fun_ptr-tmpm-&gt;fun_ptr-&gt;ptr_stars_cnt);
<a name="l234"></a> tmp_meta=tmpm-&gt;meta;
<a name="l235"></a> </span><span class=cF1>while</span><span class=cF0> (tmp_meta) {
<a name="l236"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(tmp_meta-&gt;str);
<a name="l237"></a> </span><span class=cF1>if</span><span class=cF0> (tmp_meta-&gt;flags&amp;</span><span class=cF3>MLMF_IS_STR</span><span class=cF0>)
<a name="l238"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(tmp_meta-&gt;user_data);
<a name="l239"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(tmp_meta);
<a name="l240"></a> tmp_meta=tmp_meta-&gt;next;
<a name="l241"></a> }
<a name="l242"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(tmpm);
<a name="l243"></a> tmpm=tmpm-&gt;next;
<a name="l244"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l245"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l246"></a>}
<a name="l247"></a>
<a name="l248"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>LexExtStr</span><span class=cF0>(</span><span class=cF9>CCmpCtrl</span><span class=cF0> *cc,</span><span class=cF9>I64</span><span class=cF0> *_size=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF1>Bool</span><span class=cF0> lex_next=</span><span class=cF3>TRUE</span><span class=cF0>)
<a name="l249"></a>{</span><span class=cF2>//Lex </span><a href="/Wb/Kernel/KernelA.HH.HTML#l2084"><span class=cF4>TK_STR</span></a><span class=cF2>'s to one combined str. _size includes terminator.</span><span class=cF0>
<a name="l250"></a> </span><span class=cF9>I64</span><span class=cF0> len=cc-&gt;cur_str_len,len1,len2;
<a name="l251"></a> </span><span class=cF1>U8</span><span class=cF0> *st=cc-&gt;cur_str,*st1,*st2;
<a name="l252"></a> cc-&gt;cur_str=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l253"></a> </span><span class=cF1>while</span><span class=cF0> (cc-&gt;token==</span><span class=cF3>TK_STR</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l254"></a> st1=st;
<a name="l255"></a> len1=len;
<a name="l256"></a> </span><span class=cF1>if</span><span class=cF0> (!lex_next &amp;&amp; </span><span class=cF5>LexGetChar</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0>!=</span><span class=cF6>'\\'</span><span class=cF0>) {
<a name="l257"></a> cc-&gt;flags|=</span><span class=cF3>CCF_USE_LAST_U16</span><span class=cF0>;
<a name="l258"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l259"></a> }
<a name="l260"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Lex</span><span class=cF7>(</span><span class=cF0>cc</span><span class=cF7>)</span><span class=cF0>==</span><span class=cF3>TK_STR</span><span class=cF0>) {
<a name="l261"></a> len2=cc-&gt;cur_str_len;
<a name="l262"></a> st2=cc-&gt;cur_str;
<a name="l263"></a> cc-&gt;cur_str=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l264"></a> len=len1+len2-1;
<a name="l265"></a> st=</span><span class=cF5>MAlloc</span><span class=cF0>(len);
<a name="l266"></a> </span><span class=cF1>if</span><span class=cF0> (len1&gt;1)
<a name="l267"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(st,st1,len1-1);
<a name="l268"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(st+len1-1,st2,len2);
<a name="l269"></a> </span><span class=cF5>Free</span><span class=cF0>(st1);
<a name="l270"></a> </span><span class=cF5>Free</span><span class=cF0>(st2);
<a name="l271"></a> }
<a name="l272"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l273"></a> </span><span class=cF1>if</span><span class=cF0> (_size) *_size=len;
<a name="l274"></a> </span><span class=cF1>return</span><span class=cF0> st;
<a name="l275"></a>}
</span></pre></body>
</html>