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

390 lines
43 KiB
Plaintext
Raw Normal View History

2024-03-24 21:24:44 +00:00
<!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/Link&quot;</span><span class=cF0>
<a name="l2"></a>
<a name="l3"></a></span><span class=cF2>/* See </span><a href="/Wb/Adam/DolDoc/DocInit.HC.HTML#l22"><span class=cF4>TempleOS Link Types</span></a><span class=cF2>.</span><span class=cF0>
<a name="l4"></a></span><span class=cF2>&quot;filename&quot;</span><span class=cF0>
<a name="l5"></a></span><span class=cF2>&quot;FI:filename&quot;</span><span class=cF0>
<a name="l6"></a></span><span class=cF2>&quot;FA:haystack_filename,needle_anchor_str&quot;</span><span class=cF0>
<a name="l7"></a></span><span class=cF2>&quot;FF:haystack_filename,needle_str&quot;</span><span class=cF0>
<a name="l8"></a></span><span class=cF2>&quot;FF:haystack_filename,needle_str:occurnum&quot;</span><span class=cF0>
<a name="l9"></a></span><span class=cF2>&quot;FL:filename,linenum&quot;</span><span class=cF0>
<a name="l10"></a></span><span class=cF2>&quot;MN:SymName&quot;</span><span class=cF0>
<a name="l11"></a></span><span class=cF2>&quot;PI:filename&quot;</span><span class=cF0>
<a name="l12"></a></span><span class=cF2>&quot;PF:haystack_filename,needle_str&quot;</span><span class=cF0>
<a name="l13"></a></span><span class=cF2>&quot;PF:haystack_filename,needle_str:occurnum&quot;</span><span class=cF0>
<a name="l14"></a></span><span class=cF2>&quot;PL:filename,linenum&quot;</span><span class=cF0>
<a name="l15"></a></span><span class=cF2>&quot;BF:haystack_bible_book,needle_str&quot;</span><span class=cF0>
<a name="l16"></a></span><span class=cF2>&quot;DN:word&quot;</span><span class=cF0>
<a name="l17"></a></span><span class=cF2>&quot;DN:word,defnum&quot;</span><span class=cF0>
<a name="l18"></a></span><span class=cF2>&quot;HI:index&quot;</span><span class=cF0>
<a name="l19"></a></span><span class=cF2>&quot;AD:code_address_number&quot;</span><span class=cF0>
<a name="l20"></a>
<a name="l21"></a></span><span class=cF2>To edit a doc structure already in memory. See </span><a href="/Wb/Adam/Gr/SpriteEd.HC.HTML#l573"><span class=cF4>SpriteEdText</span></a><span class=cF2>().</span><span class=cF0>
<a name="l22"></a></span><span class=cF2>&quot;AI:doc_address&quot;</span><span class=cF0>
<a name="l23"></a></span><span class=cF2>&quot;AA:haystack_doc_address,needle_anchor_str&quot;</span><span class=cF0>
<a name="l24"></a></span><span class=cF2>&quot;AF:haystack_doc_address,needle_str&quot;</span><span class=cF0>
<a name="l25"></a></span><span class=cF2>&quot;AF:haystack_doc_address,needle_str:occurnum&quot;</span><span class=cF0>
<a name="l26"></a></span><span class=cF2>&quot;AL:doc_address,linenum&quot;</span><span class=cF0>
<a name="l27"></a></span><span class=cF2>*/</span><span class=cF0>
<a name="l28"></a>
<a name="l29"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_FILE</span><span class=cF0> 0
<a name="l30"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_FILE_ANCHOR</span><span class=cF0> 1
<a name="l31"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_FILE_FIND</span><span class=cF0> 2
<a name="l32"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_FILE_LINE</span><span class=cF0> 3
<a name="l33"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_MAN_PAGE</span><span class=cF0> 4
<a name="l34"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_PLAIN</span><span class=cF0> 5
<a name="l35"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_PLAIN_FIND</span><span class=cF0> 6
<a name="l36"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_PLAIN_LINE</span><span class=cF0> 7
<a name="l37"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_BIBLE_FIND</span><span class=cF0> 8
<a name="l38"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_DEF</span><span class=cF0> 9
<a name="l39"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_HELP_INDEX</span><span class=cF0> 10
<a name="l40"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_ADDR</span><span class=cF0> 11
<a name="l41"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_DOC</span><span class=cF0> 12 </span><span class=cF2>//See </span><a href="/Wb/Adam/Gr/SpriteEd.HC.HTML#l573"><span class=cF4>SpriteEdText</span></a><span class=cF2>()</span><span class=cF0>
<a name="l42"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_DOC_ANCHOR</span><span class=cF0> 13
<a name="l43"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_DOC_FIND</span><span class=cF0> 14
<a name="l44"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_DOC_LINE</span><span class=cF0> 15
<a name="l45"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>LK_PLACE_ANCHOR</span><span class=cF0> 16
<a name="l46"></a>
<a name="l47"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>DocEntryLink</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="l48"></a>{</span><span class=cF2>//MAlloc new str, either tag or aux_str if link.</span><span class=cF0>
<a name="l49"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e-&gt;de_flags&amp;</span><span class=cF3>DOCEF_LINK</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l50"></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="l51"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>StrNew</span><span class=cF0>(doc_e-&gt;aux_str,doc-&gt;mem_task);
<a name="l52"></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_TAG</span><span class=cF0>)
<a name="l53"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF5>StrNew</span><span class=cF0>(doc_e-&gt;tag,doc-&gt;mem_task);
<a name="l54"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l55"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
<a name="l56"></a>}
<a name="l57"></a>
<a name="l58"></a></span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>DocFileEd</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> _type,</span><span class=cF1>U8</span><span class=cF0> *filename,
<a name="l59"></a> </span><span class=cF1>U8</span><span class=cF0> *needle_str,</span><span class=cF9>I64</span><span class=cF0> *_num,</span><span class=cF9>I64</span><span class=cF0> edf_dof_flags)
<a name="l60"></a>{
<a name="l61"></a> </span><span class=cF9>I64</span><span class=cF0> type=_type,flags=0,old_border_src=</span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src;
<a name="l62"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
<a name="l63"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
<a name="l64"></a> </span><span class=cF1>Bool</span><span class=cF0> old_silent=</span><span class=cF5>Bt</span><span class=cF0>(&amp;</span><span class=cF5>Fs</span><span class=cF0>-&gt;display_flags,</span><span class=cF3>DISPLAYf_SILENT</span><span class=cF0>),
<a name="l65"></a> res=</span><span class=cF3>FALSE</span><span class=cF0>,other_found=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l66"></a> </span><span class=cF1>U8</span><span class=cF0> *st1,*st2;
<a name="l67"></a> </span><span class=cF1>try</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l68"></a> </span><span class=cF1>switch</span><span class=cF0> (type) {
<a name="l69"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN</span><span class=cF0>:
<a name="l70"></a> flags=</span><span class=cF3>DOCF_PLAIN_TEXT</span><span class=cF0>|</span><span class=cF3>DOCF_NO_CURSOR</span><span class=cF0>;
<a name="l71"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DOC</span><span class=cF0>:
<a name="l72"></a> type=</span><span class=cF3>LK_FILE</span><span class=cF0>;
<a name="l73"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l74"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DOC_ANCHOR</span><span class=cF0>:
<a name="l75"></a> type=</span><span class=cF3>LK_FILE_ANCHOR</span><span class=cF0>;
<a name="l76"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l77"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN_FIND</span><span class=cF0>:
<a name="l78"></a> flags=</span><span class=cF3>DOCF_PLAIN_TEXT</span><span class=cF0>|</span><span class=cF3>DOCF_NO_CURSOR</span><span class=cF0>;
<a name="l79"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DOC_FIND</span><span class=cF0>:
<a name="l80"></a> type=</span><span class=cF3>LK_FILE_FIND</span><span class=cF0>;
<a name="l81"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l82"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN_LINE</span><span class=cF0>:
<a name="l83"></a> flags=</span><span class=cF3>DOCF_PLAIN_TEXT</span><span class=cF0>|</span><span class=cF3>DOCF_NO_CURSOR</span><span class=cF0>;
<a name="l84"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DOC_LINE</span><span class=cF0>:
<a name="l85"></a> type=</span><span class=cF3>LK_FILE_LINE</span><span class=cF0>;
<a name="l86"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l87"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_BIBLE_FIND</span><span class=cF0>:
<a name="l88"></a> flags=</span><span class=cF3>DOCF_PLAIN_TEXT</span><span class=cF0>|</span><span class=cF3>DOCF_NO_CURSOR</span><span class=cF0>;
<a name="l89"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l90"></a> }
<a name="l91"></a>
<a name="l92"></a> flags|=</span><span class=cF3>DOCF_ALLOW_UNDO</span><span class=cF0>;
<a name="l93"></a>
<a name="l94"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF3>LK_DOC</span><span class=cF0>&lt;=_type&lt;=</span><span class=cF3>LK_DOC_LINE</span><span class=cF0>) {
<a name="l95"></a> doc=</span><span class=cF5>Str2I64</span><span class=cF0>(filename);</span><span class=cF2>//See </span><a href="/Wb/Adam/Gr/SpriteEd.HC.HTML#l573"><span class=cF4>SpriteEdText</span></a><span class=cF2>()</span><span class=cF0>
<a name="l96"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l97"></a> } </span><span class=cF1>else</span><span class=cF0> {
<a name="l98"></a> st1=</span><span class=cF5>StrNew</span><span class=cF0>(filename);
<a name="l99"></a> st2=</span><span class=cF5>StrNew</span><span class=cF0>(filename);
<a name="l100"></a> </span><span class=cF5>StrLastRem</span><span class=cF0>(st1,</span><span class=cF6>&quot;/&quot;</span><span class=cF0>,st2); </span><span class=cF2>//st2 is name without dir</span><span class=cF0>
<a name="l101"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>FileNameChk</span><span class=cF7>(</span><span class=cF0>st2</span><span class=cF7>)</span><span class=cF0>)
<a name="l102"></a> doc=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l103"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l104"></a> </span><span class=cF5>Silent</span><span class=cF0>;
<a name="l105"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;edf_dof_flags,</span><span class=cF3>EDf_BAIL</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF2>//if bail, scan parents</span><span class=cF0>
<a name="l106"></a> res=</span><span class=cF5>FileFind</span><span class=cF0>(filename,,
<a name="l107"></a> </span><span class=cF3>FUF_JUST_FILES</span><span class=cF0>|</span><span class=cF3>FUF_Z_OR_NOT_Z</span><span class=cF0>|</span><span class=cF3>FUF_SCAN_PARENTS</span><span class=cF0>);
<a name="l108"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>res=</span><span class=cF5>FileFind</span><span class=cF0>(filename,,</span><span class=cF3>FUF_JUST_FILES</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
<a name="l109"></a> other_found=</span><span class=cF5>FileFind</span><span class=cF0>(filename,,
<a name="l110"></a> </span><span class=cF3>FUF_JUST_FILES</span><span class=cF0>|</span><span class=cF3>FUF_Z_OR_NOT_Z</span><span class=cF0>|</span><span class=cF3>FUF_SCAN_PARENTS</span><span class=cF0>);
<a name="l111"></a> doc=</span><span class=cF5>DocRead</span><span class=cF0>(filename,flags);
<a name="l112"></a> doc-&gt;desc=</span><span class=cF6>'Edit'</span><span class=cF0>;
<a name="l113"></a> </span><span class=cF5>Silent</span><span class=cF0>(old_silent);
<a name="l114"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src=</span><span class=cF3>BDS_ED_FILENAME_DRV</span><span class=cF0>;
<a name="l115"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l116"></a> </span><span class=cF5>Free</span><span class=cF0>(st1);
<a name="l117"></a> </span><span class=cF5>Free</span><span class=cF0>(st2);
<a name="l118"></a> }
<a name="l119"></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>)
<a name="l120"></a> res=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l121"></a> </span><span class=cF1>else</span><span class=cF0> {
<a name="l122"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;edf_dof_flags,</span><span class=cF3>EDf_COLLAPSE</span><span class=cF7>)</span><span class=cF0>)
<a name="l123"></a> </span><span class=cF5>DocCollapse</span><span class=cF0>(</span><span class=cF3>TRUE</span><span class=cF0>,doc);
<a name="l124"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>&amp;edf_dof_flags,</span><span class=cF3>EDf_UNCOLLAPSE</span><span class=cF7>)</span><span class=cF0>)
<a name="l125"></a> </span><span class=cF5>DocCollapse</span><span class=cF0>(</span><span class=cF3>FALSE</span><span class=cF0>,doc);
<a name="l126"></a>
<a name="l127"></a> </span><span class=cF1>if</span><span class=cF0> (res || other_found)
<a name="l128"></a> </span><span class=cF1>switch</span><span class=cF0> (type) </span><span class=cF7>{</span><span class=cF0>
<a name="l129"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_LINE</span><span class=cF0>:
<a name="l130"></a> res=</span><span class=cF5>DocGoToLine</span><span class=cF0>(doc,*_num);
<a name="l131"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l132"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_ANCHOR</span><span class=cF0>:
<a name="l133"></a> res=</span><span class=cF5>DocAnchorFind</span><span class=cF0>(doc,needle_str);
<a name="l134"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l135"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_FIND</span><span class=cF0>:
<a name="l136"></a> res=</span><span class=cF5>DocFind</span><span class=cF0>(doc,,needle_str,*_num);
<a name="l137"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l138"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_BIBLE_FIND</span><span class=cF0>:
<a name="l139"></a> res=</span><span class=cF5>DocFind</span><span class=cF0>(doc,*_num,needle_str);
<a name="l140"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l141"></a> </span><span class=cF1>default</span><span class=cF0>:
<a name="l142"></a> </span><span class=cF5>DocCenter</span><span class=cF0>(doc);
<a name="l143"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l144"></a> *_num=doc-&gt;cur_entry-&gt;y+1;
<a name="l145"></a>
<a name="l146"></a> </span><span class=cF1>if</span><span class=cF0> (edf_dof_flags&amp;</span><span class=cF3>EDF_WAS_WRITE</span><span class=cF0>)
<a name="l147"></a> res=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l148"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>edf_dof_flags&amp;</span><span class=cF3>EDF_BAIL</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l149"></a> </span><span class=cF1>if</span><span class=cF0> (*doc-&gt;filename.name)
<a name="l150"></a> doc-&gt;filename.dirc=</span><span class=cF5>DirContextNew</span><span class=cF0>(doc-&gt;filename.name);
<a name="l151"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l152"></a> doc-&gt;filename.dirc=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l153"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocEd</span><span class=cF7>(</span><span class=cF0>doc,edf_dof_flags|</span><span class=cF3>DOF_DONT_HOME</span><span class=cF7>)</span><span class=cF0>) {
<a name="l154"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
<a name="l155"></a> doc_e=doc-&gt;cur_entry;
<a name="l156"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e!=doc)
<a name="l157"></a> </span><span class=cF5>DocEntryRun</span><span class=cF0>(doc,doc_e,</span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l158"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
<a name="l159"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF3>LK_DOC</span><span class=cF0>&lt;=_type&lt;=</span><span class=cF3>LK_DOC_LINE</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l160"></a> </span><span class=cF5>DocWrite</span><span class=cF0>(doc);
<a name="l161"></a> </span><span class=cF1>if</span><span class=cF0> (edf_dof_flags&amp;</span><span class=cF3>EDF_WAS_WRITE</span><span class=cF0>)
<a name="l162"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l163"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l164"></a> }
<a name="l165"></a> </span><span class=cF5>DirContextDel</span><span class=cF0>(doc-&gt;filename.dirc);
<a name="l166"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l167"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF3>LK_DOC</span><span class=cF0>&lt;=_type&lt;=</span><span class=cF3>LK_DOC_LINE</span><span class=cF7>)</span><span class=cF0>)
<a name="l168"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l169"></a> }
<a name="l170"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>catch</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l171"></a> </span><span class=cF5>Silent</span><span class=cF0>(old_silent);
<a name="l172"></a> res=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l173"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l174"></a> </span><span class=cF5>Fs</span><span class=cF0>-&gt;border_src=old_border_src;
<a name="l175"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l176"></a>}
<a name="l177"></a>
<a name="l178"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>DFT_ADDR_LINK_BIN_SIZE</span><span class=cF0> 64
<a name="l179"></a>
<a name="l180"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>EdLinkCvt</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *link_st,</span><span class=cF1>U8</span><span class=cF0> **_filename=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF1>U8</span><span class=cF0> **_needle_str=</span><span class=cF3>NULL</span><span class=cF0>,
<a name="l181"></a> </span><span class=cF9>I64</span><span class=cF0> *_num=</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF9>I64</span><span class=cF0> edf_dof_flags=0)
<a name="l182"></a>{</span><span class=cF2>//</span><a href="/Wb/Adam/DolDoc/DocLink.HC.HTML#l29"><span class=cF4>Editor Link</span></a><span class=cF2>--&gt; filename, needle_str and line number.</span><span class=cF0>
<a name="l183"></a> </span><span class=cF1>U8</span><span class=cF0> *st,*ptr,*src,*filename=</span><span class=cF3>NULL</span><span class=cF0>,*needle_str=</span><span class=cF3>NULL</span><span class=cF0>,*filename2;
<a name="l184"></a> </span><span class=cF9>I64</span><span class=cF0> res,i,num=1;
<a name="l185"></a> </span><span class=cF9>CHashSrcSym</span><span class=cF0> *tmph;
<a name="l186"></a> </span><span class=cF1>if</span><span class=cF0> (!link_st||!*link_st) </span><span class=cF7>{</span><span class=cF0>
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (edf_dof_flags&amp;</span><span class=cF3>EDF_BAIL</span><span class=cF0>)
<a name="l188"></a> </span><span class=cF1>return</span><span class=cF0> -1;
<a name="l189"></a> link_st=</span><span class=cFB>blkdev</span><span class=cF0>.tmp_filename;
<a name="l190"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l191"></a> st=</span><span class=cF5>StrNew</span><span class=cF0>(link_st);
<a name="l192"></a> res=</span><span class=cF3>LK_FILE</span><span class=cF0>;
<a name="l193"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0>&gt;3 &amp;&amp; st[2]==</span><span class=cF6>':'</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l194"></a> st[2]=0;
<a name="l195"></a> filename2=st+3;
<a name="l196"></a> </span><span class=cF1>switch</span><span class=cF0> (res=</span><span class=cF5>DefineMatch</span><span class=cF7>(</span><span class=cF0>st,</span><span class=cF6>&quot;ST_LINK_TYPES&quot;</span><span class=cF0>,</span><span class=cF3>LMF_IGNORE_CASE</span><span class=cF7>)</span><span class=cF0>) {
<a name="l197"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_MAN_PAGE</span><span class=cF0>:
<a name="l198"></a> </span><span class=cF1>if</span><span class=cF0> (tmph=</span><span class=cF5>HashFind</span><span class=cF7>(</span><span class=cF0>filename2,</span><span class=cF5>Fs</span><span class=cF0>-&gt;hash_table,</span><span class=cF3>HTG_SRC_SYM</span><span class=cF7>)</span><span class=cF0>)
<a name="l199"></a> res=</span><span class=cF5>EdLinkCvt</span><span class=cF0>(tmph-&gt;src_link,&amp;filename,
<a name="l200"></a> &amp;needle_str,&amp;num,edf_dof_flags);
<a name="l201"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l202"></a> res=-1;
<a name="l203"></a> </span><span class=cF1>goto</span><span class=cF0> lc_done;
<a name="l204"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_ADDR</span><span class=cF0>:
<a name="l205"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>StrLastOcc</span><span class=cF7>(</span><span class=cF0>filename2,</span><span class=cF6>&quot;,&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l206"></a> *ptr=0;
<a name="l207"></a> i=</span><span class=cF5>Str2I64</span><span class=cF0>(ptr+1);
<a name="l208"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l209"></a> i=</span><span class=cF3>DFT_ADDR_LINK_BIN_SIZE</span><span class=cF0>;
<a name="l210"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>SrcEdLink</span><span class=cF7>(</span><span class=cF5>ExePrint</span><span class=cF0>(</span><span class=cF6>&quot;%s;&quot;</span><span class=cF0>,filename2),i</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l211"></a> res=</span><span class=cF5>EdLinkCvt</span><span class=cF0>(ptr,&amp;filename,&amp;needle_str,&amp;num,edf_dof_flags);
<a name="l212"></a> </span><span class=cF5>Free</span><span class=cF0>(ptr);
<a name="l213"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l214"></a> res=-1;
<a name="l215"></a> </span><span class=cF1>goto</span><span class=cF0> lc_done;
<a name="l216"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DEF</span><span class=cF0>:
<a name="l217"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>StrLastOcc</span><span class=cF7>(</span><span class=cF0>filename2,</span><span class=cF6>&quot;,&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l218"></a> *ptr=0;
<a name="l219"></a> i=</span><span class=cF5>Str2I64</span><span class=cF0>(ptr+1);
<a name="l220"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l221"></a> i=-1;
<a name="l222"></a> filename=</span><span class=cF5>StrNew</span><span class=cF0>(filename2);
<a name="l223"></a> num=i;
<a name="l224"></a> </span><span class=cF1>goto</span><span class=cF0> lc_done;
<a name="l225"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_HELP_INDEX</span><span class=cF0>:
<a name="l226"></a> filename=</span><span class=cF5>StrNew</span><span class=cF0>(filename2);
<a name="l227"></a> </span><span class=cF1>goto</span><span class=cF0> lc_done;
<a name="l228"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_BIBLE_FIND</span><span class=cF0>:
<a name="l229"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>StrLastOcc</span><span class=cF7>(</span><span class=cF0>filename2,</span><span class=cF6>&quot;,&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l230"></a> *ptr=0;
<a name="l231"></a> src=ptr+1;
<a name="l232"></a> </span><span class=cF1>while</span><span class=cF0> (*src) { </span><span class=cF2>//We do not allow ending verse</span><span class=cF0>
<a name="l233"></a> </span><span class=cF1>if</span><span class=cF0> (*src==</span><span class=cF6>'-'</span><span class=cF0>)
<a name="l234"></a> *src=0;
<a name="l235"></a> src++;
<a name="l236"></a> }
<a name="l237"></a> needle_str=</span><span class=cF5>StrNew</span><span class=cF0>(ptr+1);
<a name="l238"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l239"></a> i=</span><span class=cF5>DefineMatch</span><span class=cF0>(filename2,</span><span class=cF6>&quot;ST_BIBLE_BOOKS&quot;</span><span class=cF0>,</span><span class=cF3>LMF_IGNORE_CASE</span><span class=cF0>);
<a name="l240"></a> </span><span class=cF1>if</span><span class=cF0> (i&lt;0)
<a name="l241"></a> res=-1;
<a name="l242"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l243"></a> num=</span><span class=cF5>Str2I64</span><span class=cF0>(</span><span class=cF5>DefineSub</span><span class=cF7>(</span><span class=cF0>i,</span><span class=cF6>&quot;ST_BIBLE_BOOK_LINES&quot;</span><span class=cF7>)</span><span class=cF0>);
<a name="l244"></a> filename2=</span><span class=cF3>BIBLE_FILENAME</span><span class=cF0>;
<a name="l245"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l246"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l247"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_LINE</span><span class=cF0>:
<a name="l248"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN_LINE</span><span class=cF0>:
<a name="l249"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DOC_LINE</span><span class=cF0>:
<a name="l250"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>StrLastOcc</span><span class=cF7>(</span><span class=cF0>filename2,</span><span class=cF6>&quot;,&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l251"></a> *ptr=0;
<a name="l252"></a> num=</span><span class=cF5>Str2I64</span><span class=cF0>(ptr+1);
<a name="l253"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l254"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l255"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_ANCHOR</span><span class=cF0>:
<a name="l256"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DOC_ANCHOR</span><span class=cF0>:
<a name="l257"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>StrLastOcc</span><span class=cF7>(</span><span class=cF0>filename2,</span><span class=cF6>&quot;,&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l258"></a> *ptr=0;
<a name="l259"></a> needle_str=</span><span class=cF5>StrNew</span><span class=cF0>(ptr+1);
<a name="l260"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l261"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l262"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_FIND</span><span class=cF0>:
<a name="l263"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN_FIND</span><span class=cF0>:
<a name="l264"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_DOC_FIND</span><span class=cF0>:
<a name="l265"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>StrLastOcc</span><span class=cF7>(</span><span class=cF0>filename2,</span><span class=cF6>&quot;,&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l266"></a> *ptr=0;
<a name="l267"></a> needle_str=</span><span class=cF5>StrNew</span><span class=cF0>(ptr+1);
<a name="l268"></a> </span><span class=cF1>if</span><span class=cF0> (ptr=</span><span class=cF5>StrLastOcc</span><span class=cF7>(</span><span class=cF0>needle_str,</span><span class=cF6>&quot;:&quot;</span><span class=cF7>)</span><span class=cF0>) {
<a name="l269"></a> *ptr=0;
<a name="l270"></a> num=</span><span class=cF5>Str2I64</span><span class=cF0>(ptr+1);
<a name="l271"></a> }
<a name="l272"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l273"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l274"></a> }
<a name="l275"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>else</span><span class=cF0>
<a name="l276"></a> filename2=st;
<a name="l277"></a> </span><span class=cF1>if</span><span class=cF0> (res&gt;=0) </span><span class=cF7>{</span><span class=cF0>
<a name="l278"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF3>LK_DOC</span><span class=cF0>&lt;=res&lt;=</span><span class=cF3>LK_DOC_LINE</span><span class=cF0>)
<a name="l279"></a> filename=</span><span class=cF5>StrNew</span><span class=cF0>(filename2); </span><span class=cF2>//Holds document address as number.</span><span class=cF0>
<a name="l280"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l281"></a> filename=</span><span class=cF5>FileNameAbs</span><span class=cF0>(filename2,</span><span class=cF3>FUF_Z_OR_NOT_Z</span><span class=cF0>);
<a name="l282"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l283"></a>lc_done:
<a name="l284"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l285"></a> </span><span class=cF1>if</span><span class=cF0> (_filename)
<a name="l286"></a> *_filename=filename;
<a name="l287"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l288"></a> </span><span class=cF5>Free</span><span class=cF0>(filename);
<a name="l289"></a> </span><span class=cF1>if</span><span class=cF0> (_needle_str)
<a name="l290"></a> *_needle_str=needle_str;
<a name="l291"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l292"></a> </span><span class=cF5>Free</span><span class=cF0>(needle_str);
<a name="l293"></a> </span><span class=cF1>if</span><span class=cF0> (_num)
<a name="l294"></a> *_num=num;
<a name="l295"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l296"></a>}
<a name="l297"></a>
<a name="l298"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>Bool</span><span class=cF0> </span><span class=cF5>DocLinkChk</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF1>U8</span><span class=cF0> *link_st)
<a name="l299"></a>{</span><span class=cF2>//Check for bad </span><a href="/Wb/Adam/DolDoc/DocLink.HC.HTML#l29"><span class=cF4>Editor Link</span></a><span class=cF2>.</span><span class=cF0>
<a name="l300"></a> </span><span class=cF1>U8</span><span class=cF0> *filename,*st;
<a name="l301"></a> </span><span class=cF1>Bool</span><span class=cF0> res=</span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l302"></a> </span><span class=cF9>CDirContext</span><span class=cF0> *dirc;
<a name="l303"></a> </span><span class=cF1>if</span><span class=cF0> (link_st) </span><span class=cF7>{</span><span class=cF0>
<a name="l304"></a> st=</span><span class=cF5>FileNameAbs</span><span class=cF0>(doc-&gt;filename.name);
<a name="l305"></a> dirc=</span><span class=cF5>DirContextNew</span><span class=cF0>(st);
<a name="l306"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l307"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>EdLinkCvt</span><span class=cF7>(</span><span class=cF0>link_st,&amp;filename</span><span class=cF7>)</span><span class=cF0>) {
<a name="l308"></a> </span><span class=cF1>case</span><span class=cF0> -1:
<a name="l309"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l310"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_LINE</span><span class=cF0>:
<a name="l311"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN_LINE</span><span class=cF0>:
<a name="l312"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE</span><span class=cF0>:
<a name="l313"></a></span><span class=cF2>//We don't check line number</span><span class=cF0>
<a name="l314"></a> res=</span><span class=cF5>FileFind</span><span class=cF0>(filename,,
<a name="l315"></a> </span><span class=cF3>FUF_JUST_FILES</span><span class=cF0>|</span><span class=cF3>FUF_Z_OR_NOT_Z</span><span class=cF0>|</span><span class=cF3>FUF_SCAN_PARENTS</span><span class=cF0>);
<a name="l316"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l317"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_BIBLE_FIND</span><span class=cF0>:
<a name="l318"></a> st=</span><span class=cF5>StrNew</span><span class=cF0>(link_st+3);
<a name="l319"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrOcc</span><span class=cF7>(</span><span class=cF0>st,</span><span class=cF6>','</span><span class=cF7>)</span><span class=cF0>)
<a name="l320"></a> </span><span class=cF5>StrLastRem</span><span class=cF0>(st,</span><span class=cF6>&quot;,&quot;</span><span class=cF0>);
<a name="l321"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DefineMatch</span><span class=cF7>(</span><span class=cF0>st,</span><span class=cF6>&quot;ST_BIBLE_BOOKS&quot;</span><span class=cF0>,</span><span class=cF3>LMF_IGNORE_CASE</span><span class=cF7>)</span><span class=cF0>&gt;=0)
<a name="l322"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l323"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l324"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l325"></a> </span><span class=cF1>default</span><span class=cF0>:</span><span class=cF2>//TODO: Need to validate HI: and DN:</span><span class=cF0>
<a name="l326"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Ed</span><span class=cF7>(</span><span class=cF0>link_st,</span><span class=cF3>EDF_BAIL</span><span class=cF7>)</span><span class=cF0>)
<a name="l327"></a> res=</span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l328"></a> }
<a name="l329"></a> </span><span class=cF5>Free</span><span class=cF0>(filename);
<a name="l330"></a> </span><span class=cF5>DirContextDel</span><span class=cF0>(dirc);
<a name="l331"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l332"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l333"></a>}
<a name="l334"></a>
<a name="l335"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>DocLinkFile</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *link_st,</span><span class=cF9>CTask</span><span class=cF0> *mem_task=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l336"></a>{</span><span class=cF2>//Return the file for an </span><a href="/Wb/Adam/DolDoc/DocLink.HC.HTML#l29"><span class=cF4>Editor Link Types</span></a><span class=cF2>.</span><span class=cF0>
<a name="l337"></a> </span><span class=cF1>U8</span><span class=cF0> *filename=</span><span class=cF3>NULL</span><span class=cF0>,*st,*res=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l338"></a> </span><span class=cF1>if</span><span class=cF0> (link_st) </span><span class=cF7>{</span><span class=cF0>
<a name="l339"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>EdLinkCvt</span><span class=cF7>(</span><span class=cF0>link_st,&amp;filename</span><span class=cF7>)</span><span class=cF0>) {
<a name="l340"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE</span><span class=cF0>:
<a name="l341"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_ANCHOR</span><span class=cF0>:
<a name="l342"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_FIND</span><span class=cF0>:
<a name="l343"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_FILE_LINE</span><span class=cF0>:
<a name="l344"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN</span><span class=cF0>:
<a name="l345"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN_FIND</span><span class=cF0>:
<a name="l346"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_PLAIN_LINE</span><span class=cF0>:
<a name="l347"></a> st=</span><span class=cF5>FileNameAbs</span><span class=cF0>(filename,</span><span class=cF3>FUF_Z_OR_NOT_Z</span><span class=cF0>|</span><span class=cF3>FUF_SCAN_PARENTS</span><span class=cF0>);
<a name="l348"></a> res=</span><span class=cF5>StrNew</span><span class=cF0>(st);
<a name="l349"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l350"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l351"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>LK_BIBLE_FIND</span><span class=cF0>:
<a name="l352"></a> res=</span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF3>BIBLE_FILENAME</span><span class=cF0>,mem_task);
<a name="l353"></a> </span><span class=cF1>break</span><span class=cF0>;
<a name="l354"></a> }
<a name="l355"></a> </span><span class=cF5>Free</span><span class=cF0>(filename);
<a name="l356"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l357"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l358"></a>}
</span></pre></body>
</html>