mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-29 16:56:30 +00:00
2ea6956433
Restructure network stack to use new Interrupt methods instead of hard-coded IRQ numbers. Add line count update into build process. Add progress bars to HTML generation and DoDistro. Clear Network Log border_doc. Fix font chars. Clean up some lingering unconverted variable and directory names. Remove word-wrap DolDoc tag from Clementine bible because of CPU spikes.
226 lines
18 KiB
HTML
Executable file
226 lines
18 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.07">
|
|
<style type="text/css">
|
|
body {background-color:#000000;}
|
|
.cF0{color:#ffffff;background-color:#000000;}
|
|
.cF1{color:#3465a4;background-color:#000000;}
|
|
.cF2{color:#4e9a06;background-color:#000000;}
|
|
.cF3{color:#06989a;background-color:#000000;}
|
|
.cF4{color:#a24444;background-color:#000000;}
|
|
.cF5{color:#75507b;background-color:#000000;}
|
|
.cF6{color:#ce982f;background-color:#000000;}
|
|
.cF7{color:#bcc0b9;background-color:#000000;}
|
|
.cF8{color:#555753;background-color:#000000;}
|
|
.cF9{color:#729fcf;background-color:#000000;}
|
|
.cFA{color:#82bc49;background-color:#000000;}
|
|
.cFB{color:#34e2e2;background-color:#000000;}
|
|
.cFC{color:#ac3535;background-color:#000000;}
|
|
.cFD{color:#ad7fa8;background-color:#000000;}
|
|
.cFE{color:#fce94f;background-color:#000000;}
|
|
.cFF{color:#000000;background-color:#000000;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF0>#</span><span class=cF1>define</span><span class=cF0> M_DASH_THRESHOLD </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>140</span><span class=cF0>
|
|
<a name="l2"></a>#</span><span class=cF1>define</span><span class=cF0> M_SPACE_THRESHOLD </span><span class=cFE>0</span><span class=cF0>.</span><span class=cFE>300</span><span class=cF0>
|
|
<a name="l3"></a>
|
|
<a name="l4"></a></span><span class=cF1>U8</span><span class=cF0> *morse_list =
|
|
<a name="l5"></a></span><span class=cF6>"A.-\0"</span><span class=cF0>
|
|
<a name="l6"></a></span><span class=cF6>"B-...\0"</span><span class=cF0>
|
|
<a name="l7"></a></span><span class=cF6>"C-.-.\0"</span><span class=cF0>
|
|
<a name="l8"></a></span><span class=cF6>"D-..\0"</span><span class=cF0>
|
|
<a name="l9"></a></span><span class=cF6>"E.\0"</span><span class=cF0>
|
|
<a name="l10"></a></span><span class=cF6>"F..-.\0"</span><span class=cF0>
|
|
<a name="l11"></a></span><span class=cF6>"G--.\0"</span><span class=cF0>
|
|
<a name="l12"></a></span><span class=cF6>"H....\0"</span><span class=cF0>
|
|
<a name="l13"></a></span><span class=cF6>"I..\0"</span><span class=cF0>
|
|
<a name="l14"></a></span><span class=cF6>"J.---\0"</span><span class=cF0>
|
|
<a name="l15"></a></span><span class=cF6>"K-.-\0"</span><span class=cF0>
|
|
<a name="l16"></a></span><span class=cF6>"L.-..\0"</span><span class=cF0>
|
|
<a name="l17"></a></span><span class=cF6>"M--\0"</span><span class=cF0>
|
|
<a name="l18"></a></span><span class=cF6>"N-.\0"</span><span class=cF0>
|
|
<a name="l19"></a></span><span class=cF6>"O---\0"</span><span class=cF0>
|
|
<a name="l20"></a></span><span class=cF6>"P.--.\0"</span><span class=cF0>
|
|
<a name="l21"></a></span><span class=cF6>"Q--.-\0"</span><span class=cF0>
|
|
<a name="l22"></a></span><span class=cF6>"R.-.\0"</span><span class=cF0>
|
|
<a name="l23"></a></span><span class=cF6>"S...\0"</span><span class=cF0>
|
|
<a name="l24"></a></span><span class=cF6>"T-\0"</span><span class=cF0>
|
|
<a name="l25"></a></span><span class=cF6>"U..-\0"</span><span class=cF0>
|
|
<a name="l26"></a></span><span class=cF6>"V...-\0"</span><span class=cF0>
|
|
<a name="l27"></a></span><span class=cF6>"W.--\0"</span><span class=cF0>
|
|
<a name="l28"></a></span><span class=cF6>"X-..-\0"</span><span class=cF0>
|
|
<a name="l29"></a></span><span class=cF6>"Y-.--\0"</span><span class=cF0>
|
|
<a name="l30"></a></span><span class=cF6>"Z--..\0"</span><span class=cF0>
|
|
<a name="l31"></a>
|
|
<a name="l32"></a></span><span class=cF6>"1.----\0"</span><span class=cF0>
|
|
<a name="l33"></a></span><span class=cF6>"2..---\0"</span><span class=cF0>
|
|
<a name="l34"></a></span><span class=cF6>"3...--\0"</span><span class=cF0>
|
|
<a name="l35"></a></span><span class=cF6>"4....-\0"</span><span class=cF0>
|
|
<a name="l36"></a></span><span class=cF6>"5.....\0"</span><span class=cF0>
|
|
<a name="l37"></a></span><span class=cF6>"6-....\0"</span><span class=cF0>
|
|
<a name="l38"></a></span><span class=cF6>"7--...\0"</span><span class=cF0>
|
|
<a name="l39"></a></span><span class=cF6>"8---..\0"</span><span class=cF0>
|
|
<a name="l40"></a></span><span class=cF6>"9----.\0"</span><span class=cF0>
|
|
<a name="l41"></a></span><span class=cF6>"0-----\0"</span><span class=cF0>
|
|
<a name="l42"></a>
|
|
<a name="l43"></a></span><span class=cF6>"/-..-.\0"</span><span class=cF0>
|
|
<a name="l44"></a></span><span class=cF6>"+.-.-.\0"</span><span class=cF0>
|
|
<a name="l45"></a></span><span class=cF6>"..-.-.-\0"</span><span class=cF0>
|
|
<a name="l46"></a></span><span class=cF6>",--..--\0"</span><span class=cF0>
|
|
<a name="l47"></a></span><span class=cF6>"?..--..\0"</span><span class=cF0>
|
|
<a name="l48"></a></span><span class=cF6>"(-.--.\0"</span><span class=cF0>
|
|
<a name="l49"></a></span><span class=cF6>")-.--.-\0"</span><span class=cF0>
|
|
<a name="l50"></a></span><span class=cF6>"--....-\0"</span><span class=cF0>
|
|
<a name="l51"></a></span><span class=cF6>"\".-..-.\0"</span><span class=cF0>
|
|
<a name="l52"></a></span><span class=cF6>"_..--.-\0"</span><span class=cF0>
|
|
<a name="l53"></a></span><span class=cF6>"'.----.\0"</span><span class=cF0>
|
|
<a name="l54"></a></span><span class=cF6>":---...\0"</span><span class=cF0>
|
|
<a name="l55"></a></span><span class=cF6>";-.-.-.\0"</span><span class=cF0>
|
|
<a name="l56"></a></span><span class=cF6>"=-...-\0"</span><span class=cF0>;
|
|
<a name="l57"></a>
|
|
<a name="l58"></a></span><span class=cF1>U0</span><span class=cF0> MorseTable()
|
|
<a name="l59"></a>{
|
|
<a name="l60"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l61"></a> </span><span class=cF9>I64</span><span class=cF0> i = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l62"></a>
|
|
<a name="l63"></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>13</span><span class=cF0>; i++ )
|
|
<a name="l64"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l65"></a> </span><span class=cF1>if</span><span class=cF0> (st = </span><span class=cF5>ListSub</span><span class=cF7>(</span><span class=cF0>i ,morse_list</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l66"></a> </span><span class=cF6>"$RED$%C$FG$ %-7s "</span><span class=cF0>, *st, st + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l67"></a> </span><span class=cF1>if</span><span class=cF0> (st = </span><span class=cF5>ListSub</span><span class=cF7>(</span><span class=cF0>i + </span><span class=cFE>13</span><span class=cF0>, morse_list</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l68"></a> </span><span class=cF6>"$RED$%C$FG$ %-7s "</span><span class=cF0>, *st, st + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l69"></a> </span><span class=cF1>if</span><span class=cF0> (st = </span><span class=cF5>ListSub</span><span class=cF7>(</span><span class=cF0>i + </span><span class=cFE>26</span><span class=cF0>, morse_list</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l70"></a> </span><span class=cF6>"$RED$%C$FG$ %-7s "</span><span class=cF0>, *st, st + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l71"></a> </span><span class=cF1>if</span><span class=cF0> (st = </span><span class=cF5>ListSub</span><span class=cF7>(</span><span class=cF0>i + </span><span class=cFE>39</span><span class=cF0>, morse_list</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l72"></a> </span><span class=cF6>"$RED$%C$FG$ %-7s "</span><span class=cF0>, *st, st + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l73"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l74"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l75"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l76"></a>}
|
|
<a name="l77"></a>
|
|
<a name="l78"></a></span><span class=cF1>F64</span><span class=cF0> m_start, m_end, dt_down, dt_up;
|
|
<a name="l79"></a></span><span class=cF1>Bool</span><span class=cF0> space_sent;
|
|
<a name="l80"></a>
|
|
<a name="l81"></a></span><span class=cF1>U8</span><span class=cF0> *MorseTimes(</span><span class=cF9>CDoc</span><span class=cF0> *, </span><span class=cF9>CDocEntry</span><span class=cF0> *, </span><span class=cF9>CTask</span><span class=cF0> *mem_task)
|
|
<a name="l82"></a>{
|
|
<a name="l83"></a> </span><span class=cF1>U8</span><span class=cF0> *st = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cFE>64</span><span class=cF0>, mem_task);
|
|
<a name="l84"></a>
|
|
<a name="l85"></a> </span><span class=cF5>StrPrint</span><span class=cF0>(st, </span><span class=cF6>"Down:%10.6f Up:%10.6f"</span><span class=cF0>, dt_down, dt_up);
|
|
<a name="l86"></a>
|
|
<a name="l87"></a> </span><span class=cF1>return</span><span class=cF0> st;
|
|
<a name="l88"></a>}
|
|
<a name="l89"></a>
|
|
<a name="l90"></a></span><span class=cF9>I64</span><span class=cF0> MorseWaitKey()
|
|
<a name="l91"></a>{
|
|
<a name="l92"></a> </span><span class=cF9>I64</span><span class=cF0> ch;
|
|
<a name="l93"></a> </span><span class=cF1>F64</span><span class=cF0> dt;
|
|
<a name="l94"></a>
|
|
<a name="l95"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l96"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l97"></a> </span><span class=cF1>if</span><span class=cF0> (m_start)
|
|
<a name="l98"></a> {
|
|
<a name="l99"></a> </span><span class=cF5>MessageGet</span><span class=cF0>(</span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_KEY_UP</span><span class=cF0>);
|
|
<a name="l100"></a> m_end = </span><span class=cF5>tS</span><span class=cF0>;
|
|
<a name="l101"></a> </span><span class=cF5>Sound</span><span class=cF0>;
|
|
<a name="l102"></a> dt_down = m_end - m_start;
|
|
<a name="l103"></a> m_start = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l104"></a> space_sent = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l105"></a> </span><span class=cF1>if</span><span class=cF0> (dt_down < M_DASH_THRESHOLD)
|
|
<a name="l106"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF6>'.'</span><span class=cF0>;
|
|
<a name="l107"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l108"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF6>'-'</span><span class=cF0>;
|
|
<a name="l109"></a> }
|
|
<a name="l110"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l111"></a> {
|
|
<a name="l112"></a> </span><span class=cF1>if</span><span class=cF0> (!space_sent)
|
|
<a name="l113"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l114"></a> </span><span class=cF1>while</span><span class=cF0> (!</span><span class=cF5>MessageScan</span><span class=cF7>(</span><span class=cF0>&ch, </span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l115"></a> {
|
|
<a name="l116"></a> dt = </span><span class=cF5>tS</span><span class=cF0> - m_end;
|
|
<a name="l117"></a> </span><span class=cF1>if</span><span class=cF0> (dt >= M_SPACE_THRESHOLD)
|
|
<a name="l118"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l119"></a> space_sent = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l120"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>;
|
|
<a name="l121"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l122"></a> </span><span class=cF5>Yield</span><span class=cF0>;
|
|
<a name="l123"></a> }
|
|
<a name="l124"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l125"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l126"></a> ch = </span><span class=cF5>CharGet</span><span class=cF0>(, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l127"></a> m_start = </span><span class=cF5>tS</span><span class=cF0>;
|
|
<a name="l128"></a> </span><span class=cF5>Sound</span><span class=cF0>(</span><span class=cFE>74</span><span class=cF0>);
|
|
<a name="l129"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0> || ch == </span><span class=cF3>CH_ESC</span><span class=cF0>)
|
|
<a name="l130"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l131"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l132"></a> </span><span class=cF5>Sound</span><span class=cF0>;
|
|
<a name="l133"></a> </span><span class=cF5>throw</span><span class=cF0>; </span><span class=cF2>//exit program</span><span class=cF0>
|
|
<a name="l134"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l135"></a> dt_up = m_start - m_end;
|
|
<a name="l136"></a> </span><span class=cF1>if</span><span class=cF0> (!space_sent && dt_up >= M_SPACE_THRESHOLD)
|
|
<a name="l137"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l138"></a> space_sent = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l139"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>;
|
|
<a name="l140"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l141"></a> }
|
|
<a name="l142"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l143"></a>}
|
|
<a name="l144"></a>
|
|
<a name="l145"></a></span><span class=cF1>U0</span><span class=cF0> Morse()
|
|
<a name="l146"></a>{
|
|
<a name="l147"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e;
|
|
<a name="l148"></a> </span><span class=cF9>I64</span><span class=cF0> ch;
|
|
<a name="l149"></a> </span><span class=cF1>U8</span><span class=cF0> buf[</span><span class=cFE>8</span><span class=cF0>], *dst, *src;
|
|
<a name="l150"></a>
|
|
<a name="l151"></a> MorseTable;
|
|
<a name="l152"></a> m_start = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l153"></a> m_end = </span><span class=cF5>tS</span><span class=cF0>;
|
|
<a name="l154"></a> dt_down = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l155"></a> dt_up = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l156"></a> space_sent = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l157"></a>
|
|
<a name="l158"></a> </span><span class=cF6>"$GREEN$"</span><span class=cF0>;
|
|
<a name="l159"></a>
|
|
<a name="l160"></a> doc_e = </span><span class=cF5>DocPrint</span><span class=cF0>(</span><span class=cF5>DocPut</span><span class=cF0>, </span><span class=cF6>"$TX+TC,\" \"$"</span><span class=cF0>);
|
|
<a name="l161"></a> doc_e->tag_cb = &MorseTimes;
|
|
<a name="l162"></a>
|
|
<a name="l163"></a> </span><span class=cF6>"$FG$\n"</span><span class=cF0>;
|
|
<a name="l164"></a>
|
|
<a name="l165"></a> dst = buf;
|
|
<a name="l166"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF3>TRUE</span><span class=cF0>)
|
|
<a name="l167"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l168"></a> ch = MorseWaitKey;
|
|
<a name="l169"></a> </span><span class=cF1>if</span><span class=cF0> (ch == </span><span class=cF3>CH_SPACE</span><span class=cF0>)
|
|
<a name="l170"></a> {
|
|
<a name="l171"></a> *dst = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l172"></a> src = morse_list;
|
|
<a name="l173"></a> </span><span class=cF1>while</span><span class=cF0> (*src) </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l174"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>src + </span><span class=cFE>1</span><span class=cF0>, buf</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l175"></a> {
|
|
<a name="l176"></a> </span><span class=cF6>"$GREEN$%C$FG$"</span><span class=cF0>, *src;
|
|
<a name="l177"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l178"></a> }
|
|
<a name="l179"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l180"></a> src += </span><span class=cF5>StrLen</span><span class=cF0>(src) + </span><span class=cFE>1</span><span class=cF0>;
|
|
<a name="l181"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l182"></a> </span><span class=cF6>''</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>;
|
|
<a name="l183"></a> dst = buf;
|
|
<a name="l184"></a> }
|
|
<a name="l185"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l186"></a> {
|
|
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (dst - buf < </span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF0>buf</span><span class=cF7>)</span><span class=cF0> - </span><span class=cFE>1</span><span class=cF0>)
|
|
<a name="l188"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l189"></a> </span><span class=cF6>''</span><span class=cF0> ch;
|
|
<a name="l190"></a> *dst++ = ch;
|
|
<a name="l191"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l192"></a> }
|
|
<a name="l193"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l194"></a> </span><span class=cF5>Sound</span><span class=cF0>;
|
|
<a name="l195"></a>}
|
|
<a name="l196"></a>
|
|
<a name="l197"></a>Morse;
|
|
</span></pre></body>
|
|
</html>
|