templeos-info/public/Wb/Apps/Budget/BgtMain.HC.HTML

262 lines
22 KiB
HTML
Executable File

<!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=cF1>extern</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> BgtRegen();
<a name="l2"></a>
<a name="l3"></a></span><span class=cF1>Bool</span><span class=cF0> BgtPutKey(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF1>U8</span><span class=cF0> *,</span><span class=cF9>I64</span><span class=cF0> ch,</span><span class=cF9>I64</span><span class=cF0> sc)
<a name="l4"></a>{</span><span class=cF2>//ch=ASCII; sc=scan_code</span><span class=cF0>
<a name="l5"></a> </span><span class=cF1>no_warn</span><span class=cF0> sc;
<a name="l6"></a> CBgtEntry *tmpb,*tmpb1;
<a name="l7"></a> CBgtTemplate *tmpt,*tmpt1;
<a name="l8"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce;
<a name="l9"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
<a name="l10"></a> </span><span class=cF1>switch</span><span class=cF0> (ch) </span><span class=cF7>{</span><span class=cF0>
<a name="l11"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
<a name="l12"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>doc_ce=doc-&gt;cur_entry</span><span class=cF7>)</span><span class=cF0> &amp;&amp; doc_ce!=doc &amp;&amp;
<a name="l13"></a> doc_ce-&gt;type_u8==</span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>) {
<a name="l14"></a> tmpb=doc_ce-&gt;user_data;
<a name="l15"></a> </span><span class=cF1>if</span><span class=cF0> (tmpt=tmpb-&gt;template) </span><span class=cF7>{</span><span class=cF0>
<a name="l16"></a> </span><span class=cF1>if</span><span class=cF0> (tmpt1=BgtTemplatePmt</span><span class=cF7>(</span><span class=cF0>tmpt</span><span class=cF7>)</span><span class=cF0>) {
<a name="l17"></a> </span><span class=cF5>QueRem</span><span class=cF0>(tmpt);
<a name="l18"></a> BgtTemplatePurge(tmpt);
<a name="l19"></a> BgtEntryDel2(&amp;tmpt-&gt;b);
<a name="l20"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpt);
<a name="l21"></a> </span><span class=cF5>QueIns</span><span class=cF0>(tmpt1,t_head.last);
<a name="l22"></a> BgtTemplateExpand(tmpt1);
<a name="l23"></a> BgtRegen;
<a name="l24"></a> }
<a name="l25"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l26"></a> </span><span class=cF1>if</span><span class=cF0> (tmpb1=BgtEntryPmt</span><span class=cF7>(</span><span class=cF0>tmpb</span><span class=cF7>)</span><span class=cF0>) {
<a name="l27"></a> </span><span class=cF5>QueRem</span><span class=cF0>(tmpb);
<a name="l28"></a> BgtEntryDel(tmpb);
<a name="l29"></a> BgtIns(tmpb1);
<a name="l30"></a> BgtRegen;
<a name="l31"></a> }
<a name="l32"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l33"></a> }
<a name="l34"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l35"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_CTRLY</span><span class=cF0>:
<a name="l36"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>doc_ce=doc-&gt;cur_entry</span><span class=cF7>)</span><span class=cF0> &amp;&amp; doc_ce!=doc &amp;&amp;
<a name="l37"></a> doc_ce-&gt;type_u8==</span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>) {
<a name="l38"></a> tmpb=doc_ce-&gt;user_data;
<a name="l39"></a> </span><span class=cF1>if</span><span class=cF0> (tmpt=tmpb-&gt;template) </span><span class=cF7>{</span><span class=cF0>
<a name="l40"></a> </span><span class=cF5>QueRem</span><span class=cF0>(tmpt);
<a name="l41"></a> BgtTemplateDel(tmpt);
<a name="l42"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l43"></a> </span><span class=cF5>QueRem</span><span class=cF0>(tmpb);
<a name="l44"></a> BgtEntryDel(tmpb);
<a name="l45"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l46"></a> BgtRegen;
<a name="l47"></a> }
<a name="l48"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l49"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'a'</span><span class=cF0>:
<a name="l50"></a> </span><span class=cF5>PopUpOk</span><span class=cF0>( </span><span class=cF6>&quot;Set the name and color of your accounts.\n&quot;</span><span class=cF0>
<a name="l51"></a> </span><span class=cF6>&quot;To delete accounts, manually edit\n&quot;</span><span class=cF0>
<a name="l52"></a> </span><span class=cF6>&quot;$GREEN$~/Budget/Accts.DD.Z$FG$.&quot;</span><span class=cF0>);
<a name="l53"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpEd</span><span class=cF7>(</span><span class=cF0>bgt_accts_file,</span><span class=cF5>Fs</span><span class=cF7>)</span><span class=cF0>) {
<a name="l54"></a> BgtAcctsRead;
<a name="l55"></a> BgtRegen;
<a name="l56"></a> }
<a name="l57"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l58"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'v'</span><span class=cF0>:
<a name="l59"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>st=BgtPopUpAcct(</span><span class=cF6>&quot;View Acct\n\n&quot;</span><span class=cF0>,view_acct)</span><span class=cF7>)</span><span class=cF0>&gt;=0) {
<a name="l60"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(view_acct,st);
<a name="l61"></a> BgtRegen;
<a name="l62"></a> }
<a name="l63"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l64"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'n'</span><span class=cF0>:
<a name="l65"></a> </span><span class=cF1>if</span><span class=cF0> (tmpb1=BgtEntryPmt) {
<a name="l66"></a> BgtIns(tmpb1);
<a name="l67"></a> BgtRegen;
<a name="l68"></a> }
<a name="l69"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l70"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'t'</span><span class=cF0>:
<a name="l71"></a> </span><span class=cF1>if</span><span class=cF0> (tmpt1=BgtTemplatePmt) {
<a name="l72"></a> </span><span class=cF5>QueIns</span><span class=cF0>(tmpt1,t_head.last);
<a name="l73"></a> BgtTemplateExpand(tmpt1);
<a name="l74"></a> BgtRegen;
<a name="l75"></a> }
<a name="l76"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l77"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'c'</span><span class=cF0>:
<a name="l78"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>doc_ce=doc-&gt;cur_entry</span><span class=cF7>)</span><span class=cF0> &amp;&amp; doc_ce!=doc &amp;&amp;
<a name="l79"></a> doc_ce-&gt;type_u8==</span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
<a name="l80"></a> tmpb=doc_ce-&gt;user_data;
<a name="l81"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l82"></a> tmpb=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (tmpb1=BgtEntryPmt</span><span class=cF7>(</span><span class=cF0>tmpb</span><span class=cF7>)</span><span class=cF0>) {
<a name="l84"></a> BgtIns(tmpb1);
<a name="l85"></a> BgtRegen;
<a name="l86"></a> }
<a name="l87"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l88"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'p'</span><span class=cF0>:
<a name="l89"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>doc_ce=doc-&gt;cur_entry</span><span class=cF7>)</span><span class=cF0> &amp;&amp; doc_ce!=doc &amp;&amp;
<a name="l90"></a> doc_ce-&gt;type_u8==</span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>) {
<a name="l91"></a> tmpb=doc_ce-&gt;user_data;
<a name="l92"></a> </span><span class=cF1>if</span><span class=cF0> (tmpt1=BgtTemplatePmt</span><span class=cF7>(</span><span class=cF0>,tmpb</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l93"></a> BgtTemplateExpand(tmpt1,</span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l94"></a> BgtTemplateDel(tmpt1);
<a name="l95"></a> BgtRegen;
<a name="l96"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l97"></a> }
<a name="l98"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l99"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l100"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l101"></a>}
<a name="l102"></a>
<a name="l103"></a></span><span class=cF1>U0</span><span class=cF0> BgtRegen()
<a name="l104"></a>{
<a name="l105"></a> </span><span class=cF9>I64</span><span class=cF0> timeout_jiffy,c,color=</span><span class=cF3>COLOR_INVALID</span><span class=cF0>;
<a name="l106"></a> </span><span class=cF1>F64</span><span class=cF0> balance=0;
<a name="l107"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc,*pdoc,*ddoc;
<a name="l108"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce;
<a name="l109"></a> CBgtEntry *tmpb=b_head.next,*tmpb_ce;
<a name="l110"></a> doc=</span><span class=cF5>DocNew</span><span class=cF0>;
<a name="l111"></a> doc-&gt;flags|=</span><span class=cF3>DOCF_FORM</span><span class=cF0>;
<a name="l112"></a> </span><span class=cF1>while</span><span class=cF0> (tmpb!=&amp;b_head) </span><span class=cF7>{</span><span class=cF0>
<a name="l113"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>view_acct,tmpb-&gt;credit</span><span class=cF7>)</span><span class=cF0>)
<a name="l114"></a> balance-=tmpb-&gt;amount;
<a name="l115"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCmp</span><span class=cF7>(</span><span class=cF0>view_acct,tmpb-&gt;debit</span><span class=cF7>)</span><span class=cF0>)
<a name="l116"></a> balance+=tmpb-&gt;amount;
<a name="l117"></a> c=BgtAcctColor(tmpb-&gt;credit);
<a name="l118"></a> </span><span class=cF1>if</span><span class=cF0> (c!=color) {
<a name="l119"></a> color=c;
<a name="l120"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$FG,%d$&quot;</span><span class=cF0>,color);
<a name="l121"></a> }
<a name="l122"></a> tmpb-&gt;doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(doc,
<a name="l123"></a> </span><span class=cF6>&quot;$MU-UL,\&quot;%D %8ts %8ts:%8.2f %8.2f:%$Q\&quot;,U=0x%X$\n&quot;</span><span class=cF0>,
<a name="l124"></a> tmpb-&gt;date,tmpb-&gt;credit,tmpb-&gt;debit,balance,
<a name="l125"></a> tmpb-&gt;amount,tmpb-&gt;desc,tmpb);
<a name="l126"></a> tmpb=tmpb-&gt;next;
<a name="l127"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l128"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(doc);
<a name="l129"></a>
<a name="l130"></a> </span><span class=cF1>if</span><span class=cF0> (pdoc=</span><span class=cF5>Fs</span><span class=cF0>-&gt;put_doc) </span><span class=cF7>{</span><span class=cF0>
<a name="l131"></a> </span><span class=cF5>DocLock</span><span class=cF0>(pdoc);
<a name="l132"></a></span><span class=cF2>//Now, we want to preserve old position in doc, using ugly brute force.</span><span class=cF0>
<a name="l133"></a> </span><span class=cF2>//It's tricky -- can't use old line num because of editor filters.</span><span class=cF0>
<a name="l134"></a>
<a name="l135"></a> </span><span class=cF2>//The price we pay for using the standard document editor is this kludge.</span><span class=cF0>
<a name="l136"></a> </span><span class=cF2>//When I originally wrote my budget program, I did not have separate budget</span><span class=cF0>
<a name="l137"></a> </span><span class=cF2>//and line entries, so we never had to resync.</span><span class=cF0>
<a name="l138"></a>
<a name="l139"></a> doc_ce=pdoc-&gt;cur_entry;
<a name="l140"></a> timeout_jiffy=</span><span class=cFB>cnts</span><span class=cF0>.jiffies+</span><span class=cF3>JIFFY_FREQ</span><span class=cF0>; </span><span class=cF2>//Max one second.</span><span class=cF0>
<a name="l141"></a> </span><span class=cF1>while</span><span class=cF0> (doc_ce!=pdoc &amp;&amp; </span><span class=cFB>cnts</span><span class=cF0>.jiffies&lt;timeout_jiffy) {
<a name="l142"></a> </span><span class=cF1>while</span><span class=cF0> (doc_ce-&gt;type_u8!=</span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0> || !</span><span class=cF7>(</span><span class=cF0>tmpb_ce=doc_ce-&gt;user_data</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l143"></a> doc_ce=doc_ce-&gt;next;
<a name="l144"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce==pdoc) </span><span class=cF1>goto</span><span class=cF0> br_cont;
<a name="l145"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l146"></a> tmpb=b_head.next;
<a name="l147"></a> </span><span class=cF1>while</span><span class=cF0> (tmpb!=&amp;b_head) </span><span class=cF7>{</span><span class=cF0>
<a name="l148"></a> </span><span class=cF1>if</span><span class=cF0> (tmpb==tmpb_ce) {
<a name="l149"></a> doc-&gt;cur_entry=tmpb-&gt;doc_e;
<a name="l150"></a> doc-&gt;cur_col=0;
<a name="l151"></a> </span><span class=cF5>DocCenter</span><span class=cF0>(doc);
<a name="l152"></a> </span><span class=cF1>goto</span><span class=cF0> br_cont;
<a name="l153"></a> }
<a name="l154"></a> tmpb=tmpb-&gt;next;
<a name="l155"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l156"></a> doc_ce=doc_ce-&gt;next;
<a name="l157"></a> }
<a name="l158"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l159"></a>
<a name="l160"></a> br_cont:
<a name="l161"></a> ddoc=</span><span class=cF5>Fs</span><span class=cF0>-&gt;display_doc;
<a name="l162"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;put_doc =doc;
<a name="l163"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;display_doc=doc;
<a name="l164"></a> </span><span class=cF5>DocDel</span><span class=cF0>(pdoc);
<a name="l165"></a> </span><span class=cF1>if</span><span class=cF0> (pdoc!=ddoc)
<a name="l166"></a> </span><span class=cF5>DocDel</span><span class=cF0>(ddoc);
<a name="l167"></a> doc-&gt;user_put_key=&amp;BgtPutKey;
<a name="l168"></a>}
<a name="l169"></a>
<a name="l170"></a></span><span class=cF1>U0</span><span class=cF0> Budget(</span><span class=cF1>U8</span><span class=cF0> *dirname=</span><span class=cF6>&quot;~/Budget&quot;</span><span class=cF0>)
<a name="l171"></a>{
<a name="l172"></a> </span><span class=cF9>CDoc</span><span class=cF0> *pdoc,*ddoc,*old_put,*old_display;
<a name="l173"></a>
<a name="l174"></a> </span><span class=cF5>Cd</span><span class=cF0>(dirname);
<a name="l175"></a> bgt_string_file =</span><span class=cF5>FileNameAbs</span><span class=cF0>(</span><span class=cF6>&quot;Strs.DD.Z&quot;</span><span class=cF0>);
<a name="l176"></a> bgt_accts_file =</span><span class=cF5>FileNameAbs</span><span class=cF0>(</span><span class=cF6>&quot;Accts.DD.Z&quot;</span><span class=cF0>);
<a name="l177"></a> bgt_data_file =</span><span class=cF5>FileNameAbs</span><span class=cF0>(</span><span class=cF6>&quot;Bgt.DATA.Z&quot;</span><span class=cF0>);
<a name="l178"></a>
<a name="l179"></a> BgtAcctsRead;
<a name="l180"></a> BgtDataRead;
<a name="l181"></a> CBgtTemplatesExpand;
<a name="l182"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="/Wb/Adam/TaskSettings.HC.HTML#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
<a name="l183"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l184"></a> </span><span class=cF5>WinBorder</span><span class=cF0>;
<a name="l185"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
<a name="l186"></a> </span><span class=cF5>MenuPush</span><span class=cF0>(
<a name="l187"></a> </span><span class=cF6>&quot;File {&quot;</span><span class=cF0>
<a name="l188"></a> </span><span class=cF6>&quot; Abort(,CH_SHIFT_ESC);&quot;</span><span class=cF0>
<a name="l189"></a> </span><span class=cF6>&quot; Exit(,CH_ESC);&quot;</span><span class=cF0>
<a name="l190"></a> </span><span class=cF6>&quot;}&quot;</span><span class=cF0>
<a name="l191"></a> </span><span class=cF6>&quot;Edit {&quot;</span><span class=cF0>
<a name="l192"></a> </span><span class=cF6>&quot; NewEntry(,'n');&quot;</span><span class=cF0>
<a name="l193"></a> </span><span class=cF6>&quot; CopyEntry(,'c');&quot;</span><span class=cF0>
<a name="l194"></a> </span><span class=cF6>&quot; PeriodicEntry(,'p');&quot;</span><span class=cF0>
<a name="l195"></a> </span><span class=cF6>&quot; EditEntry(,'\n');&quot;</span><span class=cF0>
<a name="l196"></a> </span><span class=cF6>&quot; DeleteEntry(,CH_CTRLY);&quot;</span><span class=cF0>
<a name="l197"></a> </span><span class=cF6>&quot; NewTemplate(,'t');&quot;</span><span class=cF0>
<a name="l198"></a> </span><span class=cF6>&quot; AcctsFile(,'a');&quot;</span><span class=cF0>
<a name="l199"></a> </span><span class=cF6>&quot;}&quot;</span><span class=cF0>
<a name="l200"></a> </span><span class=cF6>&quot;View {&quot;</span><span class=cF0>
<a name="l201"></a> </span><span class=cF6>&quot; ViewAcct(,'v');&quot;</span><span class=cF0>
<a name="l202"></a> </span><span class=cF6>&quot;}&quot;</span><span class=cF0>
<a name="l203"></a> );
<a name="l204"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(view_acct,</span><span class=cF6>&quot;BANK&quot;</span><span class=cF0>);
<a name="l205"></a> </span><span class=cF5>DocMax</span><span class=cF0>;
<a name="l206"></a> old_put =</span><span class=cF5>Fs</span><span class=cF0>-&gt;put_doc;
<a name="l207"></a> old_display =</span><span class=cF5>Fs</span><span class=cF0>-&gt;display_doc;
<a name="l208"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;put_doc =</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l209"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;display_doc=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l210"></a> BgtRegen;
<a name="l211"></a> </span><span class=cF1>try</span><span class=cF0>
<a name="l212"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>View</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l213"></a> BgtDataWrite;
<a name="l214"></a> BgtAcctsWrite;
<a name="l215"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l216"></a> </span><span class=cF1>catch</span><span class=cF0>
<a name="l217"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
<a name="l218"></a>
<a name="l219"></a> pdoc=</span><span class=cF5>Fs</span><span class=cF0>-&gt;put_doc;
<a name="l220"></a> ddoc=</span><span class=cF5>Fs</span><span class=cF0>-&gt;display_doc;
<a name="l221"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;put_doc =old_put;
<a name="l222"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;display_doc=old_display;
<a name="l223"></a> </span><span class=cF5>DocDel</span><span class=cF0>(pdoc);
<a name="l224"></a> </span><span class=cF1>if</span><span class=cF0> (pdoc!=ddoc)
<a name="l225"></a> </span><span class=cF5>DocDel</span><span class=cF0>(ddoc);
<a name="l226"></a>
<a name="l227"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l228"></a> BgtDel;
<a name="l229"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
<a name="l230"></a>}
</span></pre></body>
</html>