2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-12-11 11:10:58 +00:00
< meta name = "generator" content = "ZealOS V1.07" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-10-08 07:06:11 +01:00
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;}
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 = cF0 > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " DolDoc/Bin" < / span > < span class = cF0 >
< a name = "l2" > < / a >
< a name = "l3" > < / a > < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *< / span > < span class = cF5 > DocBinFindNum< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *haystack_doc, < / span > < span class = cF9 > I64< / span > < span class = cF0 > needle_num)
< a name = "l4" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l5" > < / a > < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *b = haystack_doc-> bin_head.next;
2021-07-03 05:07:57 +01:00
< a name = "l6" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l7" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (b != & haystack_doc-> bin_head)
< a name = "l8" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l9" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (b-> num == needle_num)
< a name = "l10" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > b;
< a name = "l11" > < / a > b = b-> next;
< a name = "l12" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l13" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l14" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l15" > < / a > }
< a name = "l16" > < / a >
< a name = "l17" > < / a > < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *< / span > < span class = cF5 > DocBinFindTag< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *haystack_doc, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *needle_tag)
< a name = "l18" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l19" > < / a > < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *b;
2021-07-03 05:07:57 +01:00
< a name = "l20" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l21" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (needle_tag)
< a name = "l22" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l23" > < / a > b = haystack_doc-> bin_head.next;
< a name = "l24" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (b != & haystack_doc-> bin_head)
< a name = "l25" > < / a > {
< a name = "l26" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (b-> tag & & !< / span > < span class = cF5 > StrCompare< / span > < span class = cF7 > (< / span > < span class = cF0 > b-> tag, needle_tag< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l27" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > b;
< a name = "l28" > < / a > b = b-> next;
< a name = "l29" > < / a > }
< a name = "l30" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l31" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l32" > < / a > }
< a name = "l33" > < / a >
< a name = "l34" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > DocBinsValidate< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc)
< a name = "l35" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l36" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unlock = < / span > < span class = cF5 > DocLock< / span > < span class = cF0 > (doc);
< a name = "l37" > < / a > < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *b, *b1;
< a name = "l38" > < / a > < / span > < span class = cF9 > CDocEntry< / span > < span class = cF0 > *doc_e, *doc_e2;
< a name = "l39" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > renum_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l40" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l41" > < / a > b = doc-> bin_head.next;
< a name = "l42" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (b != & doc-> bin_head)
< a name = "l43" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l44" > < / a > b-> use_count = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l45" > < / a > b-> tmp_use_count= < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l46" > < / a > b-> renum_num = -< / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l47" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (b-> tag);
< a name = "l48" > < / a > b-> tag = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l49" > < / a > b = b-> next;
< a name = "l50" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l51" > < / a > doc_e = doc-> head.next;
< a name = "l52" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (doc_e != doc)
< a name = "l53" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l54" > < / a > doc_e2 = doc_e-> next;
< a name = "l55" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_HAS_BIN< / span > < span class = cF0 > )
< a name = "l56" > < / a > {
< a name = "l57" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (b = doc_e-> bin_data = < / span > < span class = cF5 > DocBinFindNum< / span > < span class = cF7 > (< / span > < span class = cF0 > doc, doc_e-> bin_num< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l58" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l59" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_BIN_PTR_LINK< / span > < span class = cF0 > )
< a name = "l60" > < / a > b-> tmp_use_count = < / span > < span class = cF3 > I32_MAX< / span > < span class = cF0 > ;
< a name = "l61" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!b-> use_count++)
< a name = "l62" > < / a > b-> renum_num = ++renum_num;
< a name = "l63" > < / a > doc_e-> bin_num = b-> renum_num;
< a name = "l64" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!b-> tag & & doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_TAG< / span > < span class = cF0 > & & doc_e-> tag & & *doc_e-> tag)
< a name = "l65" > < / a > b-> tag = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (doc_e-> tag, doc-> mem_task);
< a name = "l66" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l67" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l68" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l69" > < / a > < / span > < span class = cF5 > RawPrint< / span > < span class = cF0 > (< / span > < span class = cFE > 3000< / span > < span class = cF0 > , < / span > < span class = cF6 > " Bin Not Found" < / span > < span class = cF0 > );
< a name = "l70" > < / a > doc_e-> type = doc_e-> de_flags = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l71" > < / a > doc_e-> type_u8 = < / span > < span class = cF3 > DOCT_ERROR< / span > < span class = cF0 > ;
< a name = "l72" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l73" > < / a > }
< a name = "l74" > < / a > doc_e = doc_e2;
< a name = "l75" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l76" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l77" > < / a > b = doc-> bin_head.next;
< a name = "l78" > < / a > doc-> cur_bin_num = < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l79" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (b != & doc-> bin_head)
< a name = "l80" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l81" > < / a > b1 = b-> next;
< a name = "l82" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!b-> use_count)
< a name = "l83" > < / a > {
< a name = "l84" > < / a > < / span > < span class = cF5 > QueueRemove< / span > < span class = cF0 > (b);
< a name = "l85" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (b-> data);
< a name = "l86" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (b);
< a name = "l87" > < / a > }
< a name = "l88" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l89" > < / a > {
< a name = "l90" > < / a > b-> num = b-> renum_num;
< a name = "l91" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (b-> num > = doc-> cur_bin_num)
< a name = "l92" > < / a > doc-> cur_bin_num = b-> num + < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l93" > < / a > }
< a name = "l94" > < / a > b = b1;
< a name = "l95" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l96" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unlock)
< a name = "l97" > < / a > < / span > < span class = cF5 > DocUnlock< / span > < span class = cF0 > (doc);
2021-07-03 05:07:57 +01:00
< a name = "l98" > < / a > }
< a name = "l99" > < / a >
< a name = "l100" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > DocBinDel< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc, < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *b)
< a name = "l101" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l102" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc & & b & & b-> use_count)
< a name = "l103" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l104" > < / a > b-> use_count--;
< a name = "l105" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!b-> use_count)
< a name = "l106" > < / a > {
< a name = "l107" > < / a > < / span > < span class = cF5 > QueueRemove< / span > < span class = cF0 > (b);
< a name = "l108" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (b-> tag);
< a name = "l109" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (b-> data);
< a name = "l110" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (b);
< a name = "l111" > < / a > }
< a name = "l112" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l113" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l114" > < / a > < / span > < span class = cF5 > RawPrint< / span > < span class = cF0 > (< / span > < span class = cFE > 3000< / span > < span class = cF0 > , < / span > < span class = cF6 > " DocBinDel" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l115" > < / a > }
< a name = "l116" > < / a >
< a name = "l117" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > < / span > < span class = cF5 > DocBinPtrReset< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc, < / span > < span class = cF9 > CDocEntry< / span > < span class = cF0 > *doc_e)
< a name = "l118" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l119" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st, *st2;
< a name = "l120" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc2;
< a name = "l121" > < / a > < / span > < span class = cF9 > CDocBin< / span > < span class = cF0 > *tmpb, *tmpb2;
< a name = "l122" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, bin_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l123" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l124" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_HAS_BIN< / span > < span class = cF0 > & & doc_e-> bin_ptr_link & & < / span > < span class = cF5 > StrLen< / span > < span class = cF7 > (< / span > < span class = cF0 > doc_e-> bin_ptr_link< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l125" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l126" > < / a > bin_num = doc_e-> bin_num;
< a name = "l127" > < / a > st = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (doc_e-> bin_ptr_link);
< a name = "l128" > < / a > st2 = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (st);
< a name = "l129" > < / a > < / span > < span class = cF5 > StrLastRemove< / span > < span class = cF0 > (st, < / span > < span class = cF6 > " ," < / span > < span class = cF0 > , st2);
< a name = "l130" > < / a > i = < / span > < span class = cF5 > Str2I64< / span > < span class = cF0 > (st2);
< a name = "l131" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (i > < / span > < span class = cFE > 0< / span > < span class = cF0 > || *st2)
< a name = "l132" > < / a > {
< a name = "l133" > < / a > doc2 = < / span > < span class = cF5 > DocRead< / span > < span class = cF0 > (st);
< a name = "l134" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (i > < / span > < span class = cFE > 0< / span > < span class = cF0 > & & < / span > < span class = cF7 > (< / span > < span class = cF0 > tmpb2 = < / span > < span class = cF5 > DocBinFindNum< / span > < span class = cF0 > (doc2, i)< / span > < span class = cF7 > )< / span > < span class = cF0 > || i == < / span > < span class = cFE > 0< / span > < span class = cF0 > & & < / span > < span class = cF7 > (< / span > < span class = cF0 > tmpb2 = < / span > < span class = cF5 > DocBinFindTag< / span > < span class = cF0 > (doc2, st2)< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l135" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l136" > < / a > i = < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l137" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (bin_num > < / span > < span class = cFE > 0< / span > < span class = cF0 > )
< a name = "l138" > < / a > {
< a name = "l139" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (tmpb = < / span > < span class = cF5 > DocBinFindNum< / span > < span class = cF7 > (< / span > < span class = cF0 > doc, bin_num< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l140" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l141" > < / a > i = tmpb-> use_count;
< a name = "l142" > < / a > < / span > < span class = cF5 > DocBinDel< / span > < span class = cF0 > (doc, tmpb);
< a name = "l143" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l144" > < / a > }
< a name = "l145" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l146" > < / a > bin_num = doc-> cur_bin_num++;
2021-07-03 05:07:57 +01:00
< a name = "l147" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l148" > < / a > tmpb = < / span > < span class = cF5 > MAllocIdent< / span > < span class = cF0 > (tmpb2, doc-> mem_task);
< a name = "l149" > < / a > tmpb-> use_count = i;
< a name = "l150" > < / a > tmpb-> data = < / span > < span class = cF5 > MAllocIdent< / span > < span class = cF0 > (tmpb2-> data, doc-> mem_task);
< a name = "l151" > < / a > tmpb-> num = bin_num;
< a name = "l152" > < / a > doc_e-> bin_data = tmpb;
< a name = "l153" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_TAG< / span > < span class = cF0 > & & doc_e-> tag & & *doc_e-> tag)
< a name = "l154" > < / a > tmpb-> tag = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (doc_e-> tag, doc-> mem_task);
< a name = "l155" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l156" > < / a > tmpb-> tag = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l157" > < / a > < / span > < span class = cF5 > QueueInsert< / span > < span class = cF0 > (tmpb, doc-> bin_head.last);
< a name = "l158" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l159" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l160" > < / a > bin_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l161" > < / a > < / span > < span class = cF5 > DocDel< / span > < span class = cF0 > (doc2);
< a name = "l162" > < / a > }
< a name = "l163" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l164" > < / a > bin_num = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l165" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st2);
< a name = "l166" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st);
< a name = "l167" > < / a > doc_e-> bin_num = bin_num;
< a name = "l168" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l169" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > bin_num;
2021-07-03 05:07:57 +01:00
< a name = "l170" > < / a > }
< / span > < / pre > < / body >
< / html >