templeos-info/public/Wb/Adam/AHash.HC.HTML

463 lines
48 KiB
Plaintext
Raw Normal View History

2024-03-24 21:24:44 +00:00
<!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=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Info;Hash/System;Cmd Line (Typically)&quot;</span><span class=cF0>
<a name="l2"></a></span><span class=cF1>class</span><span class=cF0> </span><span class=cF9>CWho</span><span class=cF0>
<a name="l3"></a>{
<a name="l4"></a> </span><span class=cF9>CHashGeneric</span><span class=cF0> *h;
<a name="l5"></a> </span><span class=cF1>U8</span><span class=cF0> *idx;
<a name="l6"></a>};
<a name="l7"></a>
<a name="l8"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>HashEntriesCompare</span><span class=cF0>(</span><span class=cF9>CWho</span><span class=cF0> *h1,</span><span class=cF9>CWho</span><span class=cF0> *h2)
<a name="l9"></a>{
<a name="l10"></a> </span><span class=cF9>I64</span><span class=cF0> i1,i2;
<a name="l11"></a> </span><span class=cF1>if</span><span class=cF0> (i1=</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>h1-&gt;h-&gt;str,h2-&gt;h-&gt;str</span><span class=cF7>)</span><span class=cF0>)
<a name="l12"></a> </span><span class=cF1>return</span><span class=cF0> i1;
<a name="l13"></a> i1=</span><span class=cF5>HashTypeNum</span><span class=cF0>(h1-&gt;h);
<a name="l14"></a> i2=</span><span class=cF5>HashTypeNum</span><span class=cF0>(h2-&gt;h);
<a name="l15"></a> </span><span class=cF1>return</span><span class=cF0> i1-i2;
<a name="l16"></a>}
<a name="l17"></a>
<a name="l18"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>HashEntriesCompare2</span><span class=cF0>(</span><span class=cF9>CWho</span><span class=cF0> *h1,</span><span class=cF9>CWho</span><span class=cF0> *h2)
<a name="l19"></a>{
<a name="l20"></a> </span><span class=cF9>CHashFun</span><span class=cF0> *tmpf1=h1-&gt;h,*tmpf2=h2-&gt;h;
<a name="l21"></a> </span><span class=cF9>I64</span><span class=cF0> i1=</span><span class=cF5>HashVal</span><span class=cF0>(tmpf1),i2=</span><span class=cF5>HashVal</span><span class=cF0>(tmpf2);
<a name="l22"></a> </span><span class=cF1>if</span><span class=cF0> (i1==i2) </span><span class=cF7>{</span><span class=cF0>
<a name="l23"></a> i1=</span><span class=cF5>HashTypeNum</span><span class=cF0>(tmpf1);
<a name="l24"></a> i2=</span><span class=cF5>HashTypeNum</span><span class=cF0>(tmpf2);
<a name="l25"></a> </span><span class=cF1>if</span><span class=cF0> (i1==i2)
<a name="l26"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>StrCmp</span><span class=cF0>(tmpf1-&gt;str,tmpf2-&gt;str);
<a name="l27"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l28"></a> </span><span class=cF1>return</span><span class=cF0> i1-i2;
<a name="l29"></a>}
<a name="l30"></a>
<a name="l31"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>HelpIndexCnt</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *ptr,</span><span class=cF1>U8</span><span class=cF0> *idx)
<a name="l32"></a>{
<a name="l33"></a> </span><span class=cF9>I64</span><span class=cF0> cnt=0,ch,idx_len=</span><span class=cF5>StrLen</span><span class=cF0>(idx);
<a name="l34"></a> </span><span class=cF1>while</span><span class=cF0> (*ptr) </span><span class=cF7>{</span><span class=cF0>
<a name="l35"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrNCmp</span><span class=cF7>(</span><span class=cF0>ptr,idx,idx_len</span><span class=cF7>)</span><span class=cF0>)
<a name="l36"></a> cnt++;
<a name="l37"></a> </span><span class=cF1>while</span><span class=cF0> (ch=*ptr++)
<a name="l38"></a> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF6>';'</span><span class=cF0>)
<a name="l39"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (!ch)
<a name="l41"></a> ptr--;
<a name="l42"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l43"></a> </span><span class=cF1>return</span><span class=cF0> cnt;
<a name="l44"></a>}
<a name="l45"></a>
<a name="l46"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>HelpIndexStr</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> **_ptr,</span><span class=cF1>U8</span><span class=cF0> *idx)
<a name="l47"></a>{
<a name="l48"></a> </span><span class=cF1>U8</span><span class=cF0> *ptr=*_ptr,*ptr2,*res;
<a name="l49"></a> </span><span class=cF9>I64</span><span class=cF0> ch,idx_len=</span><span class=cF5>StrLen</span><span class=cF0>(idx);
<a name="l50"></a> </span><span class=cF1>while</span><span class=cF0> (*ptr) </span><span class=cF7>{</span><span class=cF0>
<a name="l51"></a> ptr2=ptr;
<a name="l52"></a> </span><span class=cF1>while</span><span class=cF0> (ch=*ptr++)
<a name="l53"></a> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF6>';'</span><span class=cF0>)
<a name="l54"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l55"></a> </span><span class=cF1>if</span><span class=cF0> (!ch)
<a name="l56"></a> ptr--;
<a name="l57"></a> *_ptr=ptr;
<a name="l58"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrNCmp</span><span class=cF7>(</span><span class=cF0>ptr2,idx,idx_len</span><span class=cF7>)</span><span class=cF0>) {
<a name="l59"></a> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF6>';'</span><span class=cF0>)
<a name="l60"></a> ptr--;
<a name="l61"></a> *ptr=0;
<a name="l62"></a> res=</span><span class=cF5>StrNew</span><span class=cF0>(ptr2);
<a name="l63"></a> *ptr=ch;
<a name="l64"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l65"></a> }
<a name="l66"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l67"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l68"></a>}
<a name="l69"></a>
<a name="l70"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>HelpComment</span><span class=cF0>(</span><span class=cF9>CTask</span><span class=cF0> *task,</span><span class=cF9>CHash</span><span class=cF0> *tmph,</span><span class=cF1>U8</span><span class=cF0> *_src_link)
<a name="l71"></a>{
<a name="l72"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
<a name="l73"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
<a name="l74"></a> </span><span class=cF1>U8</span><span class=cF0> *res=</span><span class=cF3>NULL</span><span class=cF0>,*ptr,*ptr2,*src_link=</span><span class=cF5>StrNew</span><span class=cF0>(_src_link);
<a name="l75"></a>
<a name="l76"></a> </span><span class=cF1>if</span><span class=cF0> (*src_link==</span><span class=cF6>'F'</span><span class=cF0> &amp;&amp; src_link[2]==</span><span class=cF6>':'</span><span class=cF0>)
<a name="l77"></a> *src_link=</span><span class=cF6>'P'</span><span class=cF0>;
<a name="l78"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task,</span><span class=cF6>&quot;Ed(0x%X,DOF_DONT_WINMGR_SYNC|DOF_DONT_SHOW);\n&quot;</span><span class=cF0>,src_link);
<a name="l79"></a> </span><span class=cF5>Free</span><span class=cF0>(src_link);
<a name="l80"></a>
<a name="l81"></a> doc=</span><span class=cF5>DocPut</span><span class=cF0>(task);
<a name="l82"></a> doc_e=doc-&gt;cur_entry;
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (tmph-&gt;type&amp;</span><span class=cF3>HTT_FUN</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l84"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;tmph(</span><span class=cF9>CHashFun</span><span class=cF0> *)-&gt;flags,</span><span class=cF3>Ff__EXTERN</span><span class=cF7>)</span><span class=cF0> ||
<a name="l85"></a> </span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;tmph(</span><span class=cF9>CHashFun</span><span class=cF0> *)-&gt;flags,</span><span class=cF3>Ff_INTERNAL</span><span class=cF7>)</span><span class=cF0>)
<a name="l86"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc &amp;&amp;
<a name="l87"></a> </span><span class=cF7>(</span><span class=cF0>!(doc_e-&gt;de_flags&amp;</span><span class=cF3>DOCEF_TAG</span><span class=cF0>)||!</span><span class=cF5>StrOcc</span><span class=cF0>(doc_e-&gt;tag,</span><span class=cF6>';'</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
<a name="l88"></a> doc_e=doc_e-&gt;next;
<a name="l89"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l90"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc &amp;&amp;
<a name="l91"></a> </span><span class=cF7>(</span><span class=cF0>!(doc_e-&gt;de_flags&amp;</span><span class=cF3>DOCEF_TAG</span><span class=cF0>)||!</span><span class=cF5>StrOcc</span><span class=cF0>(doc_e-&gt;tag,</span><span class=cF6>'{'</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
<a name="l92"></a> doc_e=doc_e-&gt;next;
<a name="l93"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l94"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e!=doc) </span><span class=cF7>{</span><span class=cF0>
<a name="l95"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags&amp;</span><span class=cF3>DOCEF_TAG</span><span class=cF0>) {
<a name="l96"></a> ptr=doc_e-&gt;tag;
<a name="l97"></a> </span><span class=cF1>if</span><span class=cF0> (ptr2=</span><span class=cF5>StrMatch</span><span class=cF7>(</span><span class=cF6>&quot;//&quot;</span><span class=cF0>,ptr</span><span class=cF7>)</span><span class=cF0>)
<a name="l98"></a> ptr=ptr2+2;
<a name="l99"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ptr2=</span><span class=cF5>StrMatch</span><span class=cF7>(</span><span class=cF6>&quot;/*&quot;</span><span class=cF0>,ptr</span><span class=cF7>)</span><span class=cF0>)
<a name="l100"></a> ptr=ptr2+2;
<a name="l101"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrNCmp</span><span class=cF7>(</span><span class=cF0>ptr,</span><span class=cF6>&quot;public&quot;</span><span class=cF0>,6</span><span class=cF7>)</span><span class=cF0>)
<a name="l102"></a> ptr+=6;
<a name="l103"></a> </span><span class=cF1>while</span><span class=cF0> (*ptr==</span><span class=cF3>CH_SPACE</span><span class=cF0>)
<a name="l104"></a> ptr++;
<a name="l105"></a> res=</span><span class=cF5>StrNew</span><span class=cF0>(ptr);
<a name="l106"></a> doc_e=doc_e-&gt;next;
<a name="l107"></a> }
<a name="l108"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc &amp;&amp; doc_e-&gt;type_u8!=</span><span class=cF3>DOCT_NEW_LINE</span><span class=cF0>) {
<a name="l109"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8==</span><span class=cF3>DOCT_TAB</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l110"></a> ptr=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%s &quot;</span><span class=cF0>,res);
<a name="l111"></a> </span><span class=cF5>Free</span><span class=cF0>(res);
<a name="l112"></a> res=ptr;
<a name="l113"></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> (doc_e-&gt;de_flags&amp;</span><span class=cF3>DOCEF_TAG</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l114"></a> ptr=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%s%s&quot;</span><span class=cF0>,res,doc_e-&gt;tag);
<a name="l115"></a> </span><span class=cF5>Free</span><span class=cF0>(res);
<a name="l116"></a> res=ptr;
<a name="l117"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l118"></a> doc_e=doc_e-&gt;next;
<a name="l119"></a> }
<a name="l120"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l121"></a> </span><span class=cF5>XTalkWait</span><span class=cF0>(task,</span><span class=cF6>&quot;%c&quot;</span><span class=cF0>,</span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
<a name="l122"></a> </span><span class=cF1>if</span><span class=cF0> (res) </span><span class=cF7>{</span><span class=cF0>
<a name="l123"></a> ptr=</span><span class=cF5>MStrUtil</span><span class=cF0>(res,</span><span class=cF3>SUF_REM_TRAILING</span><span class=cF0>|</span><span class=cF3>SUF_REM_LEADING</span><span class=cF0>|</span><span class=cF3>SUF_SINGLE_SPACE</span><span class=cF0>);
<a name="l124"></a> </span><span class=cF5>Free</span><span class=cF0>(res);
<a name="l125"></a> res=ptr;
<a name="l126"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l127"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l128"></a>}
<a name="l129"></a>
<a name="l130"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>HashEntriesCompare3</span><span class=cF0>(</span><span class=cF9>CWho</span><span class=cF0> *h1,</span><span class=cF9>CWho</span><span class=cF0> *h2)
<a name="l131"></a>{
<a name="l132"></a> </span><span class=cF9>I64</span><span class=cF0> i,i1=0,i2=0;
<a name="l133"></a> i=</span><span class=cF5>StrCmp</span><span class=cF0>(h1-&gt;idx,h2-&gt;idx);
<a name="l134"></a> </span><span class=cF1>if</span><span class=cF0> (i)
<a name="l135"></a> </span><span class=cF1>return</span><span class=cF0> i;
<a name="l136"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l137"></a> </span><span class=cF1>if</span><span class=cF0> (h1-&gt;h-&gt;type&amp;</span><span class=cF3>HTT_HELP_FILE</span><span class=cF0>)
<a name="l138"></a> i1=1;
<a name="l139"></a> </span><span class=cF1>if</span><span class=cF0> (h2-&gt;h-&gt;type&amp;</span><span class=cF3>HTT_HELP_FILE</span><span class=cF0>)
<a name="l140"></a> i2=1;
<a name="l141"></a> i=i2-i1;
<a name="l142"></a> </span><span class=cF1>if</span><span class=cF0> (i)
<a name="l143"></a> </span><span class=cF1>return</span><span class=cF0> i;
<a name="l144"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l145"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>StrCmp</span><span class=cF0>(h1-&gt;h-&gt;str,h2-&gt;h-&gt;str);
<a name="l146"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l147"></a>}
<a name="l148"></a>
<a name="l149"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>Who</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *fu_flags=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF9>CHashTable</span><span class=cF0> *h=</span><span class=cF3>NULL</span><span class=cF0>,
<a name="l150"></a></span><span class=cF1>U8</span><span class=cF0> *idx=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l151"></a>{</span><span class=cF2>//Dump hash symbol table.</span><span class=cF0>
<a name="l152"></a></span><span class=cF2>// &quot;+p&quot; for only public symbols</span><span class=cF0>
<a name="l153"></a> </span><span class=cF2>// &quot;+m&quot; to order by number (normally alphabetical)</span><span class=cF0>
<a name="l154"></a> </span><span class=cF2>// &quot;-r&quot; just local hash table</span><span class=cF0>
<a name="l155"></a> </span><span class=cF9>CHashTable</span><span class=cF0> *table;
<a name="l156"></a> </span><span class=cF9>CHashSrcSym</span><span class=cF0> *tmph;
<a name="l157"></a> </span><span class=cF9>CHashGeneric</span><span class=cF0> *ptr;
<a name="l158"></a> </span><span class=cF9>CWho</span><span class=cF0> *lst;
<a name="l159"></a> </span><span class=cF9>I64</span><span class=cF0> cnt,i,j,k,f=0;
<a name="l160"></a> </span><span class=cF1>U8</span><span class=cF0> buf[512],*last_idx=</span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF6>&quot;&quot;</span><span class=cF0>),*cur_idx,*comment;
<a name="l161"></a> </span><span class=cF1>Bool</span><span class=cF0> recurse,publics,map;
<a name="l162"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
<a name="l163"></a>
<a name="l164"></a> </span><span class=cF5>ScanFlags</span><span class=cF0>(&amp;f,</span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>&quot;ST_FILE_UTIL_FLAGS&quot;</span><span class=cF7>)</span><span class=cF0>,</span><span class=cF6>&quot;+r&quot;</span><span class=cF0>);
<a name="l165"></a> </span><span class=cF5>ScanFlags</span><span class=cF0>(&amp;f,</span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>&quot;ST_FILE_UTIL_FLAGS&quot;</span><span class=cF7>)</span><span class=cF0>,fu_flags);
<a name="l166"></a> </span><span class=cF1>if</span><span class=cF0> (f&amp;~</span><span class=cF7>(</span><span class=cF3>FUF_RECURSE</span><span class=cF0>|</span><span class=cF3>FUF_PUBLIC</span><span class=cF0>|</span><span class=cF3>FUF_MAP</span><span class=cF7>)</span><span class=cF0>)
<a name="l167"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'FUF'</span><span class=cF0>);
<a name="l168"></a> recurse=</span><span class=cF5>Bt</span><span class=cF0>(&amp;f,</span><span class=cF3>FUf_RECURSE</span><span class=cF0>);
<a name="l169"></a> publics=</span><span class=cF5>Bt</span><span class=cF0>(&amp;f,</span><span class=cF3>FUf_PUBLIC</span><span class=cF0>);
<a name="l170"></a> map =</span><span class=cF5>Bt</span><span class=cF0>(&amp;f,</span><span class=cF3>FUf_MAP</span><span class=cF0>);
<a name="l171"></a>
<a name="l172"></a> </span><span class=cF1>if</span><span class=cF0> (!h) h=</span><span class=cF5>Fs</span><span class=cF0>-&gt;hash_table;
<a name="l173"></a>
<a name="l174"></a> </span><span class=cF1>if</span><span class=cF0> (idx) </span><span class=cF7>{</span><span class=cF0>
<a name="l175"></a> task=</span><span class=cF5>User</span><span class=cF0>;
<a name="l176"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(task);
<a name="l177"></a> </span><span class=cF5>LBtr</span><span class=cF0>(&amp;task-&gt;display_flags,</span><span class=cF3>DISPLAYf_SHOW</span><span class=cF0>);
<a name="l178"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l179"></a> task=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l180"></a>
<a name="l181"></a> cnt=0;
<a name="l182"></a> table=h;
<a name="l183"></a> </span><span class=cF1>while</span><span class=cF0> (table) </span><span class=cF7>{</span><span class=cF0>
<a name="l184"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;=table-&gt;mask;i++) {
<a name="l185"></a> tmph=table-&gt;body[i];
<a name="l186"></a> </span><span class=cF1>while</span><span class=cF0> (tmph) </span><span class=cF7>{</span><span class=cF0>
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>tmph-&gt;type &amp; (</span><span class=cF3>HTF_IMPORT</span><span class=cF0> | </span><span class=cF3>HTF_PRIVATE</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l188"></a> </span><span class=cF7>(</span><span class=cF0>tmph-&gt;type &amp; </span><span class=cF3>HTF_PUBLIC</span><span class=cF0> || !publics</span><span class=cF7>)</span><span class=cF0>) {
<a name="l189"></a> </span><span class=cF1>if</span><span class=cF0> (!idx)
<a name="l190"></a> cnt++;
<a name="l191"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (tmph-&gt;type&amp;</span><span class=cF3>HTG_SRC_SYM</span><span class=cF0> &amp;&amp; </span><span class=cF7>(</span><span class=cF0>cur_idx=tmph-&gt;idx</span><span class=cF7>)</span><span class=cF0>)
<a name="l192"></a> cnt+=</span><span class=cF5>HelpIndexCnt</span><span class=cF0>(cur_idx,idx);
<a name="l193"></a> }
<a name="l194"></a> tmph=tmph-&gt;next;
<a name="l195"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l196"></a> }
<a name="l197"></a> </span><span class=cF1>if</span><span class=cF0> (recurse)
<a name="l198"></a> table=table-&gt;next;
<a name="l199"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l200"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l201"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l202"></a> </span><span class=cF1>if</span><span class=cF0> (!cnt) </span><span class=cF1>goto</span><span class=cF0> wh_done;
<a name="l203"></a>
<a name="l204"></a> lst=</span><span class=cF5>CAlloc</span><span class=cF0>(cnt*</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CWho</span><span class=cF7>)</span><span class=cF0>);
<a name="l205"></a> j=0;
<a name="l206"></a> table=h;
<a name="l207"></a> </span><span class=cF1>while</span><span class=cF0> (table) </span><span class=cF7>{</span><span class=cF0>
<a name="l208"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;=table-&gt;mask;i++) {
<a name="l209"></a> tmph=table-&gt;body[i];
<a name="l210"></a> </span><span class=cF1>while</span><span class=cF0> (tmph) </span><span class=cF7>{</span><span class=cF0>
<a name="l211"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>tmph-&gt;type &amp; (</span><span class=cF3>HTF_IMPORT</span><span class=cF0> | </span><span class=cF3>HTF_PRIVATE</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l212"></a> </span><span class=cF7>(</span><span class=cF0>tmph-&gt;type &amp; </span><span class=cF3>HTF_PUBLIC</span><span class=cF0> || !publics</span><span class=cF7>)</span><span class=cF0>)
<a name="l213"></a> </span><span class=cF1>if</span><span class=cF0> (!idx)
<a name="l214"></a> lst[j++].h=tmph;
<a name="l215"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (tmph-&gt;type&amp;</span><span class=cF3>HTG_SRC_SYM</span><span class=cF0> &amp;&amp; </span><span class=cF7>(</span><span class=cF0>cur_idx=tmph-&gt;idx</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l216"></a> </span><span class=cF7>(</span><span class=cF0>k=</span><span class=cF5>HelpIndexCnt</span><span class=cF0>(cur_idx,idx)</span><span class=cF7>)</span><span class=cF0>)
<a name="l217"></a> </span><span class=cF1>while</span><span class=cF0> (k--) {
<a name="l218"></a> lst[j].idx=</span><span class=cF5>HelpIndexStr</span><span class=cF0>(&amp;cur_idx,idx);
<a name="l219"></a> lst[j++].h=tmph;
<a name="l220"></a> }
<a name="l221"></a> tmph=tmph-&gt;next;
<a name="l222"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l223"></a> }
<a name="l224"></a> </span><span class=cF1>if</span><span class=cF0> (recurse)
<a name="l225"></a> table=table-&gt;next;
<a name="l226"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l227"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l228"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l229"></a>
<a name="l230"></a> </span><span class=cF1>if</span><span class=cF0> (map)
<a name="l231"></a> </span><span class=cF5>QSort</span><span class=cF0>(lst,cnt,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CWho</span><span class=cF7>)</span><span class=cF0>,&amp;</span><span class=cF5>HashEntriesCompare2</span><span class=cF0>);
<a name="l232"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (idx)
<a name="l233"></a> </span><span class=cF5>QSort</span><span class=cF0>(lst,cnt,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CWho</span><span class=cF7>)</span><span class=cF0>,&amp;</span><span class=cF5>HashEntriesCompare3</span><span class=cF0>);
<a name="l234"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l235"></a> </span><span class=cF5>QSort</span><span class=cF0>(lst,cnt,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CWho</span><span class=cF7>)</span><span class=cF0>,&amp;</span><span class=cF5>HashEntriesCompare</span><span class=cF0>);
<a name="l236"></a>
<a name="l237"></a> </span><span class=cF1>if</span><span class=cF0> (idx) </span><span class=cF7>{</span><span class=cF0>
<a name="l238"></a> </span><span class=cFB>progress1_max</span><span class=cF0>=cnt;
<a name="l239"></a> </span><span class=cFB>progress1</span><span class=cF0>=0;
<a name="l240"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l241"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;cnt;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l242"></a> comment=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l243"></a> ptr=lst[i].h;
<a name="l244"></a> </span><span class=cF1>if</span><span class=cF0> (idx)
<a name="l245"></a> </span><span class=cF1>if</span><span class=cF0> (cur_idx=lst[i].idx) {
<a name="l246"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>cur_idx,last_idx</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l247"></a> </span><span class=cF5>Free</span><span class=cF0>(last_idx);
<a name="l248"></a> last_idx=</span><span class=cF5>StrNew</span><span class=cF0>(cur_idx);
<a name="l249"></a> </span><span class=cF1>if</span><span class=cF0> (i)
<a name="l250"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;\n\n&quot;</span><span class=cF0>);
<a name="l251"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$WW,0$$PURPLE$$TX+CX,\&quot;%$Q\&quot;$$FG$\n&quot;</span><span class=cF0>,cur_idx);
<a name="l252"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l253"></a> }
<a name="l254"></a>
<a name="l255"></a> </span><span class=cF1>if</span><span class=cF0> (idx &amp;&amp; ptr-&gt;type &amp; </span><span class=cF3>HTT_HELP_FILE</span><span class=cF0>) {
<a name="l256"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$WW,1$&quot;</span><span class=cF0>);
<a name="l257"></a> </span><span class=cF5>DocType</span><span class=cF0>(doc,ptr-&gt;str);
<a name="l258"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$WW,0$&quot;</span><span class=cF0>);
<a name="l259"></a> } </span><span class=cF1>else</span><span class=cF0> {
<a name="l260"></a> </span><span class=cF1>if</span><span class=cF0> (ptr-&gt;type&amp;</span><span class=cF3>HTG_SRC_SYM</span><span class=cF0> &amp;&amp; ptr</span><span class=cF7>(</span><span class=cF9>CHashSrcSym</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>-&gt;src_link) </span><span class=cF7>{</span><span class=cF0>
<a name="l261"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$LK,\&quot;%-20s\&quot;,A=\&quot;%s\&quot;$&quot;</span><span class=cF0>,
<a name="l262"></a> ptr-&gt;str,ptr</span><span class=cF7>(</span><span class=cF9>CHashSrcSym</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>-&gt;src_link);
<a name="l263"></a> </span><span class=cF1>if</span><span class=cF0> (idx)
<a name="l264"></a> comment=</span><span class=cF5>HelpComment</span><span class=cF0>(task,ptr,ptr</span><span class=cF7>(</span><span class=cF9>CHashSrcSym</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>-&gt;src_link);
<a name="l265"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l266"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;%-20s&quot;</span><span class=cF0>,ptr-&gt;str);
<a name="l267"></a>
<a name="l268"></a> </span><span class=cF1>if</span><span class=cF0> (!idx) </span><span class=cF7>{</span><span class=cF0>
<a name="l269"></a> </span><span class=cF1>if</span><span class=cF0> (ptr-&gt;type &amp; </span><span class=cF3>HTT_DEFINE_STR</span><span class=cF0>) {
<a name="l270"></a> j=ptr(</span><span class=cF9>CHashDefineStr</span><span class=cF0> *)-&gt;cnt;
<a name="l271"></a> </span><span class=cF1>if</span><span class=cF0> (j==-1)
<a name="l272"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;%-10t$Q &quot;</span><span class=cF0>,ptr</span><span class=cF7>(</span><span class=cF9>CHashDefineStr</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>-&gt;data);
<a name="l273"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l274"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;%-10t$Q %02X&quot;</span><span class=cF0>,ptr</span><span class=cF7>(</span><span class=cF9>CHashDefineStr</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>-&gt;data,j);
<a name="l275"></a> } </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ptr-&gt;type &amp; </span><span class=cF3>HTT_GLBL_VAR</span><span class=cF0>)
<a name="l276"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;%010X &quot;</span><span class=cF0>,ptr</span><span class=cF7>(</span><span class=cF9>CHashGlblVar</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>-&gt;data_addr);
<a name="l277"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l278"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;%010X &quot;</span><span class=cF0>,</span><span class=cF5>HashVal</span><span class=cF7>(</span><span class=cF0>ptr</span><span class=cF7>)</span><span class=cF0>);
<a name="l279"></a> j=</span><span class=cF5>HashEntrySize</span><span class=cF0>(ptr);
<a name="l280"></a> </span><span class=cF1>if</span><span class=cF0> (j==-1)
<a name="l281"></a> </span><span class=cF5>CatPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot; %04X &quot;</span><span class=cF0>,ptr-&gt;use_cnt);
<a name="l282"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l283"></a> </span><span class=cF5>CatPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot; %04X %010X &quot;</span><span class=cF0>,ptr-&gt;use_cnt,j);
<a name="l284"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l285"></a> *buf=0;
<a name="l286"></a>
<a name="l287"></a> k=ptr-&gt;type;
<a name="l288"></a> </span><span class=cF1>if</span><span class=cF0> (publics)
<a name="l289"></a> k&amp;=~</span><span class=cF3>HTF_PUBLIC</span><span class=cF0>;
<a name="l290"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>k&amp;</span><span class=cF3>HTG_TYPE_MASK</span><span class=cF7>)</span><span class=cF0>)
<a name="l291"></a> </span><span class=cF5>CatPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;NULL &quot;</span><span class=cF0>);
<a name="l292"></a> </span><span class=cF1>while</span><span class=cF0> (k) </span><span class=cF7>{</span><span class=cF0>
<a name="l293"></a> j=</span><span class=cF5>Bsf</span><span class=cF0>(k);
<a name="l294"></a> </span><span class=cF1>if</span><span class=cF0> (j&lt;0)
<a name="l295"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l296"></a> </span><span class=cF5>Btr</span><span class=cF0>(&amp;k,j);
<a name="l297"></a> </span><span class=cF5>CatPrint</span><span class=cF0>(buf,</span><span class=cF6>&quot;%Z &quot;</span><span class=cF0>,j,</span><span class=cF6>&quot;ST_HTT_TYPES&quot;</span><span class=cF0>);
<a name="l298"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l299"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;%s&quot;</span><span class=cF0>,buf);
<a name="l300"></a> </span><span class=cF1>if</span><span class=cF0> (comment) </span><span class=cF7>{</span><span class=cF0>
<a name="l301"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$GREEN$%s$FG$&quot;</span><span class=cF0>,comment);
<a name="l302"></a> </span><span class=cF5>Free</span><span class=cF0>(comment);
<a name="l303"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l304"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l305"></a> }
<a name="l306"></a> </span><span class=cF5>Free</span><span class=cF0>(lst[i].idx);
<a name="l307"></a> </span><span class=cF1>if</span><span class=cF0> (idx)
<a name="l308"></a> </span><span class=cFB>progress1</span><span class=cF0>++;
<a name="l309"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l310"></a> </span><span class=cF5>Free</span><span class=cF0>(lst);
<a name="l311"></a> </span><span class=cF1>if</span><span class=cF0> (idx)
<a name="l312"></a> </span><span class=cFB>progress1</span><span class=cF0>=</span><span class=cFB>progress1_max</span><span class=cF0>=0;
<a name="l313"></a>
<a name="l314"></a>wh_done:
<a name="l315"></a> </span><span class=cF1>if</span><span class=cF0> (doc) </span><span class=cF7>{</span><span class=cF0>
<a name="l316"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;head.next==doc)
<a name="l317"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;No Match&quot;</span><span class=cF0>);
<a name="l318"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l319"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(doc);
<a name="l320"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l321"></a> </span><span class=cF5>Free</span><span class=cF0>(last_idx);
<a name="l322"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
<a name="l323"></a>}
<a name="l324"></a>
<a name="l325"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Info;Hash;Cmd Line (Typically)&quot;</span><span class=cF0>
<a name="l326"></a>
<a name="l327"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>HDR_NUM</span><span class=cF0> 16
<a name="l328"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>HashDepthRep</span><span class=cF0>(</span><span class=cF9>CHashTable</span><span class=cF0> *table=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l329"></a>{</span><span class=cF2>//Hash table linked-list chain depth report.</span><span class=cF0>
<a name="l330"></a></span><span class=cF2>//Histogram of collision count.</span><span class=cF0>
<a name="l331"></a> </span><span class=cF9>I64</span><span class=cF0> i,j,longest=0,cnt=0,a[</span><span class=cF3>HDR_NUM</span><span class=cF0>];
<a name="l332"></a> </span><span class=cF9>CHash</span><span class=cF0> *tmph;
<a name="l333"></a> </span><span class=cF1>if</span><span class=cF0> (!table) table=</span><span class=cF5>Fs</span><span class=cF0>-&gt;hash_table;
<a name="l334"></a> </span><span class=cF5>MemSet</span><span class=cF0>(a,0,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>a</span><span class=cF7>)</span><span class=cF0>);
<a name="l335"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;=table-&gt;mask;i++) </span><span class=cF7>{</span><span class=cF0>
<a name="l336"></a> tmph=table-&gt;body[i];
<a name="l337"></a> </span><span class=cF1>if</span><span class=cF0> (tmph) {
<a name="l338"></a> j=</span><span class=cF5>LinkedLstCnt</span><span class=cF0>(tmph);
<a name="l339"></a> </span><span class=cF1>if</span><span class=cF0> (j&lt;</span><span class=cF3>HDR_NUM</span><span class=cF0>)
<a name="l340"></a> a[j]++;
<a name="l341"></a> cnt+=j;
<a name="l342"></a> </span><span class=cF1>if</span><span class=cF0> (j&gt;longest)
<a name="l343"></a> longest=j;
<a name="l344"></a> }
<a name="l345"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l346"></a> </span><span class=cF6>&quot;Histogram\n&quot;</span><span class=cF0>;
<a name="l347"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;</span><span class=cF3>HDR_NUM</span><span class=cF0>;i++)
<a name="l348"></a> </span><span class=cF1>if</span><span class=cF0> (a[i])
<a name="l349"></a> </span><span class=cF6>&quot;%02d:%d\n&quot;</span><span class=cF0>,i,a[i];
<a name="l350"></a> </span><span class=cF6>&quot;Size:%d Count:%d Longest:%d\n&quot;</span><span class=cF0>,
<a name="l351"></a> table-&gt;mask+1,cnt,longest;
<a name="l352"></a> </span><span class=cF1>return</span><span class=cF0> longest;
<a name="l353"></a>}
<a name="l354"></a>
<a name="l355"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Help System&quot;</span><span class=cF0>
<a name="l356"></a>#</span><span class=cF1>help_file</span><span class=cF0> </span><span class=cF6>&quot;::/Doc/HelpSystem&quot;</span><span class=cF0>
<a name="l357"></a>
<a name="l358"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocHelpIdx</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF1>U8</span><span class=cF0> *idx)
<a name="l359"></a>{</span><span class=cF2>//Put to doc report for given help idx.</span><span class=cF0>
<a name="l360"></a> </span><span class=cF5>Who</span><span class=cF0>(</span><span class=cF6>&quot;+p&quot;</span><span class=cF0>,,idx,doc);
<a name="l361"></a>}
<a name="l362"></a>
<a name="l363"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>PopUpHelpIndex</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *idx,</span><span class=cF9>CTask</span><span class=cF0> *parent=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l364"></a>{</span><span class=cF2>//PopUp win report for given help idx.</span><span class=cF0>
<a name="l365"></a> </span><span class=cF1>U8</span><span class=cF0> *buf;
<a name="l366"></a> buf=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;DocHelpIdx(DocPut,\&quot;%s\&quot;);View;&quot;</span><span class=cF0>,idx);
<a name="l367"></a> </span><span class=cF5>PopUp</span><span class=cF0>(buf,parent);
<a name="l368"></a> </span><span class=cF5>Free</span><span class=cF0>(buf);
<a name="l369"></a>}
<a name="l370"></a>
<a name="l371"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;Hash/System&quot;</span><span class=cF0>
<a name="l372"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>MapFileLoad</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *filename)
<a name="l373"></a>{</span><span class=cF2>//Load map file so we have src line info.</span><span class=cF0>
<a name="l374"></a> </span><span class=cF1>U8</span><span class=cF0> *st,*ptr,*name=</span><span class=cF5>ExtDft</span><span class=cF0>(filename,</span><span class=cF6>&quot;MAP.Z&quot;</span><span class=cF0>),
<a name="l375"></a> *absname=</span><span class=cF5>FileNameAbs</span><span class=cF0>(name);
<a name="l376"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF5>DocRead</span><span class=cF0>(name);
<a name="l377"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
<a name="l378"></a> </span><span class=cF9>CHashSrcSym</span><span class=cF0> *tmph;
<a name="l379"></a> </span><span class=cF9>I64</span><span class=cF0> i,j,base=0;
<a name="l380"></a> </span><span class=cF9>CDbgInfo</span><span class=cF0> *dbg_info;
<a name="l381"></a>
<a name="l382"></a> </span><span class=cF5>FileExtRem</span><span class=cF0>(absname);
<a name="l383"></a> </span><span class=cF1>if</span><span class=cF0> (absname[1]==</span><span class=cF6>':'</span><span class=cF0> &amp;&amp; </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>absname</span><span class=cF7>)</span><span class=cF0>&gt;2 &amp;&amp;
<a name="l384"></a> </span><span class=cF7>(</span><span class=cF0>tmph=</span><span class=cF5>HashSingleTableFind</span><span class=cF0>(absname+2,</span><span class=cF5>Fs</span><span class=cF0>-&gt;hash_table,</span><span class=cF3>HTT_MODULE</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
<a name="l385"></a> base=tmph(</span><span class=cF9>CHashGeneric</span><span class=cF0> *)-&gt;user_data0+</span><span class=cF1>sizeof</span><span class=cF0>(</span><span class=cF9>CBinFile</span><span class=cF0>);
<a name="l386"></a>
<a name="l387"></a> </span><span class=cF1>if</span><span class=cF0> (!doc) </span><span class=cF1>return</span><span class=cF0>;
<a name="l388"></a> doc_e=doc-&gt;head.next;
<a name="l389"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc) </span><span class=cF7>{</span><span class=cF0>
<a name="l390"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8==</span><span class=cF3>DOCT_LINK</span><span class=cF0>) {
<a name="l391"></a> </span><span class=cF1>if</span><span class=cF0> (*doc_e-&gt;tag)
<a name="l392"></a> st=</span><span class=cF5>MStrUtil</span><span class=cF0>(doc_e-&gt;tag,</span><span class=cF3>SUF_REM_TRAILING</span><span class=cF0>);
<a name="l393"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l394"></a> st=</span><span class=cF5>MStrUtil</span><span class=cF0>(doc_e-&gt;aux_str,</span><span class=cF3>SUF_REM_TRAILING</span><span class=cF0>);
<a name="l395"></a> </span><span class=cF1>if</span><span class=cF0> (tmph=</span><span class=cF5>HashSingleTableFind</span><span class=cF7>(</span><span class=cF0>st,</span><span class=cF5>Fs</span><span class=cF0>-&gt;hash_table,</span><span class=cF3>HTG_SRC_SYM</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l396"></a> </span><span class=cF1>if</span><span class=cF0> (*doc_e-&gt;tag) {
<a name="l397"></a> </span><span class=cF5>Free</span><span class=cF0>(tmph-&gt;src_link);
<a name="l398"></a> tmph-&gt;src_link=doc_e-&gt;aux_str;
<a name="l399"></a> ptr=tmph-&gt;src_link;
<a name="l400"></a> </span><span class=cF1>if</span><span class=cF0> (ptr[0] &amp;&amp; ptr[1] &amp;&amp; ptr[2]==</span><span class=cF6>':'</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l401"></a> </span><span class=cF1>if</span><span class=cF0> (ptr[3]==</span><span class=cF6>':'</span><span class=cF0>)
<a name="l402"></a> ptr[3]=</span><span class=cFB>blkdev</span><span class=cF0>.boot_drv_let;
<a name="l403"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ptr[3]==</span><span class=cF6>'~'</span><span class=cF0>)
<a name="l404"></a> ptr[3]=*</span><span class=cFB>blkdev</span><span class=cF0>.home_dir;
<a name="l405"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l406"></a> doc_e-&gt;aux_str=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l407"></a> }
<a name="l408"></a> </span><span class=cF1>if</span><span class=cF0> (tmph-&gt;type&amp;</span><span class=cF7>(</span><span class=cF3>HTT_FUN</span><span class=cF0>|</span><span class=cF3>HTT_EXPORT_SYS_SYM</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l409"></a> !</span><span class=cF7>(</span><span class=cF0>dbg_info=tmph-&gt;dbg_info</span><span class=cF7>)</span><span class=cF0> &amp;&amp; doc_e-&gt;bin_data &amp;&amp;
<a name="l410"></a> </span><span class=cF7>(</span><span class=cF0>dbg_info=doc_e-&gt;bin_data-&gt;data</span><span class=cF7>)</span><span class=cF0>) {
<a name="l411"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;bin_data-&gt;size&gt;</span><span class=cF5>MSize</span><span class=cF7>(</span><span class=cF0>dbg_info</span><span class=cF7>)</span><span class=cF0>)
<a name="l412"></a> </span><span class=cF6>&quot;Corrupt Map Entry\n&quot;</span><span class=cF0>;
<a name="l413"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l414"></a> doc_e-&gt;bin_data-&gt;data=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l415"></a> tmph-&gt;dbg_info=dbg_info;
<a name="l416"></a> </span><span class=cF1>for</span><span class=cF0> (i=dbg_info-&gt;min_line;i&lt;=dbg_info-&gt;max_line+1;i++) {
<a name="l417"></a> j=i-dbg_info-&gt;min_line;
<a name="l418"></a> </span><span class=cF1>if</span><span class=cF0> (dbg_info-&gt;body[j])
<a name="l419"></a> dbg_info-&gt;body[j]=dbg_info-&gt;body[j]+base;
<a name="l420"></a> }
<a name="l421"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l422"></a> }
<a name="l423"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l424"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l425"></a> }
<a name="l426"></a> doc_e=doc_e-&gt;next;
<a name="l427"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l428"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l429"></a> </span><span class=cF5>Free</span><span class=cF0>(name);
<a name="l430"></a> </span><span class=cF5>Free</span><span class=cF0>(absname);
<a name="l431"></a>}
</span></pre></body>
</html>