232 lines
25 KiB
HTML
Executable File
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>(&</span><span class=cF5>SrvCmdLine</span><span class=cF0>,</span><span class=cF3>NULL</span><span class=cF0>,</span><span class=cF6>"Reward"</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->task_title,</span><span class=cF6>"Reward"</span><span class=cF0>);
|
|
<a name="l7"></a> res->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>"$WW+H,1$$RED$%s"</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>"DocEd(0x%X);"</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<<</span><span class=cF3>JOBf_EXIT_ON_COMPLETE</span><span class=cF0>|1<<</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->border_src =</span><span class=cF3>BDS_CONST</span><span class=cF0>;
|
|
<a name="l18"></a> res->border_attr=</span><span class=cF3>LTGRAY</span><span class=cF0><<4+</span><span class=cF5>DrvTextAttrGet</span><span class=cF0>(</span><span class=cF6>':'</span><span class=cF0>)&15;
|
|
<a name="l19"></a> res->text_attr =</span><span class=cF3>LTGRAY</span><span class=cF0><<4+</span><span class=cF3>BLUE</span><span class=cF0>;
|
|
<a name="l20"></a> res->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>->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>->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>(&</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->task_title,name);
|
|
<a name="l32"></a> task->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>";"</span><span class=cF0>,1<<</span><span class=cF3>JOBf_WAKE_MASTER</span><span class=cF0>|1<<</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->win_left,task->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->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<<</span><span class=cF3>JOBf_EXIT_ON_COMPLETE</span><span class=cF0>|1<<</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)->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->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&(</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> && doc_ce->type_u8==</span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0> && doc_ce->left_exp>=0) </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l55"></a> tmpde=doc_ce->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->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><=ch<=</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->tag</span><span class=cF7>)</span><span class=cF0>>1)
|
|
<a name="l63"></a> doc_ce->tag[0]=ch;
|
|
<a name="l64"></a> doc2=</span><span class=cF5>DocRead</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l65"></a> </span><span class=cF5>DocGoToLine</span><span class=cF0>(doc2,1);
|
|
<a name="l66"></a> doc_e=doc2->cur_entry;
|
|
<a name="l67"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e!=doc2 && doc_e->type_u8==</span><span class=cF3>DOCT_TEXT</span><span class=cF0> && </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>doc_e->tag</span><span class=cF7>)</span><span class=cF0>>=3) </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l68"></a> doc_e->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->full_name,</span><span class=cF6>"Reward1"</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->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>"\n$TR,\"Reward1\"$\n"</span><span class=cF0>
|
|
<a name="l79"></a> </span><span class=cF6>"$ID,2$CallExtStr(\"JukeReward\",\"\"\n"</span><span class=cF0>
|
|
<a name="l80"></a> </span><span class=cF6>"$TR,\"Reward2\"$\n"</span><span class=cF0>
|
|
<a name="l81"></a> </span><span class=cF6>"$ID,2$\n"</span><span class=cF0>
|
|
<a name="l82"></a> </span><span class=cF6>"$ID,-2$\n"</span><span class=cF0>
|
|
<a name="l83"></a> </span><span class=cF6>");\n$ID,-2$\n"</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->full_name,</span><span class=cF6>"Reward1/Reward2"</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<5;i++) {
|
|
<a name="l90"></a> st=</span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%s %s %s %s "</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->full_name,</span><span class=cF6>"Reward1/Reward2"</span><span class=cF0>,
|
|
<a name="l93"></a> </span><span class=cF6>"\"%s\"\n"</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>" "</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->user_data++; </span><span class=cF2>//JB_RUN_LEVEL++</span><span class=cF0>
|
|
<a name="l101"></a></span><span class=cF2>//<SPACE> is followed by <ESC> --> JB_RUN_LEVEL_TWO</span><span class=cF0>
|
|
<a name="l102"></a> </span><span class=cF2>//Actual <ESC> just exits --> 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>"~/Psalmody"</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>"%s/*.HC.Z"</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->user_put_key=&JBPutKey;
|
|
<a name="l126"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,
|
|
<a name="l127"></a> </span><span class=cF6>"Key: $GREEN$Graphics $BLUE$Words $RED$No Nothing "</span><span class=cF0>
|
|
<a name="l128"></a> </span><span class=cF6>"$BLACK$Incomplete $CYAN$Special$FG$\n\n"</span><span class=cF0>
|
|
<a name="l129"></a> </span><span class=cF6>"$GREEN$<DEL>$FG$\tto delete a song.\n"</span><span class=cF0>
|
|
<a name="l130"></a> </span><span class=cF6>"'$GREEN$0$FG$'-'$GREEN$9$FG$'\tto rate a song.\n"</span><span class=cF0>
|
|
<a name="l131"></a> </span><span class=cF6>"'$GREEN$r$FG$'\tto get your reward from God.\n"</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>"\n"</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>"Play("</span><span class=cF0>,tmpde->full_name,</span><span class=cF6>""</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->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->full_name);
|
|
<a name="l139"></a> doc_e=s->head.next;
|
|
<a name="l140"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e!=s && doc_e->type_u8!=</span><span class=cF3>DOCT_TEXT</span><span class=cF0>)
|
|
<a name="l141"></a> doc_e=doc_e->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 && doc_e->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><=doc_e->tag[2]<=</span><span class=cF6>'9'</span><span class=cF0>)
|
|
<a name="l145"></a> rating=doc_e->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>"incomplete"</span><span class=cF0>,doc_e->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>"$BLACK$"</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>"has graphics"</span><span class=cF0>,doc_e->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>"$GREEN$"</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>"has words"</span><span class=cF0>,doc_e->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>"$BLUE$"</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>"special"</span><span class=cF0>,doc_e->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>"$CYAN$"</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>"no nothing"</span><span class=cF0>,doc_e->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>"$RED$"</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>"\\0"</span><span class=cF0>,tmpde->full_name,</span><span class=cF6>""</span><span class=cF7>)</span><span class=cF0>) {
|
|
<a name="l157"></a> s->cur_entry=doc_e->next;
|
|
<a name="l158"></a> s->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>"//0 has words\n"</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>"$MU-UL,\"%c%-8ts\",LE=%d$ "</span><span class=cF0>,rating,st,tmpde);
|
|
<a name="l165"></a> tmpde->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->next;
|
|
<a name="l171"></a> }
|
|
<a name="l172"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>"\n$CYAN$$MU-UL,\"DONE\",LE=%d$\n"</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<=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->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->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->user_data==JB_RUN_LEVEL_ONE) </span><span class=cF1>break</span><span class=cF0>; </span><span class=cF2>//<ESC></span><span class=cF0>
|
|
<a name="l187"></a> tmpde->user_data=JB_RUN_LEVEL_NULL; </span><span class=cF2>//Rst from <SPACE></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>"ExeFile(\"%s\");"</span><span class=cF0>,tmpde->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>
|