ZealOS/docs/System/DolDoc/DocForm.CC.html
2021-12-04 05:03:02 -05:00

450 lines
48 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V1.06">
<style type="text/css">
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;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;DolDoc/Form&quot;</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocFormFwd</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF1>Bool</span><span class=cF0> giveup=</span><span class=cF3>FALSE</span><span class=cF0>)
<a name="l4"></a>{
<a name="l5"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e = doc-&gt;cur_entry, *doc_e2 = doc_e;
<a name="l6"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;flags &amp; </span><span class=cF3>DOCF_FORM</span><span class=cF0>)
<a name="l7"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l8"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e == doc)
<a name="l9"></a> </span><span class=cF1>goto</span><span class=cF0> ff_recover;
<a name="l10"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>doldoc</span><span class=cF0>.type_flags_form, doc_e-&gt;type_u8</span><span class=cF7>)</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LINK</span><span class=cF7>)</span><span class=cF0> ||
<a name="l11"></a> doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_SKIP_IN_FORM</span><span class=cF0>)
<a name="l12"></a> {
<a name="l13"></a> doc_e = doc_e-&gt;next;
<a name="l14"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e == doc)
<a name="l15"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l16"></a>ff_recover:
<a name="l17"></a> doc-&gt;cur_col = </span><span class=cFE>0</span><span class=cF0>;
<a name="l18"></a> </span><span class=cF1>if</span><span class=cF0> (!giveup)
<a name="l19"></a> {
<a name="l20"></a> doc-&gt;cur_entry = doc_e-&gt;last;
<a name="l21"></a> </span><span class=cF5>DocFormBwd</span><span class=cF0>(doc, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l22"></a> }
<a name="l23"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l24"></a> doc-&gt;cur_entry = doc;
<a name="l25"></a> </span><span class=cF1>return</span><span class=cF0>;
<a name="l26"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l27"></a> }
<a name="l28"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l29"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_INDENT</span><span class=cF0>)
<a name="l30"></a> doc_e = doc_e-&gt;next;
<a name="l31"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e != doc_e2)
<a name="l32"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l33"></a> doc-&gt;cur_col = doc_e-&gt;min_col;
<a name="l34"></a> doc-&gt;cur_entry = doc_e;
<a name="l35"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l36"></a>}
<a name="l37"></a>
<a name="l38"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocFormBwd</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF1>Bool</span><span class=cF0> giveup=</span><span class=cF3>FALSE</span><span class=cF0>)
<a name="l39"></a>{
<a name="l40"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e = doc-&gt;cur_entry, *doc_e2 = doc_e;
<a name="l41"></a>
<a name="l42"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;flags &amp; </span><span class=cF3>DOCF_FORM</span><span class=cF0>)
<a name="l43"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l44"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cFB>doldoc</span><span class=cF0>.type_flags_form, doc_e-&gt;type_u8</span><span class=cF7>)</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LINK</span><span class=cF7>)</span><span class=cF0> ||
<a name="l45"></a> doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_SKIP_IN_FORM</span><span class=cF0>)
<a name="l46"></a> {
<a name="l47"></a> doc_e = doc_e-&gt;last;
<a name="l48"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e == doc)
<a name="l49"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l50"></a> doc-&gt;cur_col = </span><span class=cFE>0</span><span class=cF0>;
<a name="l51"></a> </span><span class=cF1>if</span><span class=cF0> (!giveup)
<a name="l52"></a> {
<a name="l53"></a> doc-&gt;cur_entry = doc_e-&gt;next;
<a name="l54"></a> </span><span class=cF5>DocFormFwd</span><span class=cF0>(doc, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l55"></a> }
<a name="l56"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l57"></a> doc-&gt;cur_entry = doc;
<a name="l58"></a> </span><span class=cF1>return</span><span class=cF0>;
<a name="l59"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l60"></a> }
<a name="l61"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l62"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_INDENT</span><span class=cF0>)
<a name="l63"></a> doc_e = doc_e-&gt;next;
<a name="l64"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e != doc_e2)
<a name="l65"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l66"></a> doc-&gt;cur_col = doc_e-&gt;min_col;
<a name="l67"></a> doc-&gt;cur_entry = doc_e;
<a name="l68"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l69"></a>}
<a name="l70"></a>
<a name="l71"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocDataFormat</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, </span><span class=cF9>I64</span><span class=cF0> d=</span><span class=cF3>DOCM_CANCEL</span><span class=cF0>)
<a name="l72"></a>{
<a name="l73"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l74"></a> </span><span class=cF1>U8</span><span class=cF0> *ptr, *ptr2;
<a name="l75"></a> </span><span class=cF9>CHashDefineStr</span><span class=cF0> *tmph;
<a name="l76"></a>
<a name="l77"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_DATA</span><span class=cF0> &amp;&amp; doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_AUX_STR</span><span class=cF0> ||
<a name="l78"></a> doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_CHECK_BOX</span><span class=cF0> ||
<a name="l79"></a> doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LIST</span><span class=cF0>)
<a name="l80"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l81"></a> </span><span class=cF1>if</span><span class=cF0> (d == </span><span class=cF3>DOCM_CANCEL</span><span class=cF0>)
<a name="l82"></a> {
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_DEREF_DATA</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_REMALLOC_DATA</span><span class=cF7>)</span><span class=cF0>)
<a name="l84"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l85"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>ptr = doc_e-&gt;data</span><span class=cF7>)</span><span class=cF0>)
<a name="l86"></a> </span><span class=cF1>return</span><span class=cF0>;
<a name="l87"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l88"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l89"></a> ptr = &amp;doc_e-&gt;data;
<a name="l90"></a> </span><span class=cF1>switch</span><span class=cF0> (doc_e-&gt;raw_type)
<a name="l91"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l92"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I0</span><span class=cF0>:
<a name="l93"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U0</span><span class=cF0>: d = </span><span class=cFE>0</span><span class=cF0>; </span><span class=cF1>break</span><span class=cF0>;
<a name="l94"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I8</span><span class=cF0>: d = *ptr(</span><span class=cF1>I8</span><span class=cF0> *); </span><span class=cF1>break</span><span class=cF0>;
<a name="l95"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U8</span><span class=cF0>: d = *ptr(</span><span class=cF1>U8</span><span class=cF0> *); </span><span class=cF1>break</span><span class=cF0>;
<a name="l96"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I16</span><span class=cF0>: d = *ptr(</span><span class=cF9>I16</span><span class=cF0> *); </span><span class=cF1>break</span><span class=cF0>;
<a name="l97"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U16</span><span class=cF0>: d = *ptr(</span><span class=cF9>U16</span><span class=cF0> *); </span><span class=cF1>break</span><span class=cF0>;
<a name="l98"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I32</span><span class=cF0>: d = *ptr(</span><span class=cF9>I32</span><span class=cF0> *); </span><span class=cF1>break</span><span class=cF0>;
<a name="l99"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U32</span><span class=cF0>: d = *ptr(</span><span class=cF9>U32</span><span class=cF0> *); </span><span class=cF1>break</span><span class=cF0>;
<a name="l100"></a> </span><span class=cF1>default</span><span class=cF0>: d = *ptr(</span><span class=cF9>I64</span><span class=cF0> *);
<a name="l101"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l102"></a> }
<a name="l103"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_DATA</span><span class=cF0>)
<a name="l104"></a> {
<a name="l105"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_REMALLOC_DATA</span><span class=cF0>)
<a name="l106"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l107"></a> ptr = </span><span class=cF5>MStrPrint</span><span class=cF0>(doc_e-&gt;aux_str, d, doc_e-&gt;my_format_data);
<a name="l108"></a> i = </span><span class=cF5>StrLen</span><span class=cF0>(ptr);
<a name="l109"></a> </span><span class=cF1>if</span><span class=cF0> (!doc_e-&gt;data)
<a name="l110"></a> {
<a name="l111"></a> doc_e-&gt;data = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cFE>2</span><span class=cF0>, doc-&gt;mem_task);
<a name="l112"></a> doc_e-&gt;len = </span><span class=cF5>MSize</span><span class=cF0>(doc_e-&gt;data) - </span><span class=cFE>2</span><span class=cF0>;
<a name="l113"></a> }
<a name="l114"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;len + doc_e-&gt;min_col &gt; i)
<a name="l115"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(doc_e-&gt;tag, ptr, i + </span><span class=cFE>1</span><span class=cF0>);
<a name="l116"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l117"></a> {
<a name="l118"></a> ptr2 = </span><span class=cF5>MAlloc</span><span class=cF0>(i + </span><span class=cFE>8</span><span class=cF0>, doc-&gt;mem_task);
<a name="l119"></a> doc_e-&gt;len = </span><span class=cF5>MSize</span><span class=cF0>(ptr2) - doc_e-&gt;min_col - </span><span class=cFE>2</span><span class=cF0>; </span><span class=cF2>//See </span><a href="https://zeal-operating-system.github.io/ZealOS/System/DolDoc/DocPlain.CC.html#l435"><span class=cF4>DataTagWidth</span></a><span class=cF0>
<a name="l120"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(ptr2, ptr, i + </span><span class=cFE>1</span><span class=cF0>);
<a name="l121"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;tag);
<a name="l122"></a> doc_e-&gt;tag = ptr2;
<a name="l123"></a> }
<a name="l124"></a> </span><span class=cF5>Free</span><span class=cF0>(ptr);
<a name="l125"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l126"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l127"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l128"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(doc_e-&gt;tag, doc_e-&gt;aux_str, d, doc_e-&gt;my_format_data);
<a name="l129"></a> i = </span><span class=cF5>StrLen</span><span class=cF0>(doc_e-&gt;tag);
<a name="l130"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l131"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HAS_TERMINATOR</span><span class=cF0>)
<a name="l132"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l133"></a> doc_e-&gt;tag[i++] = </span><span class=cF6>'_'</span><span class=cF0>;
<a name="l134"></a> doc_e-&gt;tag[i] = </span><span class=cFE>0</span><span class=cF0>;
<a name="l135"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l136"></a> doc_e-&gt;max_col = i;
<a name="l137"></a> }
<a name="l138"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LIST</span><span class=cF0>)
<a name="l139"></a> {
<a name="l140"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_DEFINE</span><span class=cF0> &amp;&amp;
<a name="l141"></a> </span><span class=cF7>(</span><span class=cF0>tmph = </span><span class=cF5>HashFind</span><span class=cF0>(doc_e-&gt;define_str, doc-&gt;win_task-&gt;hash_table, </span><span class=cF3>HTT_DEFINE_STR</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l142"></a> </span><span class=cFE>0</span><span class=cF0> &lt;= d &lt; tmph-&gt;count)
<a name="l143"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l144"></a> ptr = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;[%s]&quot;</span><span class=cF0>, tmph-&gt;sub_idx[d]);
<a name="l145"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;tag);
<a name="l146"></a> doc_e-&gt;tag = </span><span class=cF5>StrNew</span><span class=cF0>(ptr, doc-&gt;mem_task);
<a name="l147"></a> </span><span class=cF5>Free</span><span class=cF0>(ptr);
<a name="l148"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l149"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l150"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l151"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;tag);
<a name="l152"></a> doc_e-&gt;tag = </span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF6>&quot;[]&quot;</span><span class=cF0>, doc-&gt;mem_task);
<a name="l153"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l154"></a> }
<a name="l155"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l156"></a> {
<a name="l157"></a> </span><span class=cF1>if</span><span class=cF0> (d)
<a name="l158"></a> doc_e-&gt;de_flags |= </span><span class=cF3>DOCEF_CHECKED_COLLAPSED</span><span class=cF0>;
<a name="l159"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l160"></a> doc_e-&gt;de_flags &amp;= ~</span><span class=cF3>DOCEF_CHECKED_COLLAPSED</span><span class=cF0>;
<a name="l161"></a> }
<a name="l162"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l163"></a>}
<a name="l164"></a>
<a name="l165"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocDataScan</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="l166"></a>{
<a name="l167"></a> </span><span class=cF9>I64</span><span class=cF0> i, d;
<a name="l168"></a> </span><span class=cF1>U8</span><span class=cF0> *ptr, *ptr1, *ptr2;
<a name="l169"></a> </span><span class=cF9>CHashDefineStr</span><span class=cF0> *tmph;
<a name="l170"></a>
<a name="l171"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_DATA</span><span class=cF0> &amp;&amp; doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_AUX_STR</span><span class=cF0> ||
<a name="l172"></a> doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_CHECK_BOX</span><span class=cF0> ||
<a name="l173"></a> doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LIST</span><span class=cF0>)
<a name="l174"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l175"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_DEREF_DATA</span><span class=cF0> &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_REMALLOC_DATA</span><span class=cF7>)</span><span class=cF0>)
<a name="l176"></a> {
<a name="l177"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>ptr = doc_e-&gt;data</span><span class=cF7>)</span><span class=cF0>)
<a name="l178"></a> </span><span class=cF1>return</span><span class=cF0>;
<a name="l179"></a> }
<a name="l180"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l181"></a> ptr = &amp;doc_e-&gt;data;
<a name="l182"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_DATA</span><span class=cF0>)
<a name="l183"></a> {
<a name="l184"></a> i = </span><span class=cF5>StrLen</span><span class=cF0>(doc_e-&gt;tag);
<a name="l185"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HAS_TERMINATOR</span><span class=cF0>)
<a name="l186"></a> doc_e-&gt;tag[--i] = </span><span class=cFE>0</span><span class=cF0>;
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (i &gt; doc_e-&gt;len + doc_e-&gt;min_col)
<a name="l188"></a> doc_e-&gt;tag[doc_e-&gt;len + doc_e-&gt;min_col] = </span><span class=cFE>0</span><span class=cF0>;
<a name="l189"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF3>RT_I8</span><span class=cF0> &lt;= doc_e-&gt;raw_type &lt;= </span><span class=cF3>RT_U32</span><span class=cF0>)
<a name="l190"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l191"></a> </span><span class=cF5>StrScan</span><span class=cF0>(doc_e-&gt;tag, doc_e-&gt;aux_str, &amp;d, doc_e-&gt;my_format_data);
<a name="l192"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HAS_TERMINATOR</span><span class=cF0>)
<a name="l193"></a> doc_e-&gt;tag[i] = </span><span class=cF6>'_'</span><span class=cF0>;
<a name="l194"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l195"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF3>RT_I64</span><span class=cF0> &lt;= doc_e-&gt;raw_type &lt;= </span><span class=cF3>RT_UF64</span><span class=cF0>)
<a name="l196"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l197"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_REMALLOC_DATA</span><span class=cF0>)
<a name="l198"></a> {
<a name="l199"></a> ptr = </span><span class=cF5>MAlloc</span><span class=cF0>(i - doc_e-&gt;min_col + </span><span class=cFE>8</span><span class=cF0>, doc-&gt;mem_task);
<a name="l200"></a> </span><span class=cF5>MemCopy</span><span class=cF0>(ptr, doc_e-&gt;tag + doc_e-&gt;min_col, i - doc_e-&gt;min_col + </span><span class=cFE>1</span><span class=cF0>);
<a name="l201"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;data);
<a name="l202"></a> doc_e-&gt;data = ptr;
<a name="l203"></a> doc_e-&gt;len = </span><span class=cF5>MSize</span><span class=cF0>(ptr) - </span><span class=cFE>1</span><span class=cF0>;
<a name="l204"></a> }
<a name="l205"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l206"></a> </span><span class=cF5>StrScan</span><span class=cF0>(doc_e-&gt;tag, doc_e-&gt;aux_str, ptr, doc_e-&gt;my_format_data);
<a name="l207"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HAS_TERMINATOR</span><span class=cF0>)
<a name="l208"></a> doc_e-&gt;tag[i] = </span><span class=cF6>'_'</span><span class=cF0>;
<a name="l209"></a> </span><span class=cF1>return</span><span class=cF0>;
<a name="l210"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l211"></a> }
<a name="l212"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LIST</span><span class=cF0>)
<a name="l213"></a> {
<a name="l214"></a> d = </span><span class=cFE>0</span><span class=cF0>;
<a name="l215"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;tag &amp;&amp; doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_DEFINE</span><span class=cF0> &amp;&amp;
<a name="l216"></a> </span><span class=cF7>(</span><span class=cF0>tmph = </span><span class=cF5>HashFind</span><span class=cF0>(doc_e-&gt;define_str, doc-&gt;win_task-&gt;hash_table, </span><span class=cF3>HTT_DEFINE_STR</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
<a name="l217"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l218"></a> ptr1 = ptr2 = </span><span class=cF5>StrNew</span><span class=cF0>(doc_e-&gt;tag);
<a name="l219"></a> </span><span class=cF1>if</span><span class=cF0> (*ptr2 == </span><span class=cF6>'['</span><span class=cF0>)
<a name="l220"></a> {
<a name="l221"></a> ptr2++;
<a name="l222"></a> i = </span><span class=cF5>StrLen</span><span class=cF0>(ptr2);
<a name="l223"></a> </span><span class=cF1>if</span><span class=cF0> (ptr2[i - </span><span class=cFE>1</span><span class=cF0>] == </span><span class=cF6>']'</span><span class=cF0>)
<a name="l224"></a> ptr2[i - </span><span class=cFE>1</span><span class=cF0>] = </span><span class=cFE>0</span><span class=cF0>;
<a name="l225"></a> }
<a name="l226"></a> d = </span><span class=cF5>ListMatch</span><span class=cF0>(ptr2, tmph-&gt;data);
<a name="l227"></a> </span><span class=cF5>Free</span><span class=cF0>(ptr1);
<a name="l228"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l229"></a> }
<a name="l230"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l231"></a> {
<a name="l232"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_CHECKED_COLLAPSED</span><span class=cF0>)
<a name="l233"></a> d = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l234"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l235"></a> d = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l236"></a> }
<a name="l237"></a> </span><span class=cF1>switch</span><span class=cF0> (doc_e-&gt;raw_type)
<a name="l238"></a> {
<a name="l239"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I8</span><span class=cF0>:
<a name="l240"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U8</span><span class=cF0>:
<a name="l241"></a> *ptr(</span><span class=cF1>U8</span><span class=cF0> *) = d;
<a name="l242"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I0</span><span class=cF0>:
<a name="l243"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U0</span><span class=cF0>:
<a name="l244"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l245"></a>
<a name="l246"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I16</span><span class=cF0>:
<a name="l247"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U16</span><span class=cF0>:
<a name="l248"></a> *ptr(</span><span class=cF9>U16</span><span class=cF0> *) = d;
<a name="l249"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l250"></a>
<a name="l251"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_I32</span><span class=cF0>:
<a name="l252"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>RT_U32</span><span class=cF0>:
<a name="l253"></a> *ptr(</span><span class=cF9>U32</span><span class=cF0> *) = d;
<a name="l254"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l255"></a>
<a name="l256"></a> </span><span class=cF1>default</span><span class=cF0>:
<a name="l257"></a> *ptr(</span><span class=cF9>I64</span><span class=cF0> *) = d;
<a name="l258"></a> }
<a name="l259"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l260"></a>}
<a name="l261"></a>
<a name="l262"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;DolDoc/Input;StdIn/DolDoc&quot;</span><span class=cF0>
<a name="l263"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>DocForm</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *_d, </span><span class=cF1>U8</span><span class=cF0> *class_name=</span><span class=cF1>lastclass</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> dof_flags=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *header=</span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *footer=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l264"></a>{</span><span class=cF2>//User input. Supply a class name that has format definitions.</span><span class=cF0>
<a name="l265"></a></span><span class=cF2>//See </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/DolDoc/Form.CC.html#l1"><span class=cF4>::/Demo/DolDoc/Form.CC</span></a><span class=cF2> and </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/LastClass.CC.html#l1"><span class=cF4>::/Demo/LastClass.CC</span></a><span class=cF2>.</span><span class=cF0>
<a name="l266"></a> </span><span class=cF9>CMemberList</span><span class=cF0> *ml;
<a name="l267"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
<a name="l268"></a> </span><span class=cF1>U8</span><span class=cF0> *format;
<a name="l269"></a> </span><span class=cF9>CHashClass</span><span class=cF0> *tmpc, *tmpc2;
<a name="l270"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
<a name="l271"></a> </span><span class=cF1>Bool</span><span class=cF0> res = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l272"></a> </span><span class=cF9>I64</span><span class=cF0> old_border_src = </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src, has_action;
<a name="l273"></a>
<a name="l274"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>tmpc = </span><span class=cF5>HashFind</span><span class=cF0>(class_name, </span><span class=cF5>Fs</span><span class=cF0>-&gt;hash_table, </span><span class=cF3>HTT_CLASS</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
<a name="l275"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l276"></a> doc = </span><span class=cF5>DocNew</span><span class=cF0>;
<a name="l277"></a> doc-&gt;desc = </span><span class=cF6>'Form'</span><span class=cF0>;
<a name="l278"></a> </span><span class=cF1>if</span><span class=cF0> (header)
<a name="l279"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, header);
<a name="l280"></a> doc-&gt;flags |= </span><span class=cF3>DOCF_OVERSTRIKE</span><span class=cF0>|</span><span class=cF3>DOCF_FORM</span><span class=cF0>;
<a name="l281"></a> </span><span class=cF1>if</span><span class=cF0> (dof_flags &amp; </span><span class=cF3>DOF_SIZE_MIN</span><span class=cF0>)
<a name="l282"></a> doc-&gt;flags |= </span><span class=cF3>DOCF_SIZE_MIN</span><span class=cF0>;
<a name="l283"></a> ml = tmpc-&gt;member_list_and_root;
<a name="l284"></a> </span><span class=cF1>while</span><span class=cF0> (ml)
<a name="l285"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l286"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>format = </span><span class=cF5>MemberMetaData</span><span class=cF0>(</span><span class=cF6>&quot;format&quot;</span><span class=cF0>, ml)</span><span class=cF7>)</span><span class=cF0> &amp;&amp; </span><span class=cF7>(</span><span class=cF0>doc_e = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, format)</span><span class=cF7>)</span><span class=cF0>)
<a name="l287"></a> {
<a name="l288"></a> tmpc2 = ml-&gt;member_class;
<a name="l289"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF7>(</span><span class=cF0>doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_DATA</span><span class=cF0> || doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_LIST</span><span class=cF0> || doc_e-&gt;type_u8 == </span><span class=cF3>DOCT_CHECK_BOX</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l290"></a> !tmpc2-&gt;ptr_stars_count)
<a name="l291"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l292"></a> tmpc2 = </span><span class=cF5>OptClassFwd</span><span class=cF0>(tmpc2);
<a name="l293"></a> tmpc2 -= tmpc2-&gt;ptr_stars_count;
<a name="l294"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc2-&gt;type &amp; </span><span class=cF3>HTT_INTERNAL_TYPE</span><span class=cF0>)
<a name="l295"></a> {
<a name="l296"></a> </span><span class=cF1>if</span><span class=cF0> (ml-&gt;dim.next)
<a name="l297"></a> </span><span class=cF7>{</span><span class=cF0> </span><span class=cF2>//Array</span><span class=cF0>
<a name="l298"></a> </span><span class=cF1>if</span><span class=cF0> (tmpc2-&gt;raw_type == </span><span class=cF3>RT_U8</span><span class=cF0> &amp;&amp; </span><span class=cF5>LBtr</span><span class=cF7>(</span><span class=cF0>&amp;doc_e-&gt;de_flags, &amp;</span><span class=cF3>DOCEf_DEFAULT_LEN</span><span class=cF7>)</span><span class=cF0>)
<a name="l299"></a> {
<a name="l300"></a> doc_e-&gt;len = ml-&gt;dim.total_count;
<a name="l301"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HAS_TERMINATOR</span><span class=cF0>)
<a name="l302"></a> doc_e-&gt;len--;
<a name="l303"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;tag); </span><span class=cF2>//See </span><a href="https://zeal-operating-system.github.io/ZealOS/System/DolDoc/DocPlain.CC.html#l435"><span class=cF4>DataTagWidth</span></a><span class=cF0>
<a name="l304"></a> doc_e-&gt;tag = </span><span class=cF5>MAlloc</span><span class=cF0>(doc_e-&gt;len + doc_e-&gt;min_col + </span><span class=cFE>2</span><span class=cF0>, doc-&gt;mem_task); </span><span class=cF2>//+2 because &quot;_\0&quot;</span><span class=cF0>
<a name="l305"></a> }
<a name="l306"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l307"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>LBtr</span><span class=cF7>(</span><span class=cF0>&amp;doc_e-&gt;de_flags, </span><span class=cF3>DOCEf_DEFAULT_RAW_TYPE</span><span class=cF7>)</span><span class=cF0>)
<a name="l308"></a> doc_e-&gt;raw_type = tmpc2-&gt;raw_type;
<a name="l309"></a> }
<a name="l310"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l311"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_REMALLOC_DATA</span><span class=cF0>)
<a name="l312"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l313"></a> doc_e-&gt;user_data = _d + ml-&gt;</span><span class=cF1>offset</span><span class=cF0>;
<a name="l314"></a> doc_e-&gt;data = *doc_e-&gt;user_data(</span><span class=cF1>U8</span><span class=cF0> **);
<a name="l315"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l316"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l317"></a> doc_e-&gt;data = _d + ml-&gt;</span><span class=cF1>offset</span><span class=cF0>;
<a name="l318"></a> doc_e-&gt;my_format_data = </span><span class=cF5>MemberMetaData</span><span class=cF0>(</span><span class=cF6>&quot;data&quot;</span><span class=cF0>, ml);
<a name="l319"></a> </span><span class=cF5>DocDataFormat</span><span class=cF0>(doc, doc_e);
<a name="l320"></a> }
<a name="l321"></a> ml = ml-&gt;next;
<a name="l322"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l323"></a> </span><span class=cF1>if</span><span class=cF0> (footer)
<a name="l324"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>&quot;%s&quot;</span><span class=cF0>, footer);
<a name="l325"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;head.next != doc)
<a name="l326"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l327"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
<a name="l328"></a> </span><span class=cF5>DocRecalc</span><span class=cF0>(doc);
<a name="l329"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocEd</span><span class=cF7>(</span><span class=cF0>doc, dof_flags</span><span class=cF7>)</span><span class=cF0>)
<a name="l330"></a> {
<a name="l331"></a> doc_e = doc-&gt;cur_entry;
<a name="l332"></a> res = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l333"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e != doc)
<a name="l334"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l335"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocEntryRun</span><span class=cF7>(</span><span class=cF0>doc, doc_e, </span><span class=cF3>TRUE</span><span class=cF0>, &amp;has_action</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF3>DOCM_CANCEL</span><span class=cF0> &amp;&amp; has_action)
<a name="l336"></a> res = </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l337"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l338"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l339"></a> }
<a name="l340"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l341"></a> doc_e = doc-&gt;head.next;
<a name="l342"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e != doc)
<a name="l343"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l344"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_REMALLOC_DATA</span><span class=cF0>)
<a name="l345"></a> {
<a name="l346"></a> *doc_e-&gt;user_data(</span><span class=cF1>U8</span><span class=cF0> **) = doc_e-&gt;data;
<a name="l347"></a> doc_e-&gt;data = </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l348"></a> }
<a name="l349"></a> doc_e = doc_e-&gt;next;
<a name="l350"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l351"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l352"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src = old_border_src;
<a name="l353"></a>
<a name="l354"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l355"></a>}
<a name="l356"></a>
<a name="l357"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocMenuEndTaskCB</span><span class=cF0>()
<a name="l358"></a>{
<a name="l359"></a> </span><span class=cF5>WinToTop</span><span class=cF0>;
<a name="l360"></a> </span><span class=cF5>throw</span><span class=cF0>;
<a name="l361"></a>}
<a name="l362"></a>
<a name="l363"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>DocMenu</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *m, </span><span class=cF9>I64</span><span class=cF0> dof_flags=</span><span class=cFE>0</span><span class=cF0>)
<a name="l364"></a>{</span><span class=cF2>//Run menu chooser doc. Returns menu doc unlocked.</span><span class=cF0>
<a name="l365"></a> </span><span class=cF1>U8</span><span class=cF0> *old_end_cb = </span><span class=cF5>Fs</span><span class=cF0>-&gt;task_end_cb;
<a name="l366"></a> </span><span class=cF1>Bool</span><span class=cF0> old_break_shift_esc = </span><span class=cF5>LBts</span><span class=cF0>(&amp;</span><span class=cF5>Fs</span><span class=cF0>-&gt;task_flags, </span><span class=cF3>TASKf_BREAK_TO_SHIFT_ESC</span><span class=cF0>);
<a name="l367"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
<a name="l368"></a> </span><span class=cF9>I64</span><span class=cF0> old_border_src = </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src, res = </span><span class=cF3>DOCM_CANCEL</span><span class=cF0>, has_action;
<a name="l369"></a>
<a name="l370"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;task_end_cb = &amp;</span><span class=cF5>DocMenuEndTaskCB</span><span class=cF0>;
<a name="l371"></a> </span><span class=cF1>try</span><span class=cF0>
<a name="l372"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l373"></a> </span><span class=cF1>if</span><span class=cF0> (m)
<a name="l374"></a> {
<a name="l375"></a> m-&gt;desc = </span><span class=cF6>'Menu'</span><span class=cF0>;
<a name="l376"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src = </span><span class=cF3>BDS_CONST</span><span class=cF0>;
<a name="l377"></a>dm_restart:
<a name="l378"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocEd</span><span class=cF7>(</span><span class=cF0>m, dof_flags</span><span class=cF7>)</span><span class=cF0>)
<a name="l379"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l380"></a> doc_e = m-&gt;cur_entry;
<a name="l381"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e != m)
<a name="l382"></a> {
<a name="l383"></a> res = </span><span class=cF5>DocEntryRun</span><span class=cF0>(m, doc_e, </span><span class=cF3>TRUE</span><span class=cF0>, &amp;has_action);
<a name="l384"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(m);
<a name="l385"></a> </span><span class=cF1>if</span><span class=cF0> (!has_action)
<a name="l386"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l387"></a> res = </span><span class=cF3>DOCM_CANCEL</span><span class=cF0>;
<a name="l388"></a> dof_flags |= </span><span class=cF3>DOF_DONT_HOME</span><span class=cF0>;
<a name="l389"></a> </span><span class=cF1>goto</span><span class=cF0> dm_restart;
<a name="l390"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l391"></a> }
<a name="l392"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l393"></a> }
<a name="l394"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l395"></a> </span><span class=cF1>catch</span><span class=cF0>
<a name="l396"></a> </span><span class=cF7>{</span><span class=cF0>
<a name="l397"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Fs</span><span class=cF0>-&gt;except_ch)
<a name="l398"></a> {
<a name="l399"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>dof_flags &amp; </span><span class=cF3>DOF_INTERCEPT_TASK_END</span><span class=cF7>)</span><span class=cF0>)
<a name="l400"></a> </span><span class=cF5>Exit</span><span class=cF0>;
<a name="l401"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;catch_except = </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l402"></a> }
<a name="l403"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l404"></a> </span><span class=cF5>LBEqual</span><span class=cF0>(&amp;</span><span class=cF5>Fs</span><span class=cF0>-&gt;task_flags, </span><span class=cF3>TASKf_BREAK_TO_SHIFT_ESC</span><span class=cF0>, old_break_shift_esc);
<a name="l405"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src = old_border_src;
<a name="l406"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;task_end_cb = old_end_cb;
<a name="l407"></a>
<a name="l408"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l409"></a>}
<a name="l410"></a>
<a name="l411"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PopUpMenu</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=</span><span class=cFE>0</span><span class=cF0>)
<a name="l412"></a>{</span><span class=cF2>//Run menu chooser doc in PopUp win task.</span><span class=cF0>
<a name="l413"></a> doc-&gt;flags |= </span><span class=cF3>DOCF_SIZE_MIN</span><span class=cF0> | </span><span class=cF3>DOCF_FORM</span><span class=cF0>;
<a name="l414"></a>
<a name="l415"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>PopUpPrint</span><span class=cF0>(</span><span class=cF6>&quot;DocMenu(0x%X,0x%X);&quot;</span><span class=cF0>, doc, dof_flags);
<a name="l416"></a>}
<a name="l417"></a>
<a name="l418"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>PopUpForm</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *_d, </span><span class=cF1>U8</span><span class=cF0> *class_name=</span><span class=cF1>lastclass</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> dof_flags=</span><span class=cF3>DOF_SIZE_MIN</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *header=</span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *footer=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l419"></a>{</span><span class=cF2>//See </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/DolDoc/Form.CC.html#l1"><span class=cF4>::/Demo/DolDoc/Form.CC</span></a><span class=cF2> and </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/LastClass.CC.html#l1"><span class=cF4>::/Demo/LastClass.CC</span></a><span class=cF2>.</span><span class=cF0>
<a name="l420"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>PopUpPrint</span><span class=cF0>(</span><span class=cF6>&quot;DocForm(0x%X,0x%X,0x%X,0x%X,0x%X);&quot;</span><span class=cF0>, _d, class_name, dof_flags, header, footer);
<a name="l421"></a>}
</span></pre></body>
</html>