mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 16:26:35 +00:00
93c19f3f1b
Add column headers to Rep functions. Change MEM_EXTRA_HASH2_PAGS to 1. (Revert this later if it causes bugs.)
123 lines
9.7 KiB
HTML
Executable file
123 lines
9.7 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V1.04">
|
|
<style type="text/css">
|
|
body {background-color:#1f1f1f;}
|
|
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
|
|
.cF1{color:#4f84a6;background-color:#1f1f1f;}
|
|
.cF2{color:#73a255;background-color:#1f1f1f;}
|
|
.cF3{color:#297582;background-color:#1f1f1f;}
|
|
.cF4{color:#b34f4b;background-color:#1f1f1f;}
|
|
.cF5{color:#8a52c3;background-color:#1f1f1f;}
|
|
.cF6{color:#b7822f;background-color:#1f1f1f;}
|
|
.cF7{color:#444444;background-color:#1f1f1f;}
|
|
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
|
|
.cF9{color:#94bfde;background-color:#1f1f1f;}
|
|
.cFA{color:#a1ce97;background-color:#1f1f1f;}
|
|
.cFB{color:#6db4be;background-color:#1f1f1f;}
|
|
.cFC{color:#e88e88;background-color:#1f1f1f;}
|
|
.cFD{color:#ca94e8;background-color:#1f1f1f;}
|
|
.cFE{color:#d4b475;background-color:#1f1f1f;}
|
|
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF2>/*Scans the symbol table and checks</span><span class=cF0>
|
|
<a name="l2"></a></span><span class=cF2>each </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l824"><span class=cF4>HTT_DEFINE_STR</span></a><span class=cF2> entry to see if</span><span class=cF0>
|
|
<a name="l3"></a></span><span class=cF2>it only occurs once in files.</span><span class=cF0>
|
|
<a name="l4"></a>
|
|
<a name="l5"></a></span><span class=cF2>It's a brute force solution, but</span><span class=cF0>
|
|
<a name="l6"></a></span><span class=cF2>gets the job done... slowly.</span><span class=cF0>
|
|
<a name="l7"></a></span><span class=cF4>
|
|
<a name="l8"></a></span><a href="https://zeal-operating-system.github.io/ZealOS/System/Utils/Find.CC.html#l166"><span class=cF4>Find</span></a><span class=cF2>() returns a count of matches.</span><span class=cF0>
|
|
<a name="l9"></a></span><span class=cF4>
|
|
<a name="l10"></a></span><a href="https://zeal-operating-system.github.io/ZealOS/System/Utils/Find.CC.html#l204"><span class=cF4>FileOcc</span></a><span class=cF2>() is </span><a href="https://zeal-operating-system.github.io/ZealOS/System/Utils/Find.CC.html#l166"><span class=cF4>Find</span></a><span class=cF2>() with</span><span class=cF0>
|
|
<a name="l11"></a></span><span class=cF2>output </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KMisc.CC.html#l237"><span class=cF4>Silent</span></a><span class=cF2>().</span><span class=cF0>
|
|
<a name="l12"></a></span><span class=cF2>*/</span><span class=cF0>
|
|
<a name="l13"></a>
|
|
<a name="l14"></a></span><span class=cF1>U0</span><span class=cF0> UnusedDefineScan()
|
|
<a name="l15"></a>{
|
|
<a name="l16"></a> </span><span class=cF9>CDoc</span><span class=cF0> *old_put_doc, *old_display_doc, *doc;
|
|
<a name="l17"></a> </span><span class=cF9>I64</span><span class=cF0> i, count = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l18"></a> </span><span class=cF9>CHashTable</span><span class=cF0> *table;
|
|
<a name="l19"></a> </span><span class=cF9>CHash</span><span class=cF0> *tmph;
|
|
<a name="l20"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e, *doc_e2;
|
|
<a name="l21"></a> </span><span class=cF1>Bool</span><span class=cF0> old_silent = </span><span class=cF5>IsSilent</span><span class=cF0>;
|
|
<a name="l22"></a>
|
|
<a name="l23"></a> </span><span class=cF1>try</span><span class=cF0>
|
|
<a name="l24"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l25"></a> table = </span><span class=cF5>Fs</span><span class=cF0>->hash_table;
|
|
<a name="l26"></a> </span><span class=cF1>while</span><span class=cF0> (table)
|
|
<a name="l27"></a> {
|
|
<a name="l28"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i <= table->mask; i++)
|
|
<a name="l29"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l30"></a> tmph = table->body[i];
|
|
<a name="l31"></a> </span><span class=cF1>while</span><span class=cF0> (tmph)
|
|
<a name="l32"></a> {
|
|
<a name="l33"></a> </span><span class=cF1>if</span><span class=cF0> (tmph->type & </span><span class=cF3>HTT_DEFINE_STR</span><span class=cF0>)
|
|
<a name="l34"></a> count++;
|
|
<a name="l35"></a> tmph = tmph->next;
|
|
<a name="l36"></a> }
|
|
<a name="l37"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l38"></a> table = table->next;
|
|
<a name="l39"></a> }
|
|
<a name="l40"></a>
|
|
<a name="l41"></a> </span><span class=cFB>progress1</span><span class=cF0> = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l42"></a> </span><span class=cFB>progress1_max</span><span class=cF0> = count;
|
|
<a name="l43"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(</span><span class=cFB>progress1_desc</span><span class=cF0>, </span><span class=cF6>"Define Scan"</span><span class=cF0>);
|
|
<a name="l44"></a>
|
|
<a name="l45"></a> table = </span><span class=cF5>Fs</span><span class=cF0>->hash_table;
|
|
<a name="l46"></a> </span><span class=cF1>while</span><span class=cF0> (table)
|
|
<a name="l47"></a> {
|
|
<a name="l48"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i <= table->mask; i++)
|
|
<a name="l49"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l50"></a> tmph = table->body[i];
|
|
<a name="l51"></a> </span><span class=cF1>while</span><span class=cF0> (tmph)
|
|
<a name="l52"></a> {
|
|
<a name="l53"></a> </span><span class=cF1>if</span><span class=cF0> (tmph->type & </span><span class=cF3>HTT_DEFINE_STR</span><span class=cF0>)
|
|
<a name="l54"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l55"></a> </span><span class=cFB>progress1</span><span class=cF0>++;
|
|
<a name="l56"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>FileOcc</span><span class=cF7>(</span><span class=cF0>tmph->str, </span><span class=cF6>"/*"</span><span class=cF0>, </span><span class=cF6>"+l-i+$"</span><span class=cF7>)</span><span class=cF0> == </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l57"></a> {
|
|
<a name="l58"></a> doc = </span><span class=cF5>DocNew</span><span class=cF0>;
|
|
<a name="l59"></a> old_put_doc = </span><span class=cF5>DocPut</span><span class=cF0>;
|
|
<a name="l60"></a> old_display_doc = </span><span class=cF5>DocDisplay</span><span class=cF0>;
|
|
<a name="l61"></a> </span><span class=cF5>Fs</span><span class=cF0>->put_doc = </span><span class=cF5>Fs</span><span class=cF0>->display_doc=doc;
|
|
<a name="l62"></a> </span><span class=cF5>Find</span><span class=cF0>(tmph->str, </span><span class=cF6>"/*"</span><span class=cF0>, </span><span class=cF6>"+l-i+$"</span><span class=cF0>);
|
|
<a name="l63"></a> </span><span class=cF5>Fs</span><span class=cF0>->put_doc = old_put_doc;
|
|
<a name="l64"></a> </span><span class=cF5>Fs</span><span class=cF0>->display_doc = old_display_doc;
|
|
<a name="l65"></a> doc_e = doc->head.next;
|
|
<a name="l66"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e != doc)
|
|
<a name="l67"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l68"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_LINK</span><span class=cF0>)
|
|
<a name="l69"></a> {
|
|
<a name="l70"></a> </span><span class=cF6>"%s "</span><span class=cF0>, tmph->str;
|
|
<a name="l71"></a> doc_e2 = </span><span class=cF5>DocEntryCopy</span><span class=cF0>(doc, doc_e);
|
|
<a name="l72"></a> </span><span class=cF5>DocInsEntry</span><span class=cF0>(old_put_doc, doc_e2);
|
|
<a name="l73"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l74"></a> }
|
|
<a name="l75"></a> doc_e = doc_e->next;
|
|
<a name="l76"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l77"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
|
<a name="l78"></a> }
|
|
<a name="l79"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l80"></a> tmph = tmph->next;
|
|
<a name="l81"></a> }
|
|
<a name="l82"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l83"></a> table = table->next;
|
|
<a name="l84"></a> }
|
|
<a name="l85"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l86"></a> </span><span class=cF1>catch</span><span class=cF0>
|
|
<a name="l87"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
|
|
<a name="l88"></a>
|
|
<a name="l89"></a> </span><span class=cF5>Silent</span><span class=cF0>(old_silent);
|
|
<a name="l90"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l91"></a> </span><span class=cF5>ProgressBarsReset</span><span class=cF0>;
|
|
<a name="l92"></a>}
|
|
<a name="l93"></a>
|
|
<a name="l94"></a>UnusedDefineScan;
|
|
</span></pre></body>
|
|
</html>
|