templeos-info/public/Wb/Apps/Psalmody/JukeBox.HC.HTML

232 lines
25 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=cF9>CTask</span><span class=cF0> *JukeReward(</span><span class=cF1>U8</span><span class=cF0> *msg)
<a name="l2"></a>{
<a name="l3"></a> </span><span class=cF1>U8</span><span class=cF0> *buf;
<a name="l4"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc;
<a name="l5"></a> </span><span class=cF9>CTask</span><span class=cF0> *res=</span><span class=cF5>Spawn</span><span class=cF0>(&amp;</span><span class=cF5>SrvCmdLine</span><span class=cF0>,</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF6>&quot;Reward&quot;</span><span class=cF0>,,</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l6"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(res-&gt;task_title,</span><span class=cF6>&quot;Reward&quot;</span><span class=cF0>);
<a name="l7"></a> res-&gt;title_src=</span><span class=cF3>TTS_LOCKED_CONST</span><span class=cF0>;
<a name="l8"></a>
<a name="l9"></a> doc=</span><span class=cF5>DocNew</span><span class=cF0>(,res);
<a name="l10"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$WW+H,1$$RED$%s&quot;</span><span class=cF0>,msg);
<a name="l11"></a>
<a name="l12"></a> buf=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;DocEd(0x%X);&quot;</span><span class=cF0>,doc);
<a name="l13"></a> </span><span class=cF5>TaskExe</span><span class=cF0>(res,</span><span class=cF3>NULL</span><span class=cF0>,buf,1&lt;&lt;</span><span class=cF3>JOBf_EXIT_ON_COMPLETE</span><span class=cF0>|1&lt;&lt;</span><span class=cF3>JOBf_FREE_ON_COMPLETE</span><span class=cF0>);
<a name="l14"></a> </span><span class=cF5>Free</span><span class=cF0>(buf);
<a name="l15"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(res);
<a name="l16"></a>
<a name="l17"></a> res-&gt;border_src =</span><span class=cF3>BDS_CONST</span><span class=cF0>;
<a name="l18"></a> res-&gt;border_attr=</span><span class=cF3>LTGRAY</span><span class=cF0>&lt;&lt;4+</span><span class=cF5>DrvTextAttrGet</span><span class=cF0>(</span><span class=cF6>':'</span><span class=cF0>)&amp;15;
<a name="l19"></a> res-&gt;text_attr =</span><span class=cF3>LTGRAY</span><span class=cF0>&lt;&lt;4+</span><span class=cF3>BLUE</span><span class=cF0>;
<a name="l20"></a> res-&gt;win_inhibit=</span><span class=cF3>WIG_NO_FOCUS_TASK_DFT</span><span class=cF0>;
<a name="l21"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;win_right+2,</span><span class=cF3>TEXT_COLS</span><span class=cF0>-2,res);
<a name="l22"></a> </span><span class=cF5>WinVert</span><span class=cF0>(2,</span><span class=cF3>TEXT_ROWS</span><span class=cF0>-2,res);
<a name="l23"></a>
<a name="l24"></a> </span><span class=cF5>WinFocus</span><span class=cF0>(</span><span class=cF5>Fs</span><span class=cF0>-&gt;parent_task);
<a name="l25"></a> </span><span class=cF1>return</span><span class=cF0> res;
<a name="l26"></a>}
<a name="l27"></a>
<a name="l28"></a></span><span class=cF9>CTask</span><span class=cF0> *SingleSong(</span><span class=cF1>U8</span><span class=cF0> *msg,</span><span class=cF1>U8</span><span class=cF0> *name)
<a name="l29"></a>{
<a name="l30"></a> </span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF5>Spawn</span><span class=cF0>(&amp;</span><span class=cF5>SrvCmdLine</span><span class=cF0>,</span><span class=cF3>NULL</span><span class=cF0>,name,,</span><span class=cF5>Fs</span><span class=cF0>);
<a name="l31"></a> </span><span class=cF5>StrCpy</span><span class=cF0>(task-&gt;task_title,name);
<a name="l32"></a> task-&gt;title_src=</span><span class=cF3>TTS_LOCKED_CONST</span><span class=cF0>;
<a name="l33"></a> </span><span class=cF5>TaskExe</span><span class=cF0>(task,</span><span class=cF5>Fs</span><span class=cF0>,</span><span class=cF6>&quot;;&quot;</span><span class=cF0>,1&lt;&lt;</span><span class=cF3>JOBf_WAKE_MASTER</span><span class=cF0>|1&lt;&lt;</span><span class=cF3>JOBf_FREE_ON_COMPLETE</span><span class=cF0>);
<a name="l34"></a> </span><span class=cF5>WinHorz</span><span class=cF0>(task-&gt;win_left,task-&gt;win_left+50,task);
<a name="l35"></a> </span><span class=cF5>WinVert</span><span class=cF0>(2,2+8,task);
<a name="l36"></a> task-&gt;win_inhibit=</span><span class=cF3>WIG_NO_FOCUS_TASK_DFT</span><span class=cF0>;
<a name="l37"></a> </span><span class=cF5>TaskExe</span><span class=cF0>(task,</span><span class=cF3>NULL</span><span class=cF0>,msg,1&lt;&lt;</span><span class=cF3>JOBf_EXIT_ON_COMPLETE</span><span class=cF0>|1&lt;&lt;</span><span class=cF3>JOBf_FREE_ON_COMPLETE</span><span class=cF0>);
<a name="l38"></a> </span><span class=cF5>DocPut</span><span class=cF0>(task)-&gt;max_entries=100;
<a name="l39"></a> </span><span class=cF1>return</span><span class=cF0> task;
<a name="l40"></a>}
<a name="l41"></a>
<a name="l42"></a>#</span><span class=cF1>define</span><span class=cF0> JB_RUN_LEVEL_NULL 0
<a name="l43"></a>#</span><span class=cF1>define</span><span class=cF0> JB_RUN_LEVEL_ONE 1
<a name="l44"></a>#</span><span class=cF1>define</span><span class=cF0> JB_RUN_LEVEL_TWO 2
<a name="l45"></a>
<a name="l46"></a></span><span class=cF1>Bool</span><span class=cF0> JBPutKey(</span><span class=cF9>CDoc</span><span class=cF0> *doc,</span><span class=cF1>U8</span><span class=cF0> *,</span><span class=cF9>I64</span><span class=cF0> ch,</span><span class=cF9>I64</span><span class=cF0> sc)
<a name="l47"></a>{</span><span class=cF2>//ch=ASCII; sc=scan_code</span><span class=cF0>
<a name="l48"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce=doc-&gt;cur_entry,*doc_e;
<a name="l49"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
<a name="l50"></a> </span><span class=cF9>I64</span><span class=cF0> i;
<a name="l51"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
<a name="l52"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc2;
<a name="l53"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>sc&amp;(</span><span class=cF3>SCF_ALT</span><span class=cF0>|</span><span class=cF3>SCF_CTRL</span><span class=cF0>|</span><span class=cF3>SCF_SHIFT</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>
<a name="l54"></a> &amp;&amp; doc_ce-&gt;type_u8==</span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0> &amp;&amp; doc_ce-&gt;left_exp&gt;=0) </span><span class=cF7>{</span><span class=cF0>
<a name="l55"></a> tmpde=doc_ce-&gt;left_exp;
<a name="l56"></a> </span><span class=cF1>if</span><span class=cF0> (sc.u8[0]==</span><span class=cF3>SC_DELETE</span><span class=cF0> ) {
<a name="l57"></a> </span><span class=cF5>Beep</span><span class=cF0>;
<a name="l58"></a> </span><span class=cF5>Silent</span><span class=cF0>;
<a name="l59"></a> </span><span class=cF5>Del</span><span class=cF0>(tmpde-&gt;full_name);
<a name="l60"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
<a name="l61"></a> } </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF6>'0'</span><span class=cF0>&lt;=ch&lt;=</span><span class=cF6>'9'</span><span class=cF0>) {
<a name="l62"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>doc_ce-&gt;tag</span><span class=cF7>)</span><span class=cF0>&gt;1)
<a name="l63"></a> doc_ce-&gt;tag[0]=ch;
<a name="l64"></a> doc2=</span><span class=cF5>DocRead</span><span class=cF0>(tmpde-&gt;full_name);
<a name="l65"></a> </span><span class=cF5>DocGoToLine</span><span class=cF0>(doc2,1);
<a name="l66"></a> doc_e=doc2-&gt;cur_entry;
<a name="l67"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e!=doc2 &amp;&amp; doc_e-&gt;type_u8==</span><span class=cF3>DOCT_TEXT</span><span class=cF0> &amp;&amp; </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>doc_e-&gt;tag</span><span class=cF7>)</span><span class=cF0>&gt;=3) </span><span class=cF7>{</span><span class=cF0>
<a name="l68"></a> doc_e-&gt;tag[2]=ch;
<a name="l69"></a> </span><span class=cF5>DocWrite</span><span class=cF0>(doc2);
<a name="l70"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l71"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc2);
<a name="l72"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l73"></a> } </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF6>'r'</span><span class=cF0>) {
<a name="l74"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>DocTreeFFind</span><span class=cF7>(</span><span class=cF0>tmpde-&gt;full_name,</span><span class=cF6>&quot;Reward1&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l75"></a> doc2=</span><span class=cF5>DocRead</span><span class=cF0>(tmpde-&gt;full_name);
<a name="l76"></a> </span><span class=cF5>DocGoToLine</span><span class=cF0>(doc2,2);
<a name="l77"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc2,
<a name="l78"></a> </span><span class=cF6>&quot;\n$TR,\&quot;Reward1\&quot;$\n&quot;</span><span class=cF0>
<a name="l79"></a> </span><span class=cF6>&quot;$ID,2$CallExtStr(\&quot;JukeReward\&quot;,\&quot;\&quot;\n&quot;</span><span class=cF0>
<a name="l80"></a> </span><span class=cF6>&quot;$TR,\&quot;Reward2\&quot;$\n&quot;</span><span class=cF0>
<a name="l81"></a> </span><span class=cF6>&quot;$ID,2$\n&quot;</span><span class=cF0>
<a name="l82"></a> </span><span class=cF6>&quot;$ID,-2$\n&quot;</span><span class=cF0>
<a name="l83"></a> </span><span class=cF6>&quot;);\n$ID,-2$\n&quot;</span><span class=cF0>
<a name="l84"></a> );
<a name="l85"></a> </span><span class=cF5>DocWrite</span><span class=cF0>(doc2);
<a name="l86"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc2);
<a name="l87"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l88"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocTreeFFind</span><span class=cF7>(</span><span class=cF0>tmpde-&gt;full_name,</span><span class=cF6>&quot;Reward1/Reward2&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l89"></a> </span><span class=cF1>for</span><span class=cF0> (i=0;i&lt;5;i++) {
<a name="l90"></a> st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%s %s %s %s &quot;</span><span class=cF0>,
<a name="l91"></a> </span><span class=cF5>GodWordStr</span><span class=cF0>,</span><span class=cF5>GodWordStr</span><span class=cF0>,</span><span class=cF5>GodWordStr</span><span class=cF0>,</span><span class=cF5>GodWordStr</span><span class=cF0>);
<a name="l92"></a> </span><span class=cF5>DocTreeFAppend</span><span class=cF0>(tmpde-&gt;full_name,</span><span class=cF6>&quot;Reward1/Reward2&quot;</span><span class=cF0>,
<a name="l93"></a> </span><span class=cF6>&quot;\&quot;%s\&quot;\n&quot;</span><span class=cF0>,st);
<a name="l94"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l95"></a> }
<a name="l96"></a> </span><span class=cF5>In</span><span class=cF0>(</span><span class=cF6>&quot; &quot;</span><span class=cF0>);
<a name="l97"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l98"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>TRUE</span><span class=cF0>;
<a name="l99"></a> } </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (ch==</span><span class=cF3>CH_SPACE</span><span class=cF0>||ch==</span><span class=cF3>CH_ESC</span><span class=cF0>)
<a name="l100"></a> tmpde-&gt;user_data++; </span><span class=cF2>//JB_RUN_LEVEL++</span><span class=cF0>
<a name="l101"></a></span><span class=cF2>//&lt;SPACE&gt; is followed by &lt;ESC&gt; --&gt; JB_RUN_LEVEL_TWO</span><span class=cF0>
<a name="l102"></a> </span><span class=cF2>//Actual &lt;ESC&gt; just exits --&gt; JB_RUN_LEVEL_ONE</span><span class=cF0>
<a name="l103"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l104"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>FALSE</span><span class=cF0>;
<a name="l105"></a>}
<a name="l106"></a>
<a name="l107"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> JukeBox(</span><span class=cF1>U8</span><span class=cF0> *dirname=</span><span class=cF6>&quot;~/Psalmody&quot;</span><span class=cF0>,</span><span class=cF1>U8</span><span class=cF0> **_filename=</span><span class=cF3>NULL</span><span class=cF0>)
<a name="l108"></a>{</span><span class=cF2>//_filename is for using this as a song-chooser program.</span><span class=cF0>
<a name="l109"></a> </span><span class=cF9>I64</span><span class=cF0> i=0,rating;
<a name="l110"></a> </span><span class=cF1>U8</span><span class=cF0> *st,*st2;
<a name="l111"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde,*tmpde1;
<a name="l112"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc=</span><span class=cF5>DocNew</span><span class=cF0>,*s;
<a name="l113"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
<a name="l114"></a> </span><span class=cF9>CTask</span><span class=cF0> *task=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l115"></a> </span><span class=cF1>if</span><span class=cF0> (_filename)
<a name="l116"></a> *_filename=</span><span class=cF3>NULL</span><span class=cF0>;
<a name="l117"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="/Wb/Adam/TaskSettings.HC.HTML#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
<a name="l118"></a> </span><span class=cF5>AutoComplete</span><span class=cF0>;
<a name="l119"></a> </span><span class=cF1>try</span><span class=cF0> </span><span class=cF7>{</span><span class=cF0>
<a name="l120"></a> dirname=</span><span class=cF5>StrNew</span><span class=cF0>(dirname);
<a name="l121"></a> st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;%s/*.HC.Z&quot;</span><span class=cF0>,dirname);
<a name="l122"></a> tmpde=tmpde1=</span><span class=cF5>FilesFind</span><span class=cF0>(st);
<a name="l123"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l124"></a> </span><span class=cF5>Free</span><span class=cF0>(dirname);
<a name="l125"></a> doc-&gt;user_put_key=&amp;JBPutKey;
<a name="l126"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,
<a name="l127"></a> </span><span class=cF6>&quot;Key: $GREEN$Graphics $BLUE$Words $RED$No Nothing &quot;</span><span class=cF0>
<a name="l128"></a> </span><span class=cF6>&quot;$BLACK$Incomplete $CYAN$Special$FG$\n\n&quot;</span><span class=cF0>
<a name="l129"></a> </span><span class=cF6>&quot;$GREEN$&lt;DEL&gt;$FG$\tto delete a song.\n&quot;</span><span class=cF0>
<a name="l130"></a> </span><span class=cF6>&quot;'$GREEN$0$FG$'-'$GREEN$9$FG$'\tto rate a song.\n&quot;</span><span class=cF0>
<a name="l131"></a> </span><span class=cF6>&quot;'$GREEN$r$FG$'\tto get your reward from God.\n&quot;</span><span class=cF0>);
<a name="l132"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde) {
<a name="l133"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>i++%5</span><span class=cF7>)</span><span class=cF0>)
<a name="l134"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l135"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>FileOcc</span><span class=cF7>(</span><span class=cF6>&quot;Play(&quot;</span><span class=cF0>,tmpde-&gt;full_name,</span><span class=cF6>&quot;&quot;</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l136"></a> st=</span><span class=cF5>StrNew</span><span class=cF0>(tmpde-&gt;name);
<a name="l137"></a> </span><span class=cF5>FileExtRem</span><span class=cF0>(st);
<a name="l138"></a> s=</span><span class=cF5>DocRead</span><span class=cF0>(tmpde-&gt;full_name);
<a name="l139"></a> doc_e=s-&gt;head.next;
<a name="l140"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=s &amp;&amp; doc_e-&gt;type_u8!=</span><span class=cF3>DOCT_TEXT</span><span class=cF0>)
<a name="l141"></a> doc_e=doc_e-&gt;next;
<a name="l142"></a> rating=</span><span class=cF6>'0'</span><span class=cF0>;
<a name="l143"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e!=s &amp;&amp; doc_e-&gt;type_u8==</span><span class=cF3>DOCT_TEXT</span><span class=cF0>) {
<a name="l144"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF6>'0'</span><span class=cF0>&lt;=doc_e-&gt;tag[2]&lt;=</span><span class=cF6>'9'</span><span class=cF0>)
<a name="l145"></a> rating=doc_e-&gt;tag[2];
<a name="l146"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrMatch</span><span class=cF7>(</span><span class=cF6>&quot;incomplete&quot;</span><span class=cF0>,doc_e-&gt;tag</span><span class=cF7>)</span><span class=cF0>)
<a name="l147"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BLACK$&quot;</span><span class=cF0>);
<a name="l148"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrMatch</span><span class=cF7>(</span><span class=cF6>&quot;has graphics&quot;</span><span class=cF0>,doc_e-&gt;tag</span><span class=cF7>)</span><span class=cF0>)
<a name="l149"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$GREEN$&quot;</span><span class=cF0>);
<a name="l150"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrMatch</span><span class=cF7>(</span><span class=cF6>&quot;has words&quot;</span><span class=cF0>,doc_e-&gt;tag</span><span class=cF7>)</span><span class=cF0>)
<a name="l151"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$BLUE$&quot;</span><span class=cF0>);
<a name="l152"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrMatch</span><span class=cF7>(</span><span class=cF6>&quot;special&quot;</span><span class=cF0>,doc_e-&gt;tag</span><span class=cF7>)</span><span class=cF0>)
<a name="l153"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$CYAN$&quot;</span><span class=cF0>);
<a name="l154"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrMatch</span><span class=cF7>(</span><span class=cF6>&quot;no nothing&quot;</span><span class=cF0>,doc_e-&gt;tag</span><span class=cF7>)</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
<a name="l155"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$RED$&quot;</span><span class=cF0>);
<a name="l156"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>FileOcc</span><span class=cF7>(</span><span class=cF6>&quot;\\0&quot;</span><span class=cF0>,tmpde-&gt;full_name,</span><span class=cF6>&quot;&quot;</span><span class=cF7>)</span><span class=cF0>) {
<a name="l157"></a> s-&gt;cur_entry=doc_e-&gt;next;
<a name="l158"></a> s-&gt;cur_col=0;
<a name="l159"></a> </span><span class=cF5>DocEntryDel</span><span class=cF0>(s,doc_e);
<a name="l160"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(s,</span><span class=cF6>&quot;//0 has words\n&quot;</span><span class=cF0>);
<a name="l161"></a> </span><span class=cF5>DocWrite</span><span class=cF0>(s);
<a name="l162"></a> }
<a name="l163"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l164"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;$MU-UL,\&quot;%c%-8ts\&quot;,LE=%d$ &quot;</span><span class=cF0>,rating,st,tmpde);
<a name="l165"></a> tmpde-&gt;user_data=JB_RUN_LEVEL_NULL;
<a name="l166"></a> }
<a name="l167"></a> </span><span class=cF5>DocDel</span><span class=cF0>(s);
<a name="l168"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l169"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l170"></a> tmpde=tmpde-&gt;next;
<a name="l171"></a> }
<a name="l172"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>&quot;\n$CYAN$$MU-UL,\&quot;DONE\&quot;,LE=%d$\n&quot;</span><span class=cF0>,</span><span class=cF3>DOCM_CANCEL</span><span class=cF0>);
<a name="l173"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>) {
<a name="l174"></a> </span><span class=cF1>if</span><span class=cF0> (_filename)
<a name="l175"></a> tmpde=</span><span class=cF5>PopUpMenu</span><span class=cF0>(doc,</span><span class=cF3>DOF_INTERCEPT_TASK_END</span><span class=cF0>);
<a name="l176"></a> </span><span class=cF1>else</span><span class=cF0>
<a name="l177"></a> tmpde=</span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
<a name="l178"></a> </span><span class=cF1>if</span><span class=cF0> (task)
<a name="l179"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
<a name="l180"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde&lt;=0) </span><span class=cF1>break</span><span class=cF0>;
<a name="l181"></a> st2=</span><span class=cF5>StrNew</span><span class=cF0>(tmpde-&gt;name);
<a name="l182"></a> </span><span class=cF1>if</span><span class=cF0> (_filename) </span><span class=cF7>{</span><span class=cF0>
<a name="l183"></a> </span><span class=cF5>Free</span><span class=cF0>(*_filename);
<a name="l184"></a> *_filename=</span><span class=cF5>StrNew</span><span class=cF0>(tmpde-&gt;full_name);
<a name="l185"></a> </span><span class=cF7>}</span><span class=cF0>
<a name="l186"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde-&gt;user_data==JB_RUN_LEVEL_ONE) </span><span class=cF1>break</span><span class=cF0>; </span><span class=cF2>//&lt;ESC&gt;</span><span class=cF0>
<a name="l187"></a> tmpde-&gt;user_data=JB_RUN_LEVEL_NULL; </span><span class=cF2>//Rst from &lt;SPACE&gt;</span><span class=cF0>
<a name="l188"></a> </span><span class=cF5>FileExtRem</span><span class=cF0>(st2);
<a name="l189"></a> st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>&quot;ExeFile(\&quot;%s\&quot;);&quot;</span><span class=cF0>,tmpde-&gt;full_name);
<a name="l190"></a> </span><span class=cF5>MusicSettingsRst</span><span class=cF0>;
<a name="l191"></a> task=SingleSong(st,st2);
<a name="l192"></a> </span><span class=cF5>Free</span><span class=cF0>(st2);
<a name="l193"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
<a name="l194"></a> }
<a name="l195"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
<a name="l196"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(tmpde1);
<a name="l197"></a> </span><span class=cF7>}</span><span class=cF0> </span><span class=cF1>catch</span><span class=cF0>
<a name="l198"></a> </span><span class=cF5>PutExcept</span><span class=cF0>;
<a name="l199"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
<a name="l200"></a>}
</span></pre></body>
</html>