templeos-info/public/Wb/Adam/DolDoc/DocNew.HC.HTML

417 lines
39 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=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;DolDoc&quot;</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>DocLock</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
<a name="l4"></a>{</span><span class=cF2>//Make this task have exclusive access to this doc.</span><span class=cF0>
<a name="l5"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;doc-&gt;locked_flags,</span><span class=cF3>DOClf_LOCKED</span><span class=cF7>)</span><span class=cF0> || doc-&gt;owning_task!=</span><span class=cF5>Fs</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l6"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF5>LBts</span><span class=cF7>(</span><span class=cF0>&amp;doc-&gt;locked_flags,</span><span class=cF3>DOClf_LOCKED</span><span class=cF7>)</span><span class=cF0>)
<a name="l7"></a> </span><span class=cF5>Yield</span><span class=cF0>;
<a name="l8"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;owning_task!=</span><span class=cF5>Fs</span><span class=cF0>)
<a name="l9"></a> </span><span class=cF5>LBEqu</span><span class=cF0>(&amp;doc-&gt;flags,</span><span class=cF3>DOCf_BREAK_UNLOCKED</span><span class=cF0>,</span><span class=cF5>BreakLock</span><span class=cF7>(</span><span class=cF5>Fs</span><span class=cF7>)</span><span class=cF0>);
<a name="l10"></a> doc-&gt;owning_task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l11"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l12"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l13"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l14"></a>}
<a name="l15"></a>
<a name="l16"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>DocUnlock</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
<a name="l17"></a>{</span><span class=cF2>//Release exclusive lock on access to doc.</span><span class=cF0>
<a name="l18"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock_break;
<a name="l19"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;doc-&gt;locked_flags,</span><span class=cF3>DOClf_LOCKED</span><span class=cF7>)</span><span class=cF0> &amp;&amp; doc-&gt;owning_task==</span><span class=cF5>Fs</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l20"></a> doc-&gt;owning_task=0;
<a name="l21"></a> unlock_break=</span><span class=cF5>Bt</span><span class=cF0>(&amp;doc-&gt;flags,</span><span class=cF3>DOCf_BREAK_UNLOCKED</span><span class=cF0>);
<a name="l22"></a> </span><span class=cF5>LBtr</span><span class=cF0>(&amp;doc-&gt;locked_flags,</span><span class=cF3>DOClf_LOCKED</span><span class=cF0>);
<a name="l23"></a> </span><span class=cF1>if</span><span class=cF0> (unlock_break)
<a name="l24"></a> </span><span class=cF5>BreakUnlock</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l25"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l26"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l27"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l28"></a>}
<a name="l29"></a>
<a name="l30"></a></span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>IsEditableText</span><span class=cF0>(</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e)
<a name="l31"></a>{
<a name="l32"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8==</span><span class=cF3>DOCT_TEXT</span><span class=cF0>&amp;&amp;!</span><span class=cF7>(</span><span class=cF0>doc_e-&gt;de_flags&amp;</span><span class=cF3>DOCEG_DONT_EDIT</span><span class=cF7>)</span><span class=cF0>)
<a name="l33"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l34"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l35"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l36"></a>}
<a name="l37"></a>
<a name="l38"></a></span><span class=cF9>CDocEntry</span><span class=cF0> *</span><span class=cF5>DocEntryNewBase</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF9>I64</span><span class=cF0> type,</span><span class=cF9>I64</span><span class=cF0> de_flags=0,
<a name="l39"></a> </span><span class=cF9>I64</span><span class=cF0> x=0,</span><span class=cF9>I64</span><span class=cF0> y=0,</span><span class=cF9>I64</span><span class=cF0> page_line_num=0)
<a name="l40"></a>{</span><span class=cF2>//See also </span><a href="/Wb/Adam/DolDoc/DocRecalc.HC.HTML#l137"><span class=cF4>MAllocIdent</span></a><span class=cF2> and </span><span class=cF9><u>CDocEntry</u></span><span class=cF2>.</span><span class=cF0>
<a name="l41"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *res=</span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CDocEntryBase</span><span class=cF7>)</span><span class=cF0>,doc-&gt;mem_task);
<a name="l42"></a> res-&gt;type=type;
<a name="l43"></a> res-&gt;de_flags=de_flags|</span><span class=cFB>doldoc</span><span class=cF0>.dft_de_flags[type.u8[0]];
<a name="l44"></a> res-&gt;x=x;
<a name="l45"></a> res-&gt;y=y;
<a name="l46"></a> res-&gt;page_line_num=page_line_num;
<a name="l47"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l48"></a>}
<a name="l49"></a>
<a name="l50"></a></span><span class=cF9>CDocEntry</span><span class=cF0> *</span><span class=cF5>DocEntryNewTag</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce,</span><span class=cF1>U8</span><span class=cF0> *tag)
<a name="l51"></a>{
<a name="l52"></a> </span><span class=cF9>I64</span><span class=cF0> l=</span><span class=cF5>StrLen</span><span class=cF0>(tag);
<a name="l53"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *res=</span><span class=cF5>DocEntryNewBase</span><span class=cF0>(doc,doc_ce-&gt;type,doc_ce-&gt;de_flags,
<a name="l54"></a> doc_ce-&gt;x,doc_ce-&gt;y,doc_ce-&gt;page_line_num);
<a name="l55"></a> res-&gt;de_flags=doc_ce-&gt;de_flags; </span><span class=cF2>//Override</span><span class=cF0>
<a name="l56"></a> res-&gt;max_col=l;
<a name="l57"></a> res-&gt;tag=</span><span class=cF5>MAlloc</span><span class=cF0>(l+1,doc-&gt;mem_task);
<a name="l58"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(res-&gt;tag,tag,l+1);
<a name="l59"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&amp;res-&gt;settings,&amp;doc_ce-&gt;settings,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CDocSettings</span><span class=cF7>)</span><span class=cF0>);
<a name="l60"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l61"></a>}
<a name="l62"></a>
<a name="l63"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocEntryDel</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="l64"></a>{</span><span class=cF2>//Free entry and all parts of entry.</span><span class=cF0>
<a name="l65"></a> </span><span class=cF1>if</span><span class=cF0> (!doc || doc==doc_e)
<a name="l66"></a> </span><span class=cF5>RawPrint</span><span class=cF0>(3000,</span><span class=cF6>&quot;DocEntryDel&quot;</span><span class=cF0>);
<a name="l67"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l68"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;cur_entry==doc_e)
<a name="l69"></a> doc-&gt;cur_entry=doc_e-&gt;next;
<a name="l70"></a> </span><span class=cF5>QueRem</span><span class=cF0>(doc_e);
<a name="l71"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_TAG</span><span class=cF0>)
<a name="l72"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;tag);
<a name="l73"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_AUX_STR</span><span class=cF0>)
<a name="l74"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;aux_str);
<a name="l75"></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>)
<a name="l76"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;define_str);
<a name="l77"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HTML_LINK</span><span class=cF0>)
<a name="l78"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;html_link);
<a name="l79"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LEFT_MACRO</span><span class=cF0>)
<a name="l80"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;left_macro);
<a name="l81"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_RIGHT_MACRO</span><span class=cF0>)
<a name="l82"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;right_macro);
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_BIN_PTR_LINK</span><span class=cF0>)
<a name="l84"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;bin_ptr_link);
<a name="l85"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HAS_BIN</span><span class=cF0>)
<a name="l86"></a> </span><span class=cF5>DocBinDel</span><span class=cF0>(doc,doc_e-&gt;bin_data);
<a name="l87"></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="l88"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e-&gt;data);
<a name="l89"></a> </span><span class=cF5>Free</span><span class=cF0>(doc_e);
<a name="l90"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l91"></a>}
<a name="l92"></a>
<a name="l93"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>DocEntrySize</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e)
<a name="l94"></a>{</span><span class=cF2>//Mem size of entry and all parts.</span><span class=cF0>
<a name="l95"></a> </span><span class=cF9>I64</span><span class=cF0> res;
<a name="l96"></a> </span><span class=cF1>if</span><span class=cF0> (!doc_e) </span><span class=cF1>return</span><span class=cF0> 0;
<a name="l97"></a> res=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e);
<a name="l98"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_TAG</span><span class=cF0>)
<a name="l99"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;tag);
<a name="l100"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_AUX_STR</span><span class=cF0>)
<a name="l101"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;aux_str);
<a name="l102"></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>)
<a name="l103"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;define_str);
<a name="l104"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HTML_LINK</span><span class=cF0>)
<a name="l105"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;html_link);
<a name="l106"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LEFT_MACRO</span><span class=cF0>)
<a name="l107"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;left_macro);
<a name="l108"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_RIGHT_MACRO</span><span class=cF0>)
<a name="l109"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;right_macro);
<a name="l110"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_BIN_PTR_LINK</span><span class=cF0>)
<a name="l111"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;bin_ptr_link);
<a name="l112"></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="l113"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc_e-&gt;data);
<a name="l114"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l115"></a>}
<a name="l116"></a>
<a name="l117"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocUndoDel</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *,</span><span class=cF9>CDocUndo</span><span class=cF0> *u)
<a name="l118"></a>{
<a name="l119"></a> </span><span class=cF5>Free</span><span class=cF0>(u-&gt;body);
<a name="l120"></a> </span><span class=cF5>Free</span><span class=cF0>(u);
<a name="l121"></a>}
<a name="l122"></a>
<a name="l123"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocUndoCntSet</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
<a name="l124"></a>{
<a name="l125"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock=</span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l126"></a> </span><span class=cF9>CDocUndo</span><span class=cF0> *u=doc-&gt;undo_head.next;
<a name="l127"></a> doc-&gt;undo_cnt=0;
<a name="l128"></a> </span><span class=cF1>while</span><span class=cF0> (u!=&amp;doc-&gt;undo_head) </span><span class=cF7>{</span><span class=cF0>
<a name="l129"></a> doc-&gt;undo_cnt++;
<a name="l130"></a> u=u-&gt;next;
<a name="l131"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l132"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
<a name="l133"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l134"></a>}
<a name="l135"></a>
<a name="l136"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CDocEntry</span><span class=cF0> *</span><span class=cF5>DocEntryCopy</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="l137"></a>{</span><span class=cF2>//Make copy of entry and all parts of entry.</span><span class=cF0>
<a name="l138"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ne;
<a name="l139"></a> </span><span class=cF9>CDocBin</span><span class=cF0> *tmpb;
<a name="l140"></a> </span><span class=cF9>CTask</span><span class=cF0> *task=doc-&gt;mem_task;
<a name="l141"></a> doc_ne=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e,task);
<a name="l142"></a> doc_ne-&gt;next=doc_ne;
<a name="l143"></a> doc_ne-&gt;last=doc_ne;
<a name="l144"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_TAG</span><span class=cF0>)
<a name="l145"></a> doc_ne-&gt;tag=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;tag,task);
<a name="l146"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_AUX_STR</span><span class=cF0>)
<a name="l147"></a> doc_ne-&gt;aux_str=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;aux_str,task);
<a name="l148"></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>)
<a name="l149"></a> doc_ne-&gt;define_str=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;define_str,task);
<a name="l150"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HTML_LINK</span><span class=cF0>)
<a name="l151"></a> doc_ne-&gt;html_link=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;html_link,task);
<a name="l152"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_LEFT_MACRO</span><span class=cF0>)
<a name="l153"></a> doc_ne-&gt;left_macro=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;left_macro,task);
<a name="l154"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_RIGHT_MACRO</span><span class=cF0>)
<a name="l155"></a> doc_ne-&gt;right_macro=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;right_macro,task);
<a name="l156"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_BIN_PTR_LINK</span><span class=cF0>)
<a name="l157"></a> doc_ne-&gt;bin_ptr_link=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;bin_ptr_link,task);
<a name="l158"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags &amp; </span><span class=cF3>DOCEF_HAS_BIN</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l159"></a> tmpb=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;bin_data,task);
<a name="l160"></a> tmpb-&gt;data=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;bin_data-&gt;data,task);
<a name="l161"></a> doc_ne-&gt;bin_num=doc-&gt;cur_bin_num;
<a name="l162"></a> tmpb-&gt;num=doc-&gt;cur_bin_num++;
<a name="l163"></a> doc_ne-&gt;bin_data=tmpb;
<a name="l164"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags&amp;</span><span class=cF3>DOCEF_TAG</span><span class=cF0> &amp;&amp; doc_e-&gt;tag &amp;&amp; *doc_e-&gt;tag)
<a name="l165"></a> tmpb-&gt;tag=</span><span class=cF5>StrNew</span><span class=cF0>(doc_e-&gt;tag,task);
<a name="l166"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l167"></a> tmpb-&gt;tag=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l168"></a> </span><span class=cF5>QueIns</span><span class=cF0>(tmpb,doc-&gt;bin_head.last);
<a name="l169"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l170"></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="l171"></a> doc_ne-&gt;data=</span><span class=cF5>MAllocIdent</span><span class=cF0>(doc_e-&gt;data,task);
<a name="l172"></a> </span><span class=cF1>return</span><span class=cF0> doc_ne;
<a name="l173"></a>}
<a name="l174"></a>
<a name="l175"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocRemSoftNewLines</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l176"></a>{
<a name="l177"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e2,*saved_ll=doc_e;
<a name="l178"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock;
<a name="l179"></a> </span><span class=cF1>if</span><span class=cF0> (!doc &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>doc=</span><span class=cF5>DocPut</span><span class=cF7>)</span><span class=cF0>)
<a name="l180"></a> </span><span class=cF1>return</span><span class=cF0>;
<a name="l181"></a> unlock=</span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l182"></a> </span><span class=cF1>if</span><span class=cF0> (!doc_e) doc_e=doc-&gt;head.next;
<a name="l183"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc) </span><span class=cF7>{</span><span class=cF0>
<a name="l184"></a> doc_e2=doc_e-&gt;next;
<a name="l185"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;type_u8==</span><span class=cF3>DOCT_SOFT_NEW_LINE</span><span class=cF0>) {
<a name="l186"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;cur_entry==doc_e) </span><span class=cF7>{</span><span class=cF0>
<a name="l187"></a> doc-&gt;cur_entry=doc_e2;
<a name="l188"></a> doc-&gt;cur_col=doc-&gt;cur_entry-&gt;min_col;
<a name="l189"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l190"></a> </span><span class=cF5>DocEntryDel</span><span class=cF0>(doc,doc_e);
<a name="l191"></a> } </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (saved_ll &amp;&amp; doc_e-&gt;type_u8==</span><span class=cF3>DOCT_NEW_LINE</span><span class=cF0>)
<a name="l192"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l193"></a> doc_e=doc_e2;
<a name="l194"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l195"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
<a name="l196"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l197"></a>}
<a name="l198"></a>
<a name="l199"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocInsEntry</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="l200"></a>{</span><span class=cF2>//Insert entry into doc, updating its vals.</span><span class=cF0>
<a name="l201"></a> </span><span class=cF1>U8</span><span class=cF0> *dst;
<a name="l202"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock=</span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l203"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce=doc-&gt;cur_entry,*doc_ne;
<a name="l204"></a>
<a name="l205"></a> doc_e-&gt;x=doc_ce-&gt;x;
<a name="l206"></a> doc_e-&gt;y=doc_ce-&gt;y;
<a name="l207"></a> doc_e-&gt;page_line_num=doc_ce-&gt;page_line_num;
<a name="l208"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&amp;doc_e-&gt;settings,&amp;doc_ce-&gt;settings,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CDocSettings</span><span class=cF7>)</span><span class=cF0>);
<a name="l209"></a> </span><span class=cF1>if</span><span class=cF0> (doc-&gt;cur_col&gt;0 &amp;&amp;
<a name="l210"></a> doc_ce-&gt;type_u8==</span><span class=cF3>DOCT_TEXT</span><span class=cF0> &amp;&amp;
<a name="l211"></a> !</span><span class=cF7>(</span><span class=cF0>doc_ce-&gt;de_flags&amp;(</span><span class=cF3>DOCEF_TAG_CB</span><span class=cF0>|</span><span class=cF3>DOCEF_DEFINE</span><span class=cF0>|</span><span class=cF3>DOCEF_AUX_STR</span><span class=cF0>|
<a name="l212"></a> </span><span class=cF3>DOCEF_HTML_LINK</span><span class=cF0>|</span><span class=cF3>DOCEF_BIN_PTR_LINK</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0> &amp;&amp;
<a name="l213"></a> doc-&gt;cur_col&lt;doc_ce-&gt;max_col) </span><span class=cF7>{</span><span class=cF0>
<a name="l214"></a> dst=doc_ce-&gt;tag+doc-&gt;cur_col;
<a name="l215"></a> doc_ne=</span><span class=cF5>DocEntryNewTag</span><span class=cF0>(doc,doc_ce,dst);
<a name="l216"></a> *dst=0;
<a name="l217"></a> doc_ne-&gt;type=</span><span class=cF3>DOCT_TEXT</span><span class=cF0>|doc_ce-&gt;type&amp;0xFFFFFF00;
<a name="l218"></a> doc_ce-&gt;max_col=doc-&gt;cur_col;
<a name="l219"></a> </span><span class=cF5>QueIns</span><span class=cF0>(doc_ne,doc_ce);
<a name="l220"></a> doc-&gt;cur_col=0;
<a name="l221"></a> doc_ce=doc_ne;
<a name="l222"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l223"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce-&gt;type_u8==</span><span class=cF3>DOCT_TEXT</span><span class=cF0> &amp;&amp; doc-&gt;cur_col&gt;=doc_ce-&gt;max_col) </span><span class=cF7>{</span><span class=cF0>
<a name="l224"></a> </span><span class=cF5>QueIns</span><span class=cF0>(doc_e,doc_ce);
<a name="l225"></a> doc-&gt;cur_entry=doc_e-&gt;next;
<a name="l226"></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="l227"></a> </span><span class=cF5>QueIns</span><span class=cF0>(doc_e,doc_ce-&gt;last);
<a name="l228"></a> doc-&gt;cur_entry=doc_ce;
<a name="l229"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l230"></a> doc-&gt;cur_col=doc-&gt;cur_entry-&gt;min_col;
<a name="l231"></a> </span><span class=cF5>DocRemSoftNewLines</span><span class=cF0>(doc,doc-&gt;cur_entry);
<a name="l232"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
<a name="l233"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l234"></a>}
<a name="l235"></a>
<a name="l236"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocRst</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF1>Bool</span><span class=cF0> is_old)
<a name="l237"></a>{</span><span class=cF2>//Del all entries and set doc to dfts.</span><span class=cF0>
<a name="l238"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock;
<a name="l239"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e,*doc_e2;
<a name="l240"></a> </span><span class=cF9>CDocUndo</span><span class=cF0> *u,*u8;
<a name="l241"></a> </span><span class=cF9>CDocSettings</span><span class=cF0> *s;
<a name="l242"></a> </span><span class=cF9>CDocBin</span><span class=cF0> *b,*b1;
<a name="l243"></a> </span><span class=cF1>if</span><span class=cF0> (!doc &amp;&amp; !</span><span class=cF7>(</span><span class=cF0>doc=</span><span class=cF5>DocPut</span><span class=cF7>)</span><span class=cF0>)
<a name="l244"></a> </span><span class=cF1>return</span><span class=cF0>;
<a name="l245"></a> unlock=</span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l246"></a> </span><span class=cF1>if</span><span class=cF0> (is_old) </span><span class=cF7>{</span><span class=cF0>
<a name="l247"></a> doc_e=doc-&gt;head.next;
<a name="l248"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc) {
<a name="l249"></a> doc_e2=doc_e-&gt;next;
<a name="l250"></a> </span><span class=cF5>DocEntryDel</span><span class=cF0>(doc,doc_e);
<a name="l251"></a> doc_e=doc_e2;
<a name="l252"></a> }
<a name="l253"></a> u=doc-&gt;undo_head.next;
<a name="l254"></a> </span><span class=cF1>while</span><span class=cF0> (u!=&amp;doc-&gt;undo_head) {
<a name="l255"></a> u8=u-&gt;next;
<a name="l256"></a> </span><span class=cF5>DocUndoDel</span><span class=cF0>(doc,u);
<a name="l257"></a> u=u8;
<a name="l258"></a> }
<a name="l259"></a> b=doc-&gt;bin_head.next;
<a name="l260"></a> </span><span class=cF1>while</span><span class=cF0> (b!=&amp;doc-&gt;bin_head) {
<a name="l261"></a> b1=b-&gt;next;
<a name="l262"></a> </span><span class=cF5>QueRem</span><span class=cF0>(b);
<a name="l263"></a> </span><span class=cF5>Free</span><span class=cF0>(b-&gt;data);
<a name="l264"></a> </span><span class=cF5>Free</span><span class=cF0>(b);
<a name="l265"></a> b=b1;
<a name="l266"></a> }
<a name="l267"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l268"></a></span><span class=cF2>//Check </span><a href="/Wb/Adam/DolDoc/DocFile.HC.HTML#l187"><span class=cF4>DocInsDoc</span></a><span class=cF0>
<a name="l269"></a> doc-&gt;flags&amp;=</span><span class=cF3>DOCF_BREAK_UNLOCKED</span><span class=cF0>;
<a name="l270"></a> doc-&gt;head.next=doc-&gt;head.last=doc;
<a name="l271"></a> </span><span class=cF5>QueInit</span><span class=cF0>(&amp;doc-&gt;bin_head);
<a name="l272"></a> </span><span class=cF5>QueInit</span><span class=cF0>(&amp;doc-&gt;undo_head);
<a name="l273"></a> doc-&gt;undo_head.time_stamp=0;
<a name="l274"></a> doc-&gt;undo_cnt=0;
<a name="l275"></a> doc-&gt;cur_bin_num=1;
<a name="l276"></a> doc-&gt;dollar_buf_ptr=0;
<a name="l277"></a> doc-&gt;cmd_U8=</span><span class=cF3>CH_SPACE</span><span class=cF0>;
<a name="l278"></a> doc-&gt;page_line_num=0;
<a name="l279"></a> doc-&gt;best_d=</span><span class=cF3>I64_MAX</span><span class=cF0>;
<a name="l280"></a>
<a name="l281"></a> s=&amp;doc-&gt;settings_head;
<a name="l282"></a> s-&gt;left_margin=</span><span class=cF3>DOC_DFT</span><span class=cF0>;
<a name="l283"></a> s-&gt;right_margin=</span><span class=cF3>DOC_DFT</span><span class=cF0>;
<a name="l284"></a> s-&gt;indent=0;
<a name="l285"></a> s-&gt;page_len=66;
<a name="l286"></a> s-&gt;header=</span><span class=cF3>DOC_DFT</span><span class=cF0>;
<a name="l287"></a> s-&gt;footer=</span><span class=cF3>DOC_DFT</span><span class=cF0>;
<a name="l288"></a> s-&gt;state=</span><span class=cF3>DOCSS_NORMAL</span><span class=cF0>;
<a name="l289"></a> s-&gt;comment_depth=0;
<a name="l290"></a> s-&gt;paren_depth=0;
<a name="l291"></a> s-&gt;brace_depth=0;
<a name="l292"></a> s-&gt;shifted_x=0;
<a name="l293"></a> s-&gt;shifted_y=0;
<a name="l294"></a> s-&gt;cur_text_attr=s-&gt;dft_text_attr=</span><span class=cF3>DOC_ATTR_DFT_TEXT</span><span class=cF0>;
<a name="l295"></a>
<a name="l296"></a> doc_e=&amp;doc-&gt;head;
<a name="l297"></a> doc_e-&gt;type=</span><span class=cF3>DOCT_ERROR</span><span class=cF0>;
<a name="l298"></a> doc_e-&gt;de_flags=0;
<a name="l299"></a> doc_e-&gt;x=0;
<a name="l300"></a> doc_e-&gt;y=0;
<a name="l301"></a> doc_e-&gt;min_col=0;
<a name="l302"></a> doc_e-&gt;max_col=0;
<a name="l303"></a> doc_e-&gt;page_line_num=doc-&gt;page_line_num;
<a name="l304"></a> </span><span class=cF5>MemCpy</span><span class=cF0>(&amp;doc_e-&gt;settings,s,</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CDocSettings</span><span class=cF7>)</span><span class=cF0>);
<a name="l305"></a>
<a name="l306"></a> </span><span class=cF5>DocTop</span><span class=cF0>(doc);
<a name="l307"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
<a name="l308"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l309"></a>}
<a name="l310"></a>
<a name="l311"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DocDel</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
<a name="l312"></a>{</span><span class=cF2>//Free entire doc and entries.</span><span class=cF0>
<a name="l313"></a> </span><span class=cF1>if</span><span class=cF0> (!doc || doc-&gt;doc_signature!=</span><span class=cF3>DOC_SIGNATURE_VAL</span><span class=cF0>) </span><span class=cF1>return</span><span class=cF0>;
<a name="l314"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l315"></a> doc-&gt;doc_signature=0;
<a name="l316"></a> </span><span class=cF5>DocRst</span><span class=cF0>(doc,</span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l317"></a> </span><span class=cF5>Free</span><span class=cF0>(doc-&gt;find_replace);
<a name="l318"></a> </span><span class=cF5>Free</span><span class=cF0>(doc-&gt;dollar_buf);
<a name="l319"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l320"></a> </span><span class=cF5>Free</span><span class=cF0>(doc);
<a name="l321"></a>}
<a name="l322"></a>
<a name="l323"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>DocSize</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
<a name="l324"></a>{</span><span class=cF2>//Mem size of doc and all its entries.</span><span class=cF0>
<a name="l325"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock;
<a name="l326"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
<a name="l327"></a> </span><span class=cF9>CDocUndo</span><span class=cF0> *u;
<a name="l328"></a> </span><span class=cF9>CDocBin</span><span class=cF0> *b;
<a name="l329"></a> </span><span class=cF9>I64</span><span class=cF0> res=0;
<a name="l330"></a>
<a name="l331"></a> </span><span class=cF1>if</span><span class=cF0> (!doc || doc-&gt;doc_signature!=</span><span class=cF3>DOC_SIGNATURE_VAL</span><span class=cF0>) </span><span class=cF1>return</span><span class=cF0> 0;
<a name="l332"></a> unlock=</span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l333"></a>
<a name="l334"></a> doc_e=doc-&gt;head.next;
<a name="l335"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=doc) </span><span class=cF7>{</span><span class=cF0>
<a name="l336"></a> res+=</span><span class=cF5>DocEntrySize</span><span class=cF0>(doc,doc_e);
<a name="l337"></a> doc_e=doc_e-&gt;next;
<a name="l338"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l339"></a>
<a name="l340"></a> u=doc-&gt;undo_head.next;
<a name="l341"></a> </span><span class=cF1>while</span><span class=cF0> (u!=&amp;doc-&gt;undo_head) </span><span class=cF7>{</span><span class=cF0>
<a name="l342"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(u-&gt;body);
<a name="l343"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(u);
<a name="l344"></a> u=u-&gt;next;
<a name="l345"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l346"></a>
<a name="l347"></a> b=doc-&gt;bin_head.next;
<a name="l348"></a> </span><span class=cF1>while</span><span class=cF0> (b!=&amp;doc-&gt;bin_head) </span><span class=cF7>{</span><span class=cF0>
<a name="l349"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(b-&gt;data);
<a name="l350"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(b);
<a name="l351"></a> b=b-&gt;next;
<a name="l352"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l353"></a>
<a name="l354"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc-&gt;find_replace);
<a name="l355"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc-&gt;dollar_buf);
<a name="l356"></a> res+=</span><span class=cF5>MSize2</span><span class=cF0>(doc);
<a name="l357"></a> </span><span class=cF1>if</span><span class=cF0> (unlock)
<a name="l358"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l359"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l360"></a>}
<a name="l361"></a>
<a name="l362"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>&quot;DolDoc&quot;</span><span class=cF0>
<a name="l363"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>CDoc</span><span class=cF0> *</span><span class=cF5>DocNew</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *filename=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l364"></a>{</span><span class=cF2>//MAlloc new </span><a href="/Wb/Doc/DolDocOverview.DD.HTML#l1"><span class=cF4>DolDoc</span></a><span class=cF2>. (Begin a new doc.)</span><span class=cF0>
<a name="l365"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
<a name="l366"></a> </span><span class=cF1>if</span><span class=cF0> (!task) task=</span><span class=cF5>Fs</span><span class=cF0>;
<a name="l367"></a> doc=</span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CDoc</span><span class=cF7>)</span><span class=cF0>,task);
<a name="l368"></a> </span><span class=cF1>if</span><span class=cF0> (filename)
<a name="l369"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(doc-&gt;filename.name,filename);
<a name="l370"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l371"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(doc-&gt;filename.name,</span><span class=cFB>blkdev</span><span class=cF0>.tmp_filename);
<a name="l372"></a> doc-&gt;find_replace=</span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CEdFindText</span><span class=cF7>)</span><span class=cF0>,task);
<a name="l373"></a> doc-&gt;find_replace-&gt;scan_fwd=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l374"></a> doc-&gt;find_replace-&gt;match_case=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l375"></a> doc-&gt;find_replace-&gt;pmt=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l376"></a> doc-&gt;left_click_link=&amp;</span><span class=cF5>EdLeftClickLink</span><span class=cF0>;
<a name="l377"></a> doc-&gt;dollar_buf_size=84;
<a name="l378"></a> doc-&gt;dollar_buf=</span><span class=cF5>MAlloc</span><span class=cF0>(doc-&gt;dollar_buf_size,task);
<a name="l379"></a> doc-&gt;max_entries=</span><span class=cF3>I64_MAX</span><span class=cF0>;
<a name="l380"></a> doc-&gt;win_task=task;
<a name="l381"></a> doc-&gt;mem_task=task;
<a name="l382"></a> </span><span class=cF5>DocRst</span><span class=cF0>(doc,</span><span class=cF3>FALSE</span><span class=cF0>);
<a name="l383"></a> doc-&gt;doc_signature=</span><span class=cF3>DOC_SIGNATURE_VAL</span><span class=cF0>;
<a name="l384"></a> </span><span class=cF1>return</span><span class=cF0> doc;
<a name="l385"></a>}
</span></pre></body>
</html>