2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-08-17 07:47:37 +01:00
< meta name = "generator" content = "ZealOS V1.00" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-07-29 03:20:15 +01:00
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
2021-07-03 05:07:57 +01:00
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-03 05:07:57 +01:00
< a name = "l1" > < / a > < span class = cF2 > /*Scans the sym table and checks< / span > < span class = cF0 >
2021-07-26 20:29:49 +01:00
< 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 >
2021-07-03 05:07:57 +01:00
< 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 >
2021-07-26 20:29:49 +01:00
< 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 >
2021-07-03 05:07:57 +01:00
< a name = "l9" > < / a > < / span > < span class = cF4 >
2021-07-26 20:29:49 +01:00
< 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 >
2021-07-03 05:07:57 +01:00
< 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 > {
2021-07-04 23:11:34 +01:00
< 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 > ;
2021-07-03 05:07:57 +01:00
< a name = "l22" > < / a >
2021-07-04 23:11:34 +01:00
< 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 > }
2021-07-03 05:07:57 +01:00
< a name = "l40" > < / a >
2021-07-04 23:11:34 +01:00
< 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 > );
2021-07-03 05:07:57 +01:00
< a name = "l44" > < / a >
2021-07-04 23:11:34 +01:00
< 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 > ;
2021-07-03 05:07:57 +01:00
< a name = "l88" > < / a >
2021-07-04 23:11:34 +01:00
< 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 > ;
2021-07-03 05:07:57 +01:00
< a name = "l92" > < / a > }
< a name = "l93" > < / a >
< a name = "l94" > < / a > UnusedDefineScan;
< / span > < / pre > < / body >
< / html >