mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 08:16:31 +00:00
768c2003e2
Fix SATARep missing AHCI controller info. Add PCIDevFind to System/Externs.CC. Add screen clearing with DocClear or Cls when in raw text mode. Optimize RawPutChar. Fix EdLite RAWF_SCROLL bug. Update screenshots and README.
183 lines
13 KiB
HTML
Executable file
183 lines
13 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V0.12">
|
|
<style type="text/css">
|
|
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;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF1>U0</span><span class=cF0> BgtDataRead()
|
|
<a name="l2"></a>{
|
|
<a name="l3"></a> CBgtEntry *tmpb;
|
|
<a name="l4"></a> CBgtTemplate *tmpt;
|
|
<a name="l5"></a> </span><span class=cF9>I64</span><span class=cF0> i, count, size;
|
|
<a name="l6"></a> </span><span class=cF1>U8</span><span class=cF0> *b, *ptr;
|
|
<a name="l7"></a> </span><span class=cF9>I64</span><span class=cF0> max_num;
|
|
<a name="l8"></a> </span><span class=cF1>U8</span><span class=cF0> **s = StrFileRead(bgt_string_file, &max_num);
|
|
<a name="l9"></a>
|
|
<a name="l10"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&b_head, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>CBgtEntry</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l11"></a> </span><span class=cF5>QueueInit</span><span class=cF0>(&b_head);
|
|
<a name="l12"></a> b_head.date = </span><span class=cF5>Now</span><span class=cF0>;
|
|
<a name="l13"></a> </span><span class=cF5>MemSet</span><span class=cF0>(&t_head, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>CBgtTemplate</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l14"></a> </span><span class=cF5>QueueInit</span><span class=cF0>(&t_head);
|
|
<a name="l15"></a> t_head.b.date = </span><span class=cF5>Now</span><span class=cF0>;
|
|
<a name="l16"></a>
|
|
<a name="l17"></a> </span><span class=cF1>if</span><span class=cF0> (ptr = b = </span><span class=cF5>FileRead</span><span class=cF7>(</span><span class=cF0>bgt_data_file, &size</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l18"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l19"></a> count = *ptr(</span><span class=cF9>I64</span><span class=cF0> *)++;
|
|
<a name="l20"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < count; i++)
|
|
<a name="l21"></a> {
|
|
<a name="l22"></a> tmpb = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>CBgtEntry</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l23"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpb-></span><span class=cF1>start</span><span class=cF0>, ptr, BE_SIZE);
|
|
<a name="l24"></a> tmpb->credit = </span><span class=cF5>StrNew</span><span class=cF0>(s[tmpb->credit_idx]);
|
|
<a name="l25"></a> tmpb->debit = </span><span class=cF5>StrNew</span><span class=cF0>(s[tmpb->debit_idx]);
|
|
<a name="l26"></a> tmpb->desc = </span><span class=cF5>StrNew</span><span class=cF0>(s[tmpb->desc_idx]);
|
|
<a name="l27"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpb, b_head.last);
|
|
<a name="l28"></a> ptr += BE_SIZE;
|
|
<a name="l29"></a> }
|
|
<a name="l30"></a>
|
|
<a name="l31"></a> count = *ptr(</span><span class=cF9>I64</span><span class=cF0> *)++;
|
|
<a name="l32"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < count; i++)
|
|
<a name="l33"></a> {
|
|
<a name="l34"></a> tmpt = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>CBgtTemplate</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l35"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpt-></span><span class=cF1>start</span><span class=cF0>, ptr, BT_SIZE);
|
|
<a name="l36"></a> ptr += BT_SIZE;
|
|
<a name="l37"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(&tmpt->b.</span><span class=cF1>start</span><span class=cF0>, ptr, BE_SIZE);
|
|
<a name="l38"></a> ptr += BE_SIZE;
|
|
<a name="l39"></a> tmpt->b.credit = </span><span class=cF5>StrNew</span><span class=cF0>(s[tmpt->b.credit_idx]);
|
|
<a name="l40"></a> tmpt->b.debit = </span><span class=cF5>StrNew</span><span class=cF0>(s[tmpt->b.debit_idx]);
|
|
<a name="l41"></a> tmpt->b.desc = </span><span class=cF5>StrNew</span><span class=cF0>(s[tmpt->b.desc_idx]);
|
|
<a name="l42"></a> </span><span class=cF5>QueueInsert</span><span class=cF0>(tmpt, t_head.last);
|
|
<a name="l43"></a> }
|
|
<a name="l44"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l45"></a>
|
|
<a name="l46"></a> StrFileArrDel(s, max_num);
|
|
<a name="l47"></a> </span><span class=cF5>Free</span><span class=cF0>(b);
|
|
<a name="l48"></a>
|
|
<a name="l49"></a> BgtAcctsUpdate;
|
|
<a name="l50"></a>}
|
|
<a name="l51"></a>
|
|
<a name="l52"></a></span><span class=cF1>U0</span><span class=cF0> BgtDataWrite()
|
|
<a name="l53"></a>{
|
|
<a name="l54"></a> </span><span class=cF9>I64</span><span class=cF0> i, num = </span><span class=cFE>0</span><span class=cF0>, size, count1, count2;
|
|
<a name="l55"></a> </span><span class=cF9>CHashTable</span><span class=cF0> *table = </span><span class=cF5>HashTableNew</span><span class=cF0>(</span><span class=cFE>1024</span><span class=cF0>);
|
|
<a name="l56"></a> CBgtEntry *tmpb;
|
|
<a name="l57"></a> CBgtTemplate *tmpt;
|
|
<a name="l58"></a> </span><span class=cF9>CHashGeneric</span><span class=cF0> *tmph;
|
|
<a name="l59"></a> </span><span class=cF1>U8</span><span class=cF0> *buf, *ptr;
|
|
<a name="l60"></a>
|
|
<a name="l61"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i <= accts_table->mask; i++)
|
|
<a name="l62"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l63"></a> tmph=accts_table->body[i];
|
|
<a name="l64"></a> </span><span class=cF1>while</span><span class=cF0> (tmph)
|
|
<a name="l65"></a> {
|
|
<a name="l66"></a> StrFileAdd(tmph->str, &num, table); </span><span class=cF2>//Cosmetics -- make accts appear first.</span><span class=cF0>
|
|
<a name="l67"></a> tmph = tmph->next;
|
|
<a name="l68"></a> }
|
|
<a name="l69"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l70"></a>
|
|
<a name="l71"></a> tmpb = b_head.next;
|
|
<a name="l72"></a> count1 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l73"></a> </span><span class=cF1>while</span><span class=cF0> (tmpb != &b_head)
|
|
<a name="l74"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l75"></a> </span><span class=cF1>if</span><span class=cF0> (tmpb->type != BE_TEMPLATE_COPY)
|
|
<a name="l76"></a> {
|
|
<a name="l77"></a> tmpb->credit_idx = StrFileAdd(tmpb->credit, &num, table);
|
|
<a name="l78"></a> tmpb->debit_idx = StrFileAdd(tmpb->debit, &num, table);
|
|
<a name="l79"></a> tmpb->desc_idx = StrFileAdd(tmpb->desc, &num, table);
|
|
<a name="l80"></a> count1++;
|
|
<a name="l81"></a> }
|
|
<a name="l82"></a> tmpb = tmpb->next;
|
|
<a name="l83"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l84"></a>
|
|
<a name="l85"></a> tmpt = t_head.next;
|
|
<a name="l86"></a> count2 = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l87"></a> </span><span class=cF1>while</span><span class=cF0> (tmpt != &t_head)
|
|
<a name="l88"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l89"></a> tmpt->b.credit_idx = StrFileAdd(tmpt->b.credit, &num, table);
|
|
<a name="l90"></a> tmpt->b.debit_idx = StrFileAdd(tmpt->b.debit, &num, table);
|
|
<a name="l91"></a> tmpt->b.desc_idx = StrFileAdd(tmpt->b.desc, &num, table);
|
|
<a name="l92"></a> count2++;
|
|
<a name="l93"></a> tmpt = tmpt->next;
|
|
<a name="l94"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l95"></a> StrFileWrite(bgt_string_file, table);
|
|
<a name="l96"></a> StrFileDel(table);
|
|
<a name="l97"></a>
|
|
<a name="l98"></a> size = </span><span class=cF1>sizeof</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0>) * </span><span class=cFE>2</span><span class=cF0> + count1 * BE_SIZE + count2 * (BT_SIZE + BE_SIZE);
|
|
<a name="l99"></a> buf = ptr = </span><span class=cF5>MAlloc</span><span class=cF0>(size);
|
|
<a name="l100"></a>
|
|
<a name="l101"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(ptr, &count1, </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>I64</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l102"></a> ptr += </span><span class=cF1>sizeof</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0>);
|
|
<a name="l103"></a> tmpb=b_head.next;
|
|
<a name="l104"></a> </span><span class=cF1>while</span><span class=cF0> (tmpb != &b_head)
|
|
<a name="l105"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l106"></a> </span><span class=cF1>if</span><span class=cF0> (tmpb->type != BE_TEMPLATE_COPY)
|
|
<a name="l107"></a> {
|
|
<a name="l108"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(ptr, &tmpb-></span><span class=cF1>start</span><span class=cF0>, BE_SIZE);
|
|
<a name="l109"></a> ptr += BE_SIZE;
|
|
<a name="l110"></a> }
|
|
<a name="l111"></a> tmpb = tmpb->next;
|
|
<a name="l112"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l113"></a>
|
|
<a name="l114"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(ptr, &count2, </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>I64</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l115"></a> ptr += </span><span class=cF1>sizeof</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0>);
|
|
<a name="l116"></a> tmpt=t_head.next;
|
|
<a name="l117"></a> </span><span class=cF1>while</span><span class=cF0> (tmpt != &t_head)
|
|
<a name="l118"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l119"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(ptr, &tmpt-></span><span class=cF1>start</span><span class=cF0>, BT_SIZE);
|
|
<a name="l120"></a> ptr += BT_SIZE;
|
|
<a name="l121"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(ptr, &tmpt->b.</span><span class=cF1>start</span><span class=cF0>, BE_SIZE);
|
|
<a name="l122"></a> ptr += BE_SIZE;
|
|
<a name="l123"></a> tmpt = tmpt->next;
|
|
<a name="l124"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l125"></a>
|
|
<a name="l126"></a> </span><span class=cF5>FileWrite</span><span class=cF0>(bgt_data_file, buf, size);
|
|
<a name="l127"></a> </span><span class=cF5>Free</span><span class=cF0>(buf);
|
|
<a name="l128"></a>}
|
|
<a name="l129"></a>
|
|
<a name="l130"></a></span><span class=cF1>U0</span><span class=cF0> BgtDel()
|
|
<a name="l131"></a>{
|
|
<a name="l132"></a> CBgtEntry *tmpb, *tmpb1;
|
|
<a name="l133"></a> CBgtTemplate *tmpt, *tmpt1;
|
|
<a name="l134"></a>
|
|
<a name="l135"></a> tmpb = b_head.next;
|
|
<a name="l136"></a> </span><span class=cF1>while</span><span class=cF0> (tmpb != &b_head)
|
|
<a name="l137"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l138"></a> tmpb1 = tmpb->next;
|
|
<a name="l139"></a> BgtEntryDel2(tmpb);
|
|
<a name="l140"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpb);
|
|
<a name="l141"></a> tmpb = tmpb1;
|
|
<a name="l142"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l143"></a> tmpt = t_head.next;
|
|
<a name="l144"></a> </span><span class=cF1>while</span><span class=cF0> (tmpt != &t_head)
|
|
<a name="l145"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l146"></a> tmpt1 = tmpt->next;
|
|
<a name="l147"></a> BgtEntryDel2(&tmpt->b);
|
|
<a name="l148"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpt);
|
|
<a name="l149"></a> tmpt = tmpt1;
|
|
<a name="l150"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l151"></a> StrFileDel(accts_table);
|
|
<a name="l152"></a> accts_table = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l153"></a> accts_table_strs = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l154"></a>}
|
|
</span></pre></body>
|
|
</html>
|