mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 16:26:35 +00:00
1b75d91002
Add arg to SATARep to specify drive types to show. Add checks in AHCIPortInit to verify port signatures, add helper method to get signatures from port.
134 lines
13 KiB
HTML
Executable file
134 lines
13 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V0.13">
|
|
<style type="text/css">
|
|
body {background-color:#fef1f0;}
|
|
.cF0{color:#000000;background-color:#fef1f0;}
|
|
.cF1{color:#0148a4;background-color:#fef1f0;}
|
|
.cF2{color:#3b7901;background-color:#fef1f0;}
|
|
.cF3{color:#057c7e;background-color:#fef1f0;}
|
|
.cF4{color:#bb2020;background-color:#fef1f0;}
|
|
.cF5{color:#9e42ae;background-color:#fef1f0;}
|
|
.cF6{color:#b57901;background-color:#fef1f0;}
|
|
.cF7{color:#b2b6af;background-color:#fef1f0;}
|
|
.cF8{color:#555753;background-color:#fef1f0;}
|
|
.cF9{color:#678fbb;background-color:#fef1f0;}
|
|
.cFA{color:#82bc49;background-color:#fef1f0;}
|
|
.cFB{color:#0097a2;background-color:#fef1f0;}
|
|
.cFC{color:#e26a6a;background-color:#fef1f0;}
|
|
.cFD{color:#c671bc;background-color:#fef1f0;}
|
|
.cFE{color:#c7ab00;background-color:#fef1f0;}
|
|
.cFF{color:#fef1f0;background-color:#fef1f0;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF1>U0</span><span class=cF0> SongPuppet(</span><span class=cF9>CTask</span><span class=cF0> *task, </span><span class=cF9>I64</span><span class=cF0> passes)
|
|
<a name="l2"></a>{
|
|
<a name="l3"></a> </span><span class=cF9>CDebugInfo</span><span class=cF0> *debug_info;
|
|
<a name="l4"></a> </span><span class=cF9>I64</span><span class=cF0> i, </span><span class=cF1>start</span><span class=cF0>, </span><span class=cF1>end</span><span class=cF0>, rip, last_rip;
|
|
<a name="l5"></a> </span><span class=cF9>CHashFun</span><span class=cF0> *tmpf=</span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l6"></a>
|
|
<a name="l7"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cFE>250</span><span class=cF0> && </span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0>; i++)
|
|
<a name="l8"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l9"></a> </span><span class=cF1>if</span><span class=cF0> (tmpf = </span><span class=cF5>HashFind</span><span class=cF7>(</span><span class=cF6>"Song"</span><span class=cF0>, task->hash_table, </span><span class=cF3>HTT_FUN</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l10"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l11"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l12"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l13"></a> </span><span class=cF1>if</span><span class=cF0> (tmpf && </span><span class=cF7>(</span><span class=cF0>debug_info = tmpf->debug_info</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l14"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l15"></a> </span><span class=cF1>start</span><span class=cF0> = debug_info->body[</span><span class=cFE>0</span><span class=cF0>];
|
|
<a name="l16"></a> </span><span class=cF1>end</span><span class=cF0> = debug_info->body[debug_info->max_line + </span><span class=cFE>1</span><span class=cF0> - debug_info->min_line];
|
|
<a name="l17"></a> last_rip = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l18"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l19"></a> {
|
|
<a name="l20"></a> i = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l21"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF5>TaskValidate</span><span class=cF7>(</span><span class=cF0>task</span><span class=cF7>)</span><span class=cF0> && </span><span class=cF7>(</span><span class=cF0>rip = </span><span class=cF5>TaskCaller</span><span class=cF0>(task, i++)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l22"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l23"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF1>start</span><span class=cF0> <= rip < </span><span class=cF1>end</span><span class=cF0>) {
|
|
<a name="l24"></a> </span><span class=cF1>if</span><span class=cF0> (rip < last_rip && --passes <= </span><span class=cFE>0</span><span class=cF0>)
|
|
<a name="l25"></a> </span><span class=cF1>return</span><span class=cF0>;
|
|
<a name="l26"></a> last_rip = rip;
|
|
<a name="l27"></a> }
|
|
<a name="l28"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l29"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1</span><span class=cF0>);
|
|
<a name="l30"></a> }
|
|
<a name="l31"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l32"></a>}
|
|
<a name="l33"></a>
|
|
<a name="l34"></a></span><span class=cF1>U0</span><span class=cF0> JukeSongPuppet(</span><span class=cF9>CTask</span><span class=cF0> *juke_task, </span><span class=cF9>I64</span><span class=cF0> passes, </span><span class=cF9>I64</span><span class=cF0> song_num, </span><span class=cF1>U8</span><span class=cF0> *name)
|
|
<a name="l35"></a>{
|
|
<a name="l36"></a> </span><span class=cF1>Bool</span><span class=cF0> found;
|
|
<a name="l37"></a> </span><span class=cF9>CTask</span><span class=cF0> *task;
|
|
<a name="l38"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l39"></a>
|
|
<a name="l40"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>FileExtDot</span><span class=cF7>(</span><span class=cF0>name</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l41"></a> </span><span class=cF5>FileExtRemove</span><span class=cF0>(name);
|
|
<a name="l42"></a> </span><span class=cF5>BirthWait</span><span class=cF0>(&juke_task->popup_task);
|
|
<a name="l43"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(juke_task->popup_task);
|
|
<a name="l44"></a> </span><span class=cF5>MessagePost</span><span class=cF0>(juke_task->popup_task, </span><span class=cF3>MESSAGE_KEY_DOWN_UP</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_UP</span><span class=cF0> + </span><span class=cF3>SCF_CTRL</span><span class=cF0>);
|
|
<a name="l45"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(juke_task->popup_task);
|
|
<a name="l46"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < song_num; i++)
|
|
<a name="l47"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l48"></a> </span><span class=cF5>MessagePost</span><span class=cF0>(juke_task->popup_task, </span><span class=cF3>MESSAGE_KEY_DOWN_UP</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_RIGHT</span><span class=cF0>);
|
|
<a name="l49"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(juke_task->popup_task);
|
|
<a name="l50"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l51"></a>
|
|
<a name="l52"></a> </span><span class=cF5>MessagePost</span><span class=cF0>(juke_task->popup_task, </span><span class=cF3>MESSAGE_KEY_DOWN_UP</span><span class=cF0>, </span><span class=cF3>CH_SPACE</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l53"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(juke_task->popup_task);
|
|
<a name="l54"></a> </span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>500</span><span class=cF0>);
|
|
<a name="l55"></a>
|
|
<a name="l56"></a> found = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l57"></a> task = </span><span class=cF5>Fs</span><span class=cF0>->next_task;
|
|
<a name="l58"></a> </span><span class=cF1>while</span><span class=cF0> (task != </span><span class=cF5>Fs</span><span class=cF0>) </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l59"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>task->task_title, name</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l60"></a> {
|
|
<a name="l61"></a> found = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l62"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l63"></a> }
|
|
<a name="l64"></a> task = task->next_task;
|
|
<a name="l65"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l66"></a>
|
|
<a name="l67"></a> </span><span class=cF1>if</span><span class=cF0> (found)
|
|
<a name="l68"></a> </span><span class=cF7>{</span><span class=cF2>//Position cursor on song title during song</span><span class=cF0>
|
|
<a name="l69"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(juke_task->popup_task);
|
|
<a name="l70"></a> </span><span class=cF5>MessagePost</span><span class=cF0>(juke_task->popup_task, </span><span class=cF3>MESSAGE_KEY_DOWN_UP</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_UP</span><span class=cF0> + </span><span class=cF3>SCF_CTRL</span><span class=cF0>);
|
|
<a name="l71"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(juke_task->popup_task);
|
|
<a name="l72"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < song_num; i++)
|
|
<a name="l73"></a> {
|
|
<a name="l74"></a> </span><span class=cF5>MessagePost</span><span class=cF0>(juke_task->popup_task, </span><span class=cF3>MESSAGE_KEY_DOWN_UP</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_RIGHT</span><span class=cF0>);
|
|
<a name="l75"></a> </span><span class=cF5>TaskWait</span><span class=cF0>(juke_task->popup_task);
|
|
<a name="l76"></a> }
|
|
<a name="l77"></a> SongPuppet(task, passes);
|
|
<a name="l78"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l79"></a> </span><span class=cF5>Kill</span><span class=cF0>(task);
|
|
<a name="l80"></a>}
|
|
<a name="l81"></a>
|
|
<a name="l82"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> JukeSongsPuppet(</span><span class=cF1>U8</span><span class=cF0> *dirname=</span><span class=cF6>"~/Psalmody"</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> passes=</span><span class=cFE>2</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> start_song=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF9>I64</span><span class=cF0> end_song=</span><span class=cF3>I64_MAX</span><span class=cF0>)
|
|
<a name="l83"></a>{</span><span class=cF2>//Help make music video by puppeting JukeBox task.</span><span class=cF0>
|
|
<a name="l84"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l85"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde, *tmpde1;
|
|
<a name="l86"></a> </span><span class=cF9>CTask</span><span class=cF0> *juke_task = </span><span class=cF5>User</span><span class=cF0>(</span><span class=cF6>"JukeBox(0x%X);\n"</span><span class=cF0>, dirname);
|
|
<a name="l87"></a> </span><span class=cF1>F64</span><span class=cF0> t0;
|
|
<a name="l88"></a>
|
|
<a name="l89"></a> </span><span class=cF5>Cd</span><span class=cF0>(dirname);
|
|
<a name="l90"></a> tmpde1 = </span><span class=cF5>FilesFind</span><span class=cF0>(</span><span class=cF6>"*"</span><span class=cF0>, </span><span class=cF3>FUF_RECURSE</span><span class=cF0> | </span><span class=cF3>FUF_JUST_TXT</span><span class=cF0> | </span><span class=cF3>FUF_JUST_FILES</span><span class=cF0>);
|
|
<a name="l91"></a> </span><span class=cF1>for</span><span class=cF0> (tmpde = tmpde1, i = </span><span class=cFE>0</span><span class=cF0>; tmpde && i < start_song; i++)
|
|
<a name="l92"></a> tmpde = tmpde->next;
|
|
<a name="l93"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>screencast</span><span class=cF0>.record)
|
|
<a name="l94"></a> t0 = </span><span class=cFB>screencast</span><span class=cF0>.t0_tS;
|
|
<a name="l95"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l96"></a> t0 = </span><span class=cF5>tS</span><span class=cF0>;
|
|
<a name="l97"></a> </span><span class=cF1>for</span><span class=cF0> (i = start_song; tmpde && i < end_song; i++)
|
|
<a name="l98"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l99"></a> </span><span class=cF6>"%12.6fs %s\n"</span><span class=cF0>, </span><span class=cF5>tS</span><span class=cF0> - t0, tmpde->full_name;
|
|
<a name="l100"></a> JukeSongPuppet(juke_task, passes, i, tmpde->name);
|
|
<a name="l101"></a> tmpde = tmpde->next;
|
|
<a name="l102"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l103"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(tmpde1);
|
|
<a name="l104"></a> </span><span class=cF5>Kill</span><span class=cF0>(juke_task);
|
|
<a name="l105"></a>}
|
|
</span></pre></body>
|
|
</html>
|