297 lines
30 KiB
Plaintext
297 lines
30 KiB
Plaintext
|
<!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=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"DolDoc/Output;StdOut/DolDoc"</span><span class=cF0>
|
||
|
<a name="l2"></a>
|
||
|
<a name="l3"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>View</span><span class=cF0>()
|
||
|
<a name="l4"></a>{</span><span class=cF2>//Go live for user interaction until <ESC> or <SHIFT-ESC>.</span><span class=cF0>
|
||
|
<a name="l5"></a> </span><span class=cF9>I64</span><span class=cF0> ch;
|
||
|
<a name="l6"></a> </span><span class=cF1>do</span><span class=cF0> ch=</span><span class=cF5>DocGetKey</span><span class=cF0>;
|
||
|
<a name="l7"></a> </span><span class=cF1>while</span><span class=cF0> (ch!=</span><span class=cF3>CH_ESC</span><span class=cF0> && ch!=</span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
|
||
|
<a name="l8"></a> </span><span class=cF1>return</span><span class=cF0> ch==</span><span class=cF3>CH_ESC</span><span class=cF0>;
|
||
|
<a name="l9"></a>}
|
||
|
<a name="l10"></a>
|
||
|
<a name="l11"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"DolDoc"</span><span class=cF0>
|
||
|
<a name="l12"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>EdOverStrikeCB</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e,</span><span class=cF9>CTask</span><span class=cF0> *mem_task)
|
||
|
<a name="l13"></a>{
|
||
|
<a name="l14"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=doc_e->user_data;
|
||
|
<a name="l15"></a> </span><span class=cF1>U8</span><span class=cF0> *st=</span><span class=cF5>MAlloc</span><span class=cF0>(8,mem_task);
|
||
|
<a name="l16"></a> </span><span class=cF1>if</span><span class=cF0> (doc->flags & </span><span class=cF3>DOCF_OVERSTRIKE</span><span class=cF0>)
|
||
|
<a name="l17"></a> *st=</span><span class=cF6>'O'</span><span class=cF0>;
|
||
|
<a name="l18"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l19"></a> *st=</span><span class=cF6>'.'</span><span class=cF0>;
|
||
|
<a name="l20"></a> st[1]=0;
|
||
|
<a name="l21"></a> </span><span class=cF1>return</span><span class=cF0> st;
|
||
|
<a name="l22"></a>}
|
||
|
<a name="l23"></a>
|
||
|
<a name="l24"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>EdAutoSaveCB</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e,</span><span class=cF9>CTask</span><span class=cF0> *mem_task)
|
||
|
<a name="l25"></a>{
|
||
|
<a name="l26"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=doc_e->user_data;
|
||
|
<a name="l27"></a> </span><span class=cF1>U8</span><span class=cF0> *st=</span><span class=cF5>MAlloc</span><span class=cF0>(8,mem_task);
|
||
|
<a name="l28"></a> </span><span class=cF1>if</span><span class=cF0> (doc->flags & </span><span class=cF3>DOCF_AUTO_SAVE</span><span class=cF0>)
|
||
|
<a name="l29"></a> *st=</span><span class=cF6>'S'</span><span class=cF0>;
|
||
|
<a name="l30"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l31"></a> *st=</span><span class=cF6>'.'</span><span class=cF0>;
|
||
|
<a name="l32"></a> st[1]=0;
|
||
|
<a name="l33"></a> </span><span class=cF1>return</span><span class=cF0> st;
|
||
|
<a name="l34"></a>}
|
||
|
<a name="l35"></a>
|
||
|
<a name="l36"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>EdFilterCB</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e,</span><span class=cF9>CTask</span><span class=cF0> *mem_task)
|
||
|
<a name="l37"></a>{
|
||
|
<a name="l38"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=doc_e->user_data;
|
||
|
<a name="l39"></a> </span><span class=cF1>U8</span><span class=cF0> *st=</span><span class=cF5>MAlloc</span><span class=cF0>(8,mem_task);
|
||
|
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (doc->find_replace->filter_lines)
|
||
|
<a name="l41"></a> *st=</span><span class=cF6>'F'</span><span class=cF0>;
|
||
|
<a name="l42"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l43"></a> *st=</span><span class=cF6>'.'</span><span class=cF0>;
|
||
|
<a name="l44"></a> st[1]=0;
|
||
|
<a name="l45"></a> </span><span class=cF1>return</span><span class=cF0> st;
|
||
|
<a name="l46"></a>}
|
||
|
<a name="l47"></a>
|
||
|
<a name="l48"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>EdDollarCB</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e,</span><span class=cF9>CTask</span><span class=cF0> *mem_task)
|
||
|
<a name="l49"></a>{
|
||
|
<a name="l50"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=doc_e->user_data;
|
||
|
<a name="l51"></a> </span><span class=cF1>U8</span><span class=cF0> *st=</span><span class=cF5>MAlloc</span><span class=cF0>(8,mem_task);
|
||
|
<a name="l52"></a> </span><span class=cF1>if</span><span class=cF0> (doc->flags & </span><span class=cF3>DOCF_IN_DOLLAR</span><span class=cF0>)
|
||
|
<a name="l53"></a> *st=</span><span class=cF6>'$'</span><span class=cF0>;
|
||
|
<a name="l54"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l55"></a> *st=</span><span class=cF6>'.'</span><span class=cF0>;
|
||
|
<a name="l56"></a> st[1]=0;
|
||
|
<a name="l57"></a> </span><span class=cF1>return</span><span class=cF0> st;
|
||
|
<a name="l58"></a>}
|
||
|
<a name="l59"></a>
|
||
|
<a name="l60"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>EdMoreCB</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e,</span><span class=cF9>CTask</span><span class=cF0> *mem_task)
|
||
|
<a name="l61"></a>{
|
||
|
<a name="l62"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=doc_e->user_data;
|
||
|
<a name="l63"></a> </span><span class=cF1>U8</span><span class=cF0> *st=</span><span class=cF5>MAlloc</span><span class=cF0>(8,mem_task);
|
||
|
<a name="l64"></a> </span><span class=cF1>if</span><span class=cF0> (doc->flags&</span><span class=cF3>DOCF_MORE</span><span class=cF0>)
|
||
|
<a name="l65"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(st,</span><span class=cF6>"More."</span><span class=cF0>);
|
||
|
<a name="l66"></a> </span><span class=cF1>else</span><span class=cF0>
|
||
|
<a name="l67"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(st,</span><span class=cF6>"....."</span><span class=cF0>);
|
||
|
<a name="l68"></a> </span><span class=cF1>return</span><span class=cF0> st;
|
||
|
<a name="l69"></a>}
|
||
|
<a name="l70"></a>
|
||
|
<a name="l71"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>EdDollarTypeCB</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e,</span><span class=cF9>CTask</span><span class=cF0> *mem_task)
|
||
|
<a name="l72"></a>{
|
||
|
<a name="l73"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=doc_e->user_data;
|
||
|
<a name="l74"></a> </span><span class=cF1>U8</span><span class=cF0> *src=</span><span class=cF5>DefineSub</span><span class=cF0>(doc->cur_entry->type_u8,</span><span class=cF6>"ST_DOC_CMDS"</span><span class=cF0>),
|
||
|
<a name="l75"></a> *st=</span><span class=cF5>CAlloc</span><span class=cF0>(8,mem_task);
|
||
|
<a name="l76"></a> </span><span class=cF1>if</span><span class=cF0> (doc->cur_entry==doc)
|
||
|
<a name="l77"></a> src=</span><span class=cF6>"EOF"</span><span class=cF0>;
|
||
|
<a name="l78"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (!src)
|
||
|
<a name="l79"></a> src=</span><span class=cF6>"ERR"</span><span class=cF0>;
|
||
|
<a name="l80"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(st,</span><span class=cF6>"%-3ts"</span><span class=cF0>,src);
|
||
|
<a name="l81"></a> </span><span class=cF1>return</span><span class=cF0> st;
|
||
|
<a name="l82"></a>}
|
||
|
<a name="l83"></a>
|
||
|
<a name="l84"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>DocEd</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF9>I64</span><span class=cF0> dof_flags=0)
|
||
|
<a name="l85"></a>{</span><span class=cF2>//Live for user interaction. End on <ESC> or <SHIFT-ESC>.</span><span class=cF0>
|
||
|
<a name="l86"></a> </span><span class=cF9>CDoc</span><span class=cF0> *old_put_doc =</span><span class=cF5>DocPut</span><span class=cF0>,
|
||
|
<a name="l87"></a> *old_display_doc=</span><span class=cF5>DocDisplay</span><span class=cF0>,
|
||
|
<a name="l88"></a> *old_border_doc =</span><span class=cF5>DocBorder</span><span class=cF0>,*bdoc;
|
||
|
<a name="l89"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
|
||
|
<a name="l90"></a> </span><span class=cF9>I64</span><span class=cF0> old_attr=</span><span class=cF5>Fs</span><span class=cF0>->text_attr,
|
||
|
<a name="l91"></a> old_top =</span><span class=cF5>Fs</span><span class=cF0>->win_top, old_bottom=</span><span class=cF5>Fs</span><span class=cF0>->win_bottom,
|
||
|
<a name="l92"></a> old_left=</span><span class=cF5>Fs</span><span class=cF0>->win_left,old_right =</span><span class=cF5>Fs</span><span class=cF0>->win_right,
|
||
|
<a name="l93"></a> old_title_src=</span><span class=cF5>Fs</span><span class=cF0>->title_src;
|
||
|
<a name="l94"></a> </span><span class=cF1>Bool</span><span class=cF0> res,unlock;
|
||
|
<a name="l95"></a> </span><span class=cF1>U8</span><span class=cF0> *old_task_title;
|
||
|
<a name="l96"></a> </span><span class=cF1>if</span><span class=cF0> (dof_flags&</span><span class=cF3>DOF_WIN_MAX</span><span class=cF0>)
|
||
|
<a name="l97"></a> </span><span class=cF5>WinMax</span><span class=cF0>;
|
||
|
<a name="l98"></a>
|
||
|
<a name="l99"></a> unlock=</span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
||
|
<a name="l100"></a> doc->win_task=</span><span class=cF5>Fs</span><span class=cF0>;
|
||
|
<a name="l101"></a> bdoc=</span><span class=cF5>DocNew</span><span class=cF0>;
|
||
|
<a name="l102"></a> bdoc->flags|=</span><span class=cF3>DOCF_BORDER_DOC</span><span class=cF0>;
|
||
|
<a name="l103"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$CM+TY+LX+NC,0,-1$"</span><span class=cF0>);
|
||
|
<a name="l104"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$TX+RX+BD,\"[X]\"$"</span><span class=cF0>);
|
||
|
<a name="l105"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$BK,1$$TX+LX+BD,\"MENU\"$$BK,0$"</span><span class=cF0>);
|
||
|
<a name="l106"></a>
|
||
|
<a name="l107"></a> old_task_title=</span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title);
|
||
|
<a name="l108"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Fs</span><span class=cF0>->title_src!=</span><span class=cF3>TTS_LOCKED_CONST</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l109"></a> </span><span class=cF5>Fs</span><span class=cF0>->title_src=</span><span class=cF3>TTS_ED_FILENAME</span><span class=cF0>;
|
||
|
<a name="l110"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title,doc->filename.name,</span><span class=cF3>STR_LEN</span><span class=cF0>-1);
|
||
|
<a name="l111"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l112"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$DA-TRM-P+BD+RD+CX+IV,LEN=STR_LEN-1,"</span><span class=cF0>
|
||
|
<a name="l113"></a> </span><span class=cF6>"A=\"%%s...\",SCX=16$"</span><span class=cF0>);
|
||
|
<a name="l114"></a> doc_e->data=&</span><span class=cF5>Fs</span><span class=cF0>->task_title;
|
||
|
<a name="l115"></a> </span><span class=cF5>DocDataFmt</span><span class=cF0>(bdoc,doc_e);
|
||
|
<a name="l116"></a>
|
||
|
<a name="l117"></a> </span><span class=cF1>if</span><span class=cF0> (doc->flags & </span><span class=cF3>DOCF_ALLOW_UNDO</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l118"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$CM+BY+LX+NC,1,1$"</span><span class=cF0>);
|
||
|
<a name="l119"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$DA+BD+RD-TRM,RT=U32,A=\"Undo:%%03d\"$\n"</span><span class=cF0>);
|
||
|
<a name="l120"></a> doc_e->data=&doc->undo_cnt;
|
||
|
<a name="l121"></a> </span><span class=cF5>DocDataFmt</span><span class=cF0>(bdoc,doc_e);
|
||
|
<a name="l122"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l123"></a>
|
||
|
<a name="l124"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$CM+BY+RX+NC,-31,1$"</span><span class=cF0>);
|
||
|
<a name="l125"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$TX+BD+TC,\" \"$"</span><span class=cF0>);
|
||
|
<a name="l126"></a> doc_e->user_data=doc;
|
||
|
<a name="l127"></a> doc_e->tag_cb=&</span><span class=cF5>EdMoreCB</span><span class=cF0>;
|
||
|
<a name="l128"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$TX+BD+TC,\" \"$"</span><span class=cF0>);
|
||
|
<a name="l129"></a> doc_e->user_data=doc;
|
||
|
<a name="l130"></a> doc_e->tag_cb=&</span><span class=cF5>EdDollarTypeCB</span><span class=cF0>;
|
||
|
<a name="l131"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$TX+BD+TC,\" \"$"</span><span class=cF0>);
|
||
|
<a name="l132"></a> doc_e->user_data=doc;
|
||
|
<a name="l133"></a> doc_e->tag_cb=&</span><span class=cF5>EdFilterCB</span><span class=cF0>;
|
||
|
<a name="l134"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$TX+BD+TC,\" \"$"</span><span class=cF0>);
|
||
|
<a name="l135"></a> doc_e->user_data=doc;
|
||
|
<a name="l136"></a> doc_e->tag_cb=&</span><span class=cF5>EdOverStrikeCB</span><span class=cF0>;
|
||
|
<a name="l137"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$TX+BD+TC,\" \"$"</span><span class=cF0>);
|
||
|
<a name="l138"></a> doc_e->user_data=doc;
|
||
|
<a name="l139"></a> doc_e->tag_cb=&</span><span class=cF5>EdAutoSaveCB</span><span class=cF0>;
|
||
|
<a name="l140"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$TX+BD+TC,\" \"$"</span><span class=cF0>);
|
||
|
<a name="l141"></a> doc_e->user_data=doc;
|
||
|
<a name="l142"></a> doc_e->tag_cb=&</span><span class=cF5>EdDollarCB</span><span class=cF0>;
|
||
|
<a name="l143"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$DA+BD+RD-TRM,A=\"Line:%%04d \"$"</span><span class=cF0>);
|
||
|
<a name="l144"></a> doc_e->data=&doc->line;
|
||
|
<a name="l145"></a> </span><span class=cF5>DocDataFmt</span><span class=cF0>(bdoc,doc_e);
|
||
|
<a name="l146"></a> doc_e=</span><span class=cF5>DocPrint</span><span class=cF0>(bdoc,</span><span class=cF6>"$DA+BD+RD-TRM,A=\"Col:%%04d\"$\n"</span><span class=cF0>);
|
||
|
<a name="l147"></a> doc_e->data=&doc->col;
|
||
|
<a name="l148"></a> </span><span class=cF5>DocDataFmt</span><span class=cF0>(bdoc,doc_e);
|
||
|
<a name="l149"></a>
|
||
|
<a name="l150"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(bdoc);
|
||
|
<a name="l151"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(doc);
|
||
|
<a name="l152"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>dof_flags&</span><span class=cF3>DOF_DONT_HOME</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l153"></a> </span><span class=cF5>DocTop</span><span class=cF0>(doc);
|
||
|
<a name="l154"></a> </span><span class=cF5>Fs</span><span class=cF0>->border_doc=bdoc;
|
||
|
<a name="l155"></a> </span><span class=cF1>if</span><span class=cF0> (doc!=old_display_doc)
|
||
|
<a name="l156"></a> doc->parent_doc=old_display_doc;
|
||
|
<a name="l157"></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="l158"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>dof_flags&</span><span class=cF3>DOF_DONT_TEXT_ATTR</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l159"></a> </span><span class=cF5>Fs</span><span class=cF0>->text_attr=</span><span class=cF3>DOC_ATTR_DFT_TEXT</span><span class=cF0>;
|
||
|
<a name="l160"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>dof_flags&</span><span class=cF3>DOF_DONT_SHOW</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l161"></a> </span><span class=cF5>LBts</span><span class=cF0>(&</span><span class=cF5>Fs</span><span class=cF0>->display_flags,</span><span class=cF3>DISPLAYf_SHOW</span><span class=cF0>);
|
||
|
<a name="l162"></a> </span><span class=cF5>WinZBufUpdate</span><span class=cF0>;
|
||
|
<a name="l163"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l164"></a> </span><span class=cF1>if</span><span class=cF0> (dof_flags&</span><span class=cF3>DOF_SIZE_MIN</span><span class=cF0>)
|
||
|
<a name="l165"></a> doc->flags|=</span><span class=cF3>DOCF_SIZE_MIN</span><span class=cF0>;
|
||
|
<a name="l166"></a>
|
||
|
<a name="l167"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
||
|
<a name="l168"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>dof_flags&</span><span class=cF3>DOF_DONT_WINMGR_SYNC</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l169"></a> </span><span class=cF5>Refresh</span><span class=cF0>(2,</span><span class=cF3>TRUE</span><span class=cF0>);
|
||
|
<a name="l170"></a> </span><span class=cF1>if</span><span class=cF0> (doc->flags&</span><span class=cF3>DOCF_SIZE_MIN</span><span class=cF0>)
|
||
|
<a name="l171"></a> </span><span class=cF5>Refresh</span><span class=cF0>(2,</span><span class=cF3>TRUE</span><span class=cF0>);
|
||
|
<a name="l172"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l173"></a> res=</span><span class=cF5>View</span><span class=cF0>;
|
||
|
<a name="l174"></a>
|
||
|
<a name="l175"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
||
|
<a name="l176"></a> </span><span class=cF1>if</span><span class=cF0> (res) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l177"></a> doc_e=doc->head.next;
|
||
|
<a name="l178"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc) {
|
||
|
<a name="l179"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8==</span><span class=cF3>DOCT_DATA</span><span class=cF0> || doc_e->type_u8==</span><span class=cF3>DOCT_CHECK_BOX</span><span class=cF0>)
|
||
|
<a name="l180"></a> </span><span class=cF5>DocDataScan</span><span class=cF0>(doc,doc_e);
|
||
|
<a name="l181"></a> doc_e=doc_e->next;
|
||
|
<a name="l182"></a> }
|
||
|
<a name="l183"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l184"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
|
||
|
<a name="l185"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
||
|
<a name="l186"></a> </span><span class=cF5>Fs</span><span class=cF0>->border_doc =old_border_doc;
|
||
|
<a name="l187"></a> </span><span class=cF5>Fs</span><span class=cF0>->display_doc=old_display_doc;
|
||
|
<a name="l188"></a> </span><span class=cF5>Fs</span><span class=cF0>->put_doc =old_put_doc;
|
||
|
<a name="l189"></a> </span><span class=cF5>Fs</span><span class=cF0>->text_attr =old_attr;
|
||
|
<a name="l190"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Fs</span><span class=cF0>->title_src!=</span><span class=cF3>TTS_LOCKED_CONST</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l191"></a> </span><span class=cF5>Fs</span><span class=cF0>->title_src =old_title_src;
|
||
|
<a name="l192"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>->task_title,old_task_title);
|
||
|
<a name="l193"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l194"></a> </span><span class=cF5>Free</span><span class=cF0>(old_task_title);
|
||
|
<a name="l195"></a> </span><span class=cF5>DocDel</span><span class=cF0>(bdoc);
|
||
|
<a name="l196"></a> </span><span class=cF1>if</span><span class=cF0> (dof_flags&</span><span class=cF3>DOF_SIZE_MIN</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l197"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(old_left,old_right);
|
||
|
<a name="l198"></a> </span><span class=cF5>WinVert</span><span class=cF0>(old_top,old_bottom);
|
||
|
<a name="l199"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l200"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
||
|
<a name="l201"></a>}
|
||
|
<a name="l202"></a>
|
||
|
<a name="l203"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"DolDoc/Cmd Line (Typically);Cmd Line (Typically)"</span><span class=cF0>
|
||
|
<a name="l204"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>Ed</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *link_st,</span><span class=cF9>I64</span><span class=cF0> edf_dof_flags=0)
|
||
|
<a name="l205"></a>{</span><span class=cF2>//Invoke document editor.</span><span class=cF0>
|
||
|
<a name="l206"></a> </span><span class=cF1>U8</span><span class=cF0> *filename,*needle_str;
|
||
|
<a name="l207"></a> </span><span class=cF9>I64</span><span class=cF0> i,num;
|
||
|
<a name="l208"></a> </span><span class=cF1>Bool</span><span class=cF0> cont,res=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l209"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
|
||
|
<a name="l210"></a>
|
||
|
<a name="l211"></a> </span><span class=cF1>switch</span><span class=cF0> (i=</span><span class=cF5>EdLinkCvt</span><span class=cF7>(</span><span class=cF0>link_st,&filename,&needle_str,&num,edf_dof_flags</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
||
|
<a name="l212"></a> </span><span class=cF1>case</span><span class=cF0> -1:
|
||
|
<a name="l213"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l214"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DEF</span><span class=cF0>:
|
||
|
<a name="l215"></a> doc=</span><span class=cF5>DocNew</span><span class=cF0>;
|
||
|
<a name="l216"></a> doc->desc=</span><span class=cF6>'DictDef'</span><span class=cF0>;
|
||
|
<a name="l217"></a> </span><span class=cF5>ACDDefsPut</span><span class=cF0>(doc,filename,num);
|
||
|
<a name="l218"></a> </span><span class=cF1>goto</span><span class=cF0> ej_doc;
|
||
|
<a name="l219"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_HELP_INDEX</span><span class=cF0>:
|
||
|
<a name="l220"></a> doc=</span><span class=cF5>DocNew</span><span class=cF0>;
|
||
|
<a name="l221"></a> doc->desc=</span><span class=cF6>'HelpIndx'</span><span class=cF0>;
|
||
|
<a name="l222"></a> </span><span class=cF5>DocHelpIdx</span><span class=cF0>(doc,filename);
|
||
|
<a name="l223"></a>ej_doc:
|
||
|
<a name="l224"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>edf_dof_flags&</span><span class=cF3>EDF_BAIL</span><span class=cF7>)</span><span class=cF0>) {
|
||
|
<a name="l225"></a> </span><span class=cF5>DocEd</span><span class=cF0>(doc);
|
||
|
<a name="l226"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
||
|
<a name="l227"></a> }
|
||
|
<a name="l228"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>edf_dof_flags&</span><span class=cF3>EDF_WAS_WRITE</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l229"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l230"></a> </span><span class=cF1>break</span><span class=cF0>;
|
||
|
<a name="l231"></a> </span><span class=cF1>default</span><span class=cF0>:
|
||
|
<a name="l232"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>IsRaw</span><span class=cF0>)
|
||
|
<a name="l233"></a> res=</span><span class=cF5>EdLite</span><span class=cF0>(filename,num,edf_dof_flags);
|
||
|
<a name="l234"></a> </span><span class=cF1>else</span><span class=cF0> {
|
||
|
<a name="l235"></a> cont=</span><span class=cF3>TRUE</span><span class=cF0>;
|
||
|
<a name="l236"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>edf_dof_flags&</span><span class=cF3>EDF_BAIL</span><span class=cF7>)</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF3>LK_DOC</span><span class=cF0><=i<=</span><span class=cF3>LK_DOC_LINE</span><span class=cF7>)</span><span class=cF0> &&
|
||
|
<a name="l237"></a> !</span><span class=cF5>FilesFindMatch</span><span class=cF7>(</span><span class=cF0>filename,</span><span class=cF3>FILEMASK_TXT</span><span class=cF7>)</span><span class=cF0> &&
|
||
|
<a name="l238"></a> !</span><span class=cF5>PopUpCancelOk</span><span class=cF7>(</span><span class=cF3>ST_WARN_ST</span><span class=cF0> </span><span class=cF6>"Not Text File\n\n"</span><span class=cF7>)</span><span class=cF0>)
|
||
|
<a name="l239"></a> cont=</span><span class=cF3>FALSE</span><span class=cF0>;
|
||
|
<a name="l240"></a> </span><span class=cF1>if</span><span class=cF0> (cont)
|
||
|
<a name="l241"></a> res=</span><span class=cF5>DocFileEd</span><span class=cF0>(i,filename,needle_str,&num,edf_dof_flags);
|
||
|
<a name="l242"></a> }
|
||
|
<a name="l243"></a> </span><span class=cF7>}</span><span class=cF0>
|
||
|
<a name="l244"></a> </span><span class=cF5>Free</span><span class=cF0>(filename);
|
||
|
<a name="l245"></a> </span><span class=cF5>Free</span><span class=cF0>(needle_str);
|
||
|
<a name="l246"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
||
|
<a name="l247"></a>}
|
||
|
<a name="l248"></a>
|
||
|
<a name="l249"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>Plain</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *filename,</span><span class=cF9>I64</span><span class=cF0> edf_dof_flags=0)
|
||
|
<a name="l250"></a>{</span><span class=cF2>//Edit document in plain text mode, so dollar signs are not special.</span><span class=cF0>
|
||
|
<a name="l251"></a> </span><span class=cF1>Bool</span><span class=cF0> res;
|
||
|
<a name="l252"></a> </span><span class=cF1>U8</span><span class=cF0> *st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"PI:%s"</span><span class=cF0>,filename);
|
||
|
<a name="l253"></a> res=</span><span class=cF5>Ed</span><span class=cF0>(st,edf_dof_flags);
|
||
|
<a name="l254"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
||
|
<a name="l255"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
||
|
<a name="l256"></a>}
|
||
|
<a name="l257"></a>
|
||
|
<a name="l258"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"DolDoc;Job/Exe;Task/Job/Exe"</span><span class=cF0>
|
||
|
<a name="l259"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PopUpEd</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *filename,</span><span class=cF9>CTask</span><span class=cF0> *parent=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF9>CTask</span><span class=cF0> **_pu_task=</span><span class=cF3>NULL</span><span class=cF0>)
|
||
|
<a name="l260"></a>{</span><span class=cF2>//Create PopUp win task and edit a doc.</span><span class=cF0>
|
||
|
<a name="l261"></a> </span><span class=cF1>U8</span><span class=cF0> *st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"Ed(\"%Q\");"</span><span class=cF0>,filename);
|
||
|
<a name="l262"></a> </span><span class=cF9>I64</span><span class=cF0> res=</span><span class=cF5>PopUp</span><span class=cF0>(st,parent,_pu_task);
|
||
|
<a name="l263"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
||
|
<a name="l264"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
||
|
<a name="l265"></a>}
|
||
|
</span></pre></body>
|
||
|
</html>
|