mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-30 17:26:31 +00:00
dbf8647d59
Added top & right borders to RawDr. Improved spacing in some debug and compiler reporting. Fixed RawPutChar and EdLite tab width. Fixed Ui missing '0x' prefix syntax highlighter bug. Added 32BitPaint demo.
960 lines
98 KiB
HTML
Executable file
960 lines
98 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.08">
|
|
<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>help_index</span><span class=cF0> </span><span class=cF6>"DolDoc/Output;StdOut/DolDoc"</span><span class=cF0>
|
|
<a name="l2"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>DirFileDoc</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde)
|
|
<a name="l3"></a>{
|
|
<a name="l4"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde)
|
|
<a name="l5"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l6"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde->attr & </span><span class=cF3>RS_ATTR_DIR</span><span class=cF0>)
|
|
<a name="l7"></a> {
|
|
<a name="l8"></a> tmpde->user_data = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$TR,\"%s\",U=0x%X$"</span><span class=cF0>, tmpde->name, tmpde);
|
|
<a name="l9"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"\n$ID,+2$"</span><span class=cF0>);
|
|
<a name="l10"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde->sub)
|
|
<a name="l11"></a> </span><span class=cF5>DirFileDoc</span><span class=cF0>(doc, tmpde->sub);
|
|
<a name="l12"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$ID,-2$"</span><span class=cF0>);
|
|
<a name="l13"></a> }
|
|
<a name="l14"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l15"></a> {
|
|
<a name="l16"></a> tmpde->user_data = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$MU,\"%s\",U=0x%X$"</span><span class=cF0>, tmpde->name, tmpde);
|
|
<a name="l17"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"\n"</span><span class=cF0>);
|
|
<a name="l18"></a> }
|
|
<a name="l19"></a> tmpde = tmpde->next;
|
|
<a name="l20"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l21"></a>}
|
|
<a name="l22"></a>
|
|
<a name="l23"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"File/Cmd Line (Typically);Cmd Line (Typically)"</span><span class=cF0>
|
|
<a name="l24"></a>
|
|
<a name="l25"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FM_NORMAL</span><span class=cF0> </span><span class=cFE>0</span><span class=cF0>
|
|
<a name="l26"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FM_PICK_FILE</span><span class=cF0> </span><span class=cFE>1</span><span class=cF0>
|
|
<a name="l27"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FM_PICK_DIR</span><span class=cF0> </span><span class=cFE>2</span><span class=cF0>
|
|
<a name="l28"></a>
|
|
<a name="l29"></a></span><span class=cF1>class</span><span class=cF0> </span><span class=cF9>CFMUncollapsedList</span><span class=cF0>
|
|
<a name="l30"></a>{
|
|
<a name="l31"></a> </span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *next;
|
|
<a name="l32"></a> </span><span class=cF1>U8</span><span class=cF0> *name;
|
|
<a name="l33"></a>};
|
|
<a name="l34"></a>
|
|
<a name="l35"></a></span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *</span><span class=cF5>FMCollectUncollapsedList</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l36"></a>{
|
|
<a name="l37"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e = doc->head.next;
|
|
<a name="l38"></a> </span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *res = </span><span class=cF3>NULL</span><span class=cF0>, *tmpc;
|
|
<a name="l39"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l40"></a>
|
|
<a name="l41"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e != doc)
|
|
<a name="l42"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l43"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l44"></a> {
|
|
<a name="l45"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF7>(</span><span class=cF0>doc_e->de_flags & </span><span class=cF3>DOCEF_CHECKED_COLLAPSED</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l46"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l47"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde = doc_e->user_data)
|
|
<a name="l48"></a> {
|
|
<a name="l49"></a> tmpc = </span><span class=cF5>MAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CFMUncollapsedList</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l50"></a> tmpc->next = res;
|
|
<a name="l51"></a> res = tmpc;
|
|
<a name="l52"></a> tmpc->name = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l53"></a> }
|
|
<a name="l54"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l55"></a> }
|
|
<a name="l56"></a> doc_e = doc_e->next;
|
|
<a name="l57"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l58"></a>
|
|
<a name="l59"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l60"></a>}
|
|
<a name="l61"></a>
|
|
<a name="l62"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMMarkUncollapsed</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *tmpc, </span><span class=cF1>U8</span><span class=cF0> *cur_entry, </span><span class=cF1>U8</span><span class=cF0> *next_entry)
|
|
<a name="l63"></a>{
|
|
<a name="l64"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e = doc->head.next;
|
|
<a name="l65"></a> </span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *tmpc1;
|
|
<a name="l66"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l67"></a>
|
|
<a name="l68"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e != doc)
|
|
<a name="l69"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l70"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l71"></a> {
|
|
<a name="l72"></a> tmpde = doc_e->user_data;
|
|
<a name="l73"></a> tmpc1 = tmpc;
|
|
<a name="l74"></a> </span><span class=cF1>while</span><span class=cF0> (tmpc1)
|
|
<a name="l75"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l76"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>tmpc1->name, tmpde->full_name</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l77"></a> {
|
|
<a name="l78"></a> doc_e->de_flags &= ~</span><span class=cF3>DOCEF_CHECKED_COLLAPSED</span><span class=cF0>;
|
|
<a name="l79"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l80"></a> }
|
|
<a name="l81"></a> tmpc1 = tmpc1->next;
|
|
<a name="l82"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (cur_entry)
|
|
<a name="l84"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l85"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrNCompare</span><span class=cF7>(</span><span class=cF0>cur_entry, tmpde->full_name, </span><span class=cF5>StrLen</span><span class=cF0>(tmpde->full_name)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l86"></a> {
|
|
<a name="l87"></a> doc->cur_entry = doc_e;
|
|
<a name="l88"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>tmpde->full_name</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>cur_entry</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l89"></a> cur_entry = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l90"></a> }
|
|
<a name="l91"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (next_entry)
|
|
<a name="l92"></a> {
|
|
<a name="l93"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrNCompare</span><span class=cF7>(</span><span class=cF0>next_entry, tmpde->full_name, </span><span class=cF5>StrLen</span><span class=cF0>(tmpde->full_name)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l94"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l95"></a> doc->cur_entry = doc_e;
|
|
<a name="l96"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>tmpde->full_name</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>next_entry</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l97"></a> cur_entry = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l98"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l99"></a> }
|
|
<a name="l100"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l101"></a> }
|
|
<a name="l102"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l103"></a> {
|
|
<a name="l104"></a> tmpde = doc_e->user_data;
|
|
<a name="l105"></a> </span><span class=cF1>if</span><span class=cF0> (cur_entry)
|
|
<a name="l106"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l107"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrNCompare</span><span class=cF7>(</span><span class=cF0>cur_entry, tmpde->full_name, </span><span class=cF5>StrLen</span><span class=cF0>(tmpde->full_name)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l108"></a> {
|
|
<a name="l109"></a> doc->cur_entry = doc_e;
|
|
<a name="l110"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>tmpde->full_name</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>cur_entry</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l111"></a> cur_entry = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l112"></a> }
|
|
<a name="l113"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (next_entry)
|
|
<a name="l114"></a> {
|
|
<a name="l115"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrNCompare</span><span class=cF7>(</span><span class=cF0>next_entry, tmpde->full_name, </span><span class=cF5>StrLen</span><span class=cF0>(tmpde->full_name)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l116"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l117"></a> doc->cur_entry = doc_e;
|
|
<a name="l118"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>tmpde->full_name</span><span class=cF7>)</span><span class=cF0> == </span><span class=cF5>StrLen</span><span class=cF7>(</span><span class=cF0>next_entry</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l119"></a> cur_entry = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l120"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l121"></a> }
|
|
<a name="l122"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l123"></a> }
|
|
<a name="l124"></a> doc_e = doc_e->next;
|
|
<a name="l125"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l126"></a>}
|
|
<a name="l127"></a>
|
|
<a name="l128"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMDelUncollapsedList</span><span class=cF0>(</span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *tmpc)
|
|
<a name="l129"></a>{
|
|
<a name="l130"></a> </span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *tmpc1;
|
|
<a name="l131"></a>
|
|
<a name="l132"></a> </span><span class=cF1>while</span><span class=cF0> (tmpc)
|
|
<a name="l133"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l134"></a> tmpc1 = tmpc->next;
|
|
<a name="l135"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpc->name);
|
|
<a name="l136"></a> </span><span class=cF5>Free</span><span class=cF0>(tmpc);
|
|
<a name="l137"></a> tmpc = tmpc1;
|
|
<a name="l138"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l139"></a>}
|
|
<a name="l140"></a>
|
|
<a name="l141"></a></span><span class=cF9>CDirEntry</span><span class=cF0> *</span><span class=cF5>FMRebuildDocDrive</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> drv_let, </span><span class=cF9>CDoc</span><span class=cF0> *doc, </span><span class=cF9>CDirEntry</span><span class=cF0> **_head, </span><span class=cF1>Bool</span><span class=cF0> init)
|
|
<a name="l142"></a>{
|
|
<a name="l143"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde, *tmpde1;
|
|
<a name="l144"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l145"></a>
|
|
<a name="l146"></a> tmpde = </span><span class=cF5>CAlloc</span><span class=cF0>(</span><span class=cF1>sizeof</span><span class=cF7>(</span><span class=cF9>CDirEntry</span><span class=cF7>)</span><span class=cF0>);
|
|
<a name="l147"></a> tmpde->full_name = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%C:/"</span><span class=cF0>, drv_let);
|
|
<a name="l148"></a> tmpde->attr = </span><span class=cF3>RS_ATTR_DIR</span><span class=cF0>;
|
|
<a name="l149"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%c:/*"</span><span class=cF0>, drv_let);
|
|
<a name="l150"></a> </span><span class=cF1>if</span><span class=cF0> (init)
|
|
<a name="l151"></a> tmpde->sub = tmpde1 = </span><span class=cF5>FilesFind</span><span class=cF0>(st, </span><span class=cF3>FUF_RECURSE</span><span class=cF0>);
|
|
<a name="l152"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l153"></a> tmpde1 = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l154"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l155"></a> tmpde->user_data = </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$TR,\"%s\",U=0x%X$"</span><span class=cF0>, tmpde->full_name, tmpde);
|
|
<a name="l156"></a> tmpde->next = *_head;
|
|
<a name="l157"></a> *_head = tmpde;
|
|
<a name="l158"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"\n$ID,+2$"</span><span class=cF0>);
|
|
<a name="l159"></a> </span><span class=cF5>DocBottom</span><span class=cF0>(doc);
|
|
<a name="l160"></a> </span><span class=cF1>if</span><span class=cF0> (init)
|
|
<a name="l161"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l162"></a> </span><span class=cF5>DirFileDoc</span><span class=cF0>(doc, tmpde1);
|
|
<a name="l163"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde1)
|
|
<a name="l164"></a> {
|
|
<a name="l165"></a> tmpde1->parent = tmpde;
|
|
<a name="l166"></a> tmpde1 = tmpde1->next;
|
|
<a name="l167"></a> }
|
|
<a name="l168"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l169"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$ID,-2$"</span><span class=cF0>);
|
|
<a name="l170"></a>
|
|
<a name="l171"></a> </span><span class=cF1>return</span><span class=cF0> tmpde;
|
|
<a name="l172"></a>}
|
|
<a name="l173"></a>
|
|
<a name="l174"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>DEF2_PROCESSED</span><span class=cF0> </span><span class=cFE>1</span><span class=cF0>
|
|
<a name="l175"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>DEF2_NOT_INITIALIZED</span><span class=cF0> </span><span class=cFE>2</span><span class=cF0>
|
|
<a name="l176"></a>
|
|
<a name="l177"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMRebuildDoc</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> **_doc, </span><span class=cF9>CDirEntry</span><span class=cF0> **_head, </span><span class=cF9>I64</span><span class=cF0> mode)
|
|
<a name="l178"></a>{
|
|
<a name="l179"></a> </span><span class=cF9>CDrive</span><span class=cF0> *drive;
|
|
<a name="l180"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l181"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = *_doc, *doc2 = </span><span class=cFB>sys_clip_doc</span><span class=cF0>, *parent_doc;
|
|
<a name="l182"></a> </span><span class=cF9>CFMUncollapsedList</span><span class=cF0> *tmpc = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l183"></a> </span><span class=cF1>U8</span><span class=cF0> *cur_entry = </span><span class=cF3>NULL</span><span class=cF0>, *next_entry = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l184"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce;
|
|
<a name="l185"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde, *tmpde1, *cur_tree_entry;
|
|
<a name="l186"></a>
|
|
<a name="l187"></a> </span><span class=cF1>if</span><span class=cF0> (!doc)
|
|
<a name="l188"></a> parent_doc = </span><span class=cF5>DocPut</span><span class=cF0>;
|
|
<a name="l189"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l190"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l191"></a> parent_doc = doc->parent_doc;
|
|
<a name="l192"></a> </span><span class=cF5>Fs</span><span class=cF0>->put_doc = </span><span class=cF5>Fs</span><span class=cF0>->display_doc = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l193"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l194"></a> </span><span class=cF5>Refresh</span><span class=cF0>;
|
|
<a name="l195"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l196"></a> cur_tree_entry = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l197"></a> doc_ce = doc->cur_entry;
|
|
<a name="l198"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0> || doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l199"></a> cur_tree_entry = doc_ce->user_data;
|
|
<a name="l200"></a> </span><span class=cF1>if</span><span class=cF0> (cur_tree_entry)
|
|
<a name="l201"></a> cur_entry = </span><span class=cF5>StrNew</span><span class=cF0>(cur_tree_entry->full_name);
|
|
<a name="l202"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l203"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce != doc)
|
|
<a name="l204"></a> doc_ce = doc_ce->next;
|
|
<a name="l205"></a> </span><span class=cF1>while</span><span class=cF0> (doc_ce != doc)
|
|
<a name="l206"></a> {
|
|
<a name="l207"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0> || doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l208"></a> tmpde = doc_ce->user_data;
|
|
<a name="l209"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l210"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l211"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l212"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l213"></a> tmpde1 = tmpde->parent;
|
|
<a name="l214"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde1)
|
|
<a name="l215"></a> {
|
|
<a name="l216"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde1 == cur_tree_entry)
|
|
<a name="l217"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l218"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l219"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l220"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l221"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l222"></a> tmpde1 = tmpde1->parent;
|
|
<a name="l223"></a> }
|
|
<a name="l224"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l225"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l226"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l227"></a> doc_ce = doc_ce->next;
|
|
<a name="l228"></a> }
|
|
<a name="l229"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l230"></a> next_entry = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l231"></a>
|
|
<a name="l232"></a> tmpc = </span><span class=cF5>FMCollectUncollapsedList</span><span class=cF0>(doc);
|
|
<a name="l233"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
|
<a name="l234"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l235"></a> </span><span class=cF1>if</span><span class=cF0> (*_head)
|
|
<a name="l236"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l237"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(*_head);
|
|
<a name="l238"></a> *_head = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l239"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l240"></a> doc = </span><span class=cF5>DocNew</span><span class=cF0>;
|
|
<a name="l241"></a> doc->desc = </span><span class=cF6>'FileMan'</span><span class=cF0>;
|
|
<a name="l242"></a> doc->parent_doc = parent_doc;
|
|
<a name="l243"></a> doc->flags |= </span><span class=cF3>DOCF_FORM</span><span class=cF0>;
|
|
<a name="l244"></a> </span><span class=cF1>switch</span><span class=cF0> (mode)
|
|
<a name="l245"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l246"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FM_NORMAL</span><span class=cF0>:
|
|
<a name="l247"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc,</span><span class=cF6>"$PURPLE$File Manager\n\n"</span><span class=cF0>
|
|
<a name="l248"></a> </span><span class=cF6>"$LK,\"Click for Help\",A=\"FI:::/Doc/FileMgr.DD\"$\n\n"</span><span class=cF0>);
|
|
<a name="l249"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l250"></a>
|
|
<a name="l251"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FM_PICK_FILE</span><span class=cF0>:
|
|
<a name="l252"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$PURPLE$Pick file and press <ESC>\n\n"</span><span class=cF0>);
|
|
<a name="l253"></a> doc->flags |= </span><span class=cF3>DOCF_SIZE_MIN</span><span class=cF0>;
|
|
<a name="l254"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l255"></a>
|
|
<a name="l256"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FM_PICK_DIR</span><span class=cF0>:
|
|
<a name="l257"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$PURPLE$Pick directory and press <ESC>\n\n"</span><span class=cF0>);
|
|
<a name="l258"></a> doc->flags |= </span><span class=cF3>DOCF_SIZE_MIN</span><span class=cF0>;
|
|
<a name="l259"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l260"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l261"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$LTBLUE$"</span><span class=cF0>);
|
|
<a name="l262"></a> </span><span class=cF1>for</span><span class=cF0> (i = </span><span class=cFE>0</span><span class=cF0>; i < </span><span class=cF3>DRIVES_NUM</span><span class=cF0>; i++)
|
|
<a name="l263"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l264"></a> drive = &</span><span class=cFB>blkdev</span><span class=cF0>.drvs[i];
|
|
<a name="l265"></a> </span><span class=cF1>if</span><span class=cF0> (drive->bd->type == </span><span class=cF3>BDT_ATAPI</span><span class=cF0>)
|
|
<a name="l266"></a> {
|
|
<a name="l267"></a> </span><span class=cF1>if</span><span class=cF0> (drive->bd->flags & </span><span class=cF3>BDF_INITIALIZED</span><span class=cF0>)
|
|
<a name="l268"></a> tmpde = </span><span class=cF5>FMRebuildDocDrive</span><span class=cF0>(</span><span class=cF5>Drive2Letter</span><span class=cF7>(</span><span class=cF0>drive</span><span class=cF7>)</span><span class=cF0>, doc, _head, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l269"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l270"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l271"></a> tmpde = </span><span class=cF5>FMRebuildDocDrive</span><span class=cF0>(</span><span class=cF5>Drive2Letter</span><span class=cF7>(</span><span class=cF0>drive</span><span class=cF7>)</span><span class=cF0>, doc, _head, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l272"></a> tmpde->user_data2 |= </span><span class=cF3>DEF2_NOT_INITIALIZED</span><span class=cF0>;
|
|
<a name="l273"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l274"></a> }
|
|
<a name="l275"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (drive->fs_type == </span><span class=cF3>FSt_REDSEA</span><span class=cF0> || drive->fs_type == </span><span class=cF3>FSt_FAT32</span><span class=cF0>)
|
|
<a name="l276"></a> </span><span class=cF5>FMRebuildDocDrive</span><span class=cF0>(</span><span class=cF5>Drive2Letter</span><span class=cF7>(</span><span class=cF0>drive</span><span class=cF7>)</span><span class=cF0>, doc, _head, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l277"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l278"></a> </span><span class=cF5>DocTop</span><span class=cF0>(doc);
|
|
<a name="l279"></a> </span><span class=cF5>FMMarkUncollapsed</span><span class=cF0>(doc, tmpc, cur_entry, next_entry);
|
|
<a name="l280"></a> </span><span class=cF5>DocCenter</span><span class=cF0>(doc);
|
|
<a name="l281"></a> </span><span class=cF5>DocReset</span><span class=cF0>(doc2, </span><span class=cF3>TRUE</span><span class=cF0>);
|
|
<a name="l282"></a> </span><span class=cF5>FMDelUncollapsedList</span><span class=cF0>(tmpc);
|
|
<a name="l283"></a> </span><span class=cF5>Free</span><span class=cF0>(cur_entry);
|
|
<a name="l284"></a> </span><span class=cF5>Free</span><span class=cF0>(next_entry);
|
|
<a name="l285"></a> *_doc = doc;
|
|
<a name="l286"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l287"></a> </span><span class=cF5>Fs</span><span class=cF0>->put_doc = </span><span class=cF5>Fs</span><span class=cF0>->display_doc=doc;
|
|
<a name="l288"></a>}
|
|
<a name="l289"></a>
|
|
<a name="l290"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMRename</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l291"></a>{
|
|
<a name="l292"></a> </span><span class=cF9>CEdFileName</span><span class=cF0> fn;
|
|
<a name="l293"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e = doc->cur_entry;
|
|
<a name="l294"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde = </span><span class=cF3>NULL</span><span class=cF0>, *parent;
|
|
<a name="l295"></a>
|
|
<a name="l296"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l297"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l298"></a> tmpde = doc_e->user_data;
|
|
<a name="l299"></a> </span><span class=cF1>if</span><span class=cF0> (parent = tmpde->parent)
|
|
<a name="l300"></a> {
|
|
<a name="l301"></a> </span><span class=cF5>Cd</span><span class=cF0>(parent->full_name);
|
|
<a name="l302"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(fn.name, tmpde->name);
|
|
<a name="l303"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocForm</span><span class=cF7>(</span><span class=cF0>&fn</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l304"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l305"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l306"></a> </span><span class=cF5>Move</span><span class=cF0>(tmpde->name, fn.name);
|
|
<a name="l307"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l308"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l309"></a> }
|
|
<a name="l310"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l311"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l312"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l313"></a> tmpde = doc_e->user_data;
|
|
<a name="l314"></a> </span><span class=cF1>if</span><span class=cF0> (parent = tmpde->parent)
|
|
<a name="l315"></a> {
|
|
<a name="l316"></a> </span><span class=cF5>Cd</span><span class=cF0>(parent->full_name);
|
|
<a name="l317"></a> </span><span class=cF5>StrCopy</span><span class=cF0>(fn.name, tmpde->name);
|
|
<a name="l318"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocForm</span><span class=cF7>(</span><span class=cF0>&fn</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l319"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l320"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>tmpde->name, fn.name</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l321"></a> {
|
|
<a name="l322"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l323"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>CopyTree</span><span class=cF7>(</span><span class=cF0>tmpde->name, fn.name</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l324"></a> </span><span class=cF5>DelTree</span><span class=cF0>(tmpde->name);
|
|
<a name="l325"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l326"></a> }
|
|
<a name="l327"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l328"></a> }
|
|
<a name="l329"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l330"></a>}
|
|
<a name="l331"></a>
|
|
<a name="l332"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMMkDir</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l333"></a>{
|
|
<a name="l334"></a> </span><span class=cF9>CEdFileName</span><span class=cF0> fn;
|
|
<a name="l335"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_e = doc->cur_entry;
|
|
<a name="l336"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde = </span><span class=cF3>NULL</span><span class=cF0>, *parent;
|
|
<a name="l337"></a>
|
|
<a name="l338"></a> *fn.name = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l339"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l340"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l341"></a> tmpde = doc_e->user_data;
|
|
<a name="l342"></a> </span><span class=cF1>if</span><span class=cF0> (parent = tmpde->parent)
|
|
<a name="l343"></a> {
|
|
<a name="l344"></a> </span><span class=cF5>Cd</span><span class=cF0>(parent->full_name);
|
|
<a name="l345"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocForm</span><span class=cF7>(</span><span class=cF0>&fn</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l346"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l347"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l348"></a> </span><span class=cF5>DirMake</span><span class=cF0>(fn.name);
|
|
<a name="l349"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l350"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l351"></a> }
|
|
<a name="l352"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l353"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l354"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l355"></a> tmpde = doc_e->user_data;
|
|
<a name="l356"></a> </span><span class=cF5>Cd</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l357"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>DocForm</span><span class=cF7>(</span><span class=cF0>&fn</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l358"></a> {
|
|
<a name="l359"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l360"></a> </span><span class=cF5>DirMake</span><span class=cF0>(fn.name);
|
|
<a name="l361"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l362"></a> }
|
|
<a name="l363"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l364"></a>}
|
|
<a name="l365"></a>
|
|
<a name="l366"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMDelete</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l367"></a>{
|
|
<a name="l368"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l369"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l370"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l371"></a>
|
|
<a name="l372"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l373"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l374"></a> tmpde = doc_ce->user_data;
|
|
<a name="l375"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l376"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"Delete: %s"</span><span class=cF0>, tmpde->full_name);
|
|
<a name="l377"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpCancelOk</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l378"></a> </span><span class=cF5>Del</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l379"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l380"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l381"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l382"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l383"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l384"></a> tmpde = doc_ce->user_data;
|
|
<a name="l385"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l386"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"Delete: %s"</span><span class=cF0>, tmpde->full_name);
|
|
<a name="l387"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpCancelOk</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l388"></a> </span><span class=cF5>DelTree</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l389"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l390"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l391"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l392"></a>}
|
|
<a name="l393"></a>
|
|
<a name="l394"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMChangeDisk</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l395"></a>{
|
|
<a name="l396"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l397"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l398"></a>
|
|
<a name="l399"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0> || doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l400"></a> tmpde = doc_ce->user_data;
|
|
<a name="l401"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l402"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l403"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l404"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l405"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde->parent)
|
|
<a name="l406"></a> tmpde = tmpde->parent;
|
|
<a name="l407"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l408"></a> </span><span class=cF5>DiskChange</span><span class=cF0>(*tmpde->full_name);
|
|
<a name="l409"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l410"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l411"></a>}
|
|
<a name="l412"></a>
|
|
<a name="l413"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMMountISO</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l414"></a>{
|
|
<a name="l415"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l416"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l417"></a>
|
|
<a name="l418"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0> && </span><span class=cF7>(</span><span class=cF0>tmpde = doc_ce->user_data</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l419"></a> </span><span class=cF5>MountFile</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l420"></a>}
|
|
<a name="l421"></a>
|
|
<a name="l422"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMUnmount</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l423"></a>{
|
|
<a name="l424"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l425"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l426"></a> </span><span class=cF9>I64</span><span class=cF0> drv_let;
|
|
<a name="l427"></a>
|
|
<a name="l428"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0> || doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l429"></a> tmpde = doc_ce->user_data;
|
|
<a name="l430"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l431"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l432"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l433"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l434"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde->parent)
|
|
<a name="l435"></a> tmpde = tmpde->parent;
|
|
<a name="l436"></a> drv_let = *tmpde->full_name;
|
|
<a name="l437"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Letter2BlkDev</span><span class=cF7>(</span><span class=cF0>drv_let</span><span class=cF7>)</span><span class=cF0> != </span><span class=cF5>Letter2BlkDev</span><span class=cF7>(</span><span class=cF6>':'</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l438"></a> </span><span class=cF5>Unmount</span><span class=cF0>(drv_let);
|
|
<a name="l439"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l440"></a>}
|
|
<a name="l441"></a>
|
|
<a name="l442"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMFormatDrive</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l443"></a>{
|
|
<a name="l444"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l445"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l446"></a>
|
|
<a name="l447"></a> </span><span class=cF1>U8</span><span class=cF0> *st = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l448"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0> || doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l449"></a> tmpde = doc_ce->user_data;
|
|
<a name="l450"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l451"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l452"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l453"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l454"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde->parent)
|
|
<a name="l455"></a> tmpde = tmpde->parent;
|
|
<a name="l456"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"Format Drive '%c'?\nAre You Sure?\n"</span><span class=cF0>, *tmpde->full_name);
|
|
<a name="l457"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>PopUpCancelOk</span><span class=cF7>(</span><span class=cF0>st</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l458"></a> {
|
|
<a name="l459"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l460"></a> </span><span class=cF5>Format</span><span class=cF0>(*tmpde->full_name,, </span><span class=cF3>FALSE</span><span class=cF0>);
|
|
<a name="l461"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l462"></a> }
|
|
<a name="l463"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l464"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l465"></a>}
|
|
<a name="l466"></a>
|
|
<a name="l467"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMMakeISO</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l468"></a>{
|
|
<a name="l469"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l470"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l471"></a>
|
|
<a name="l472"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0> || doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l473"></a> tmpde = doc_ce->user_data;
|
|
<a name="l474"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l475"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l476"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l477"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l478"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l479"></a> tmpde = tmpde->parent;
|
|
<a name="l480"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde && *tmpde->full_name)
|
|
<a name="l481"></a> {
|
|
<a name="l482"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l483"></a> </span><span class=cF5>RedSeaISO</span><span class=cF0>(, tmpde->full_name);
|
|
<a name="l484"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l485"></a> }
|
|
<a name="l486"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l487"></a>}
|
|
<a name="l488"></a>
|
|
<a name="l489"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMBurnISO</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l490"></a>{
|
|
<a name="l491"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry;
|
|
<a name="l492"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l493"></a>
|
|
<a name="l494"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0> || doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l495"></a> tmpde = doc_ce->user_data;
|
|
<a name="l496"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l497"></a> tmpde = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l498"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde)
|
|
<a name="l499"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l500"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde->parent)
|
|
<a name="l501"></a> tmpde = tmpde->parent;
|
|
<a name="l502"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l503"></a> </span><span class=cF5>DVDImageWrite</span><span class=cF0>(*tmpde->full_name);
|
|
<a name="l504"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l505"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l506"></a>}
|
|
<a name="l507"></a>
|
|
<a name="l508"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMCopy</span><span class=cF0>(</span><span class=cF9>CDoc</span><span class=cF0> *doc)
|
|
<a name="l509"></a>{
|
|
<a name="l510"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc2 = </span><span class=cFB>sys_clip_doc</span><span class=cF0>;
|
|
<a name="l511"></a> </span><span class=cF1>U8</span><span class=cF0> *st;
|
|
<a name="l512"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = doc->cur_entry, *doc_e;
|
|
<a name="l513"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde, *tmpde1 = </span><span class=cF3>NULL</span><span class=cF0>, *tmpde2;
|
|
<a name="l514"></a> </span><span class=cF1>Bool</span><span class=cF0> unlock_doc2 = </span><span class=cF5>DocLock</span><span class=cF0>(doc2);
|
|
<a name="l515"></a>
|
|
<a name="l516"></a> doc_e = doc2->head.next;
|
|
<a name="l517"></a> tmpde1 = doc_ce->user_data;
|
|
<a name="l518"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l519"></a> tmpde1 = tmpde1->parent;
|
|
<a name="l520"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 != </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l521"></a> tmpde1 = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l522"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde1)
|
|
<a name="l523"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l524"></a> </span><span class=cF1>while</span><span class=cF0> (doc_e != doc2)
|
|
<a name="l525"></a> {
|
|
<a name="l526"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l527"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l528"></a> tmpde = doc_e->user_data;
|
|
<a name="l529"></a> tmpde->user_data2 |= </span><span class=cF3>DEF2_PROCESSED</span><span class=cF0>;
|
|
<a name="l530"></a> tmpde2 = tmpde->parent;
|
|
<a name="l531"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpde2 || !</span><span class=cF7>(</span><span class=cF0>tmpde2->user_data2 & </span><span class=cF3>DEF2_PROCESSED</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l532"></a> {
|
|
<a name="l533"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l534"></a> </span><span class=cF5>Copy</span><span class=cF0>(tmpde->full_name, tmpde1->full_name);
|
|
<a name="l535"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l536"></a> }
|
|
<a name="l537"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l538"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l539"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l540"></a> tmpde = doc_e->user_data;
|
|
<a name="l541"></a> tmpde->user_data2 |= </span><span class=cF3>DEF2_PROCESSED</span><span class=cF0>;
|
|
<a name="l542"></a> tmpde2 = tmpde->parent;
|
|
<a name="l543"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpde2 || !</span><span class=cF7>(</span><span class=cF0>tmpde2->user_data2 & </span><span class=cF3>DEF2_PROCESSED</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l544"></a> {
|
|
<a name="l545"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l546"></a> </span><span class=cF1>if</span><span class=cF0> (*tmpde1->name)
|
|
<a name="l547"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%s/%s"</span><span class=cF0>, tmpde1->full_name, tmpde->name);
|
|
<a name="l548"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l549"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%s%s"</span><span class=cF0>, tmpde1->full_name, tmpde->name);
|
|
<a name="l550"></a> </span><span class=cF5>CopyTree</span><span class=cF0>(tmpde->full_name, st);
|
|
<a name="l551"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l552"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l553"></a> }
|
|
<a name="l554"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l555"></a> doc_e = doc_e->next;
|
|
<a name="l556"></a> }
|
|
<a name="l557"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l558"></a> </span><span class=cF1>if</span><span class=cF0> (unlock_doc2)
|
|
<a name="l559"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc2);
|
|
<a name="l560"></a>}
|
|
<a name="l561"></a>
|
|
<a name="l562"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_INCLUDE</span><span class=cF0> </span><span class=cFE>0</span><span class=cF0>
|
|
<a name="l563"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_SYSTEM_INCLUDE</span><span class=cF0> </span><span class=cFE>1</span><span class=cF0>
|
|
<a name="l564"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_DELETE</span><span class=cF0> </span><span class=cFE>2</span><span class=cF0>
|
|
<a name="l565"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_RENAME</span><span class=cF0> </span><span class=cFE>3</span><span class=cF0>
|
|
<a name="l566"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_MKDIR</span><span class=cF0> </span><span class=cFE>4</span><span class=cF0>
|
|
<a name="l567"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_PASTE</span><span class=cF0> </span><span class=cFE>5</span><span class=cF0>
|
|
<a name="l568"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_CHG_DISK</span><span class=cF0> </span><span class=cFE>6</span><span class=cF0>
|
|
<a name="l569"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_FORMAT</span><span class=cF0> </span><span class=cFE>7</span><span class=cF0>
|
|
<a name="l570"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_MOUNT_REDSEA_ISO_C</span><span class=cF0> </span><span class=cFE>8</span><span class=cF0>
|
|
<a name="l571"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_UNMOUNT</span><span class=cF0> </span><span class=cFE>9</span><span class=cF0>
|
|
<a name="l572"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_MAKE_REDSEA_ISO_C</span><span class=cF0> </span><span class=cFE>10</span><span class=cF0>
|
|
<a name="l573"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_BURN_ISO</span><span class=cF0> </span><span class=cFE>11</span><span class=cF0>
|
|
<a name="l574"></a>#</span><span class=cF1>define</span><span class=cF0> </span><span class=cF3>FMR_HELP</span><span class=cF0> </span><span class=cFE>12</span><span class=cF0>
|
|
<a name="l575"></a>
|
|
<a name="l576"></a></span><span class=cF9>I64</span><span class=cF0> </span><span class=cF5>PopUpFMRight</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *header=</span><span class=cF3>NULL</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *footer=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l577"></a>{
|
|
<a name="l578"></a> </span><span class=cF9>I64</span><span class=cF0> i;
|
|
<a name="l579"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF5>DocNew</span><span class=cF0>;
|
|
<a name="l580"></a>
|
|
<a name="l581"></a> </span><span class=cF1>if</span><span class=cF0> (header)
|
|
<a name="l582"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"%s"</span><span class=cF0>,header);
|
|
<a name="l583"></a>
|
|
<a name="l584"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"$CM+LX,1,1$$BT,\"INCLUDE \",LE=FMR_INCLUDE$"</span><span class=cF0>
|
|
<a name="l585"></a> </span><span class=cF6>"$CM+LX,29,0$$BT,\"SYSTEM INCLUDE \",LE=FMR_SYSTEM_INCLUDE$"</span><span class=cF0>
|
|
<a name="l586"></a> </span><span class=cF6>"$CM+LX,1,3 $$BT,\"DELETE \",LE=FMR_DELETE$"</span><span class=cF0>
|
|
<a name="l587"></a> </span><span class=cF6>"$CM+LX,29,0$$BT,\"RENAME \",LE=FMR_RENAME$"</span><span class=cF0>
|
|
<a name="l588"></a> </span><span class=cF6>"$CM+LX,1,3 $$BT,\"MAKE DIRECTORY \",LE=FMR_MKDIR$"</span><span class=cF0>
|
|
<a name="l589"></a> </span><span class=cF6>"$CM+LX,29,0$$BT,\"PASTE CLIP FILES \",LE=FMR_PASTE$"</span><span class=cF0>
|
|
<a name="l590"></a> </span><span class=cF6>"$CM+LX,1,3 $$BT,\"CHANGE DISK(MOUNT IT) \",LE=FMR_CHG_DISK$"</span><span class=cF0>
|
|
<a name="l591"></a> </span><span class=cF6>"$CM+LX,29,0$$BT,\"FORMAT \",LE=FMR_FORMAT$"</span><span class=cF0>
|
|
<a name="l592"></a> </span><span class=cF6>"$CM+LX,1,3 $$BT,\"MOUNT ISO.C FILE \",LE=FMR_MOUNT_REDSEA_ISO_C$"</span><span class=cF0>
|
|
<a name="l593"></a> </span><span class=cF6>"$CM+LX,29,0$$BT,\"UNMOUNT \",LE=FMR_UNMOUNT$"</span><span class=cF0>
|
|
<a name="l594"></a> </span><span class=cF6>"$CM+LX,1,3 $$BT,\"MAKE ISO.C (CD/DVD) FILE\",LE=FMR_MAKE_REDSEA_ISO_C$"</span><span class=cF0>
|
|
<a name="l595"></a> </span><span class=cF6>"$CM+LX,29,0$$BT,\"BURN ISO (CD/DVD) FILE \",LE=FMR_BURN_ISO$"</span><span class=cF0>
|
|
<a name="l596"></a> </span><span class=cF6>"$CM+LX,1,3 $$BT,\"HELP \",LE=FMR_HELP$"</span><span class=cF0>
|
|
<a name="l597"></a> </span><span class=cF6>"$CM+LX,29,0$$BT,\"CANCEL \",LE=DOCM_CANCEL$\n"</span><span class=cF0>);
|
|
<a name="l598"></a>
|
|
<a name="l599"></a> </span><span class=cF1>if</span><span class=cF0> (footer)
|
|
<a name="l600"></a> </span><span class=cF5>DocPrint</span><span class=cF0>(doc, </span><span class=cF6>"%s"</span><span class=cF0>, footer);
|
|
<a name="l601"></a> i = </span><span class=cF5>PopUpMenu</span><span class=cF0>(doc);
|
|
<a name="l602"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
|
<a name="l603"></a>
|
|
<a name="l604"></a> </span><span class=cF1>return</span><span class=cF0> i;
|
|
<a name="l605"></a>}
|
|
<a name="l606"></a>
|
|
<a name="l607"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMRightClick</span><span class=cF0>()
|
|
<a name="l608"></a>{
|
|
<a name="l609"></a> </span><span class=cF1>switch</span><span class=cF0> (</span><span class=cF5>PopUpFMRight</span><span class=cF0>)
|
|
<a name="l610"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l611"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_INCLUDE</span><span class=cF0>:
|
|
<a name="l612"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0x3F0000003F</span><span class=cF0>);
|
|
<a name="l613"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l614"></a>
|
|
<a name="l615"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_SYSTEM_INCLUDE</span><span class=cF0>:
|
|
<a name="l616"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cFE>0x23F0000023F</span><span class=cF0>);
|
|
<a name="l617"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l618"></a>
|
|
<a name="l619"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_DELETE</span><span class=cF0>:
|
|
<a name="l620"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF3>CH_CTRLY</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l621"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l622"></a>
|
|
<a name="l623"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_RENAME</span><span class=cF0>:
|
|
<a name="l624"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'r'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l625"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l626"></a>
|
|
<a name="l627"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_MKDIR</span><span class=cF0>:
|
|
<a name="l628"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'d'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l629"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l630"></a>
|
|
<a name="l631"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_PASTE</span><span class=cF0>:
|
|
<a name="l632"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_INS</span><span class=cF0> + </span><span class=cF3>SCF_SHIFT</span><span class=cF0>);
|
|
<a name="l633"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l634"></a>
|
|
<a name="l635"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_CHG_DISK</span><span class=cF0>:
|
|
<a name="l636"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'c'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l637"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l638"></a>
|
|
<a name="l639"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_FORMAT</span><span class=cF0>:
|
|
<a name="l640"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'f'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l641"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l642"></a>
|
|
<a name="l643"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_MOUNT_REDSEA_ISO_C</span><span class=cF0>:
|
|
<a name="l644"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'i'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l645"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l646"></a>
|
|
<a name="l647"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_UNMOUNT</span><span class=cF0>:
|
|
<a name="l648"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'u'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l649"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l650"></a>
|
|
<a name="l651"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_MAKE_REDSEA_ISO_C</span><span class=cF0>:
|
|
<a name="l652"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'m'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l653"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l654"></a>
|
|
<a name="l655"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_BURN_ISO</span><span class=cF0>:
|
|
<a name="l656"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF6>'B'</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>);
|
|
<a name="l657"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l658"></a>
|
|
<a name="l659"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>FMR_HELP</span><span class=cF0>:
|
|
<a name="l660"></a> </span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cF3>CH_CTRLM</span><span class=cF0>, </span><span class=cFE>0x43200000432</span><span class=cF0>);
|
|
<a name="l661"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l662"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l663"></a>}
|
|
<a name="l664"></a>
|
|
<a name="l665"></a></span><span class=cF1>U8</span><span class=cF0> *</span><span class=cFB>fm_mouse_str</span><span class=cF0> = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l666"></a></span><span class=cF1>U0</span><span class=cF0> (*</span><span class=cFB>fp_old_final_screen_update</span><span class=cF0>)(</span><span class=cF9>CDC</span><span class=cF0> *dc);
|
|
<a name="l667"></a>
|
|
<a name="l668"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>FMFinalScreenUpdate</span><span class=cF0>(</span><span class=cF9>CDC</span><span class=cF0> *dc)
|
|
<a name="l669"></a>{
|
|
<a name="l670"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cFB>fm_mouse_str</span><span class=cF0>)
|
|
<a name="l671"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l672"></a> dc->color = </span><span class=cF3>LTRED</span><span class=cF0>;
|
|
<a name="l673"></a> </span><span class=cF5>GrPrint</span><span class=cF0>(dc, </span><span class=cFB>mouse</span><span class=cF0>.pos.x, </span><span class=cFB>mouse</span><span class=cF0>.pos.y, </span><span class=cF6>"%s"</span><span class=cF0>, </span><span class=cFB>fm_mouse_str</span><span class=cF0>);
|
|
<a name="l674"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l675"></a> (*</span><span class=cFB>fp_old_final_screen_update</span><span class=cF0>)(dc);
|
|
<a name="l676"></a>}
|
|
<a name="l677"></a>
|
|
<a name="l678"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U8</span><span class=cF0> *</span><span class=cF5>FileMgr</span><span class=cF0>(</span><span class=cF9>I64</span><span class=cF0> mode=</span><span class=cF3>FM_NORMAL</span><span class=cF0>, </span><span class=cF9>CTask</span><span class=cF0> *mem_task=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l679"></a>{</span><span class=cF2>//File manager. Also, used to choose files and dirs.</span><span class=cF0>
|
|
<a name="l680"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *head = </span><span class=cF3>NULL</span><span class=cF0>, *tmpde, *tmpde1, *tmpde2;
|
|
<a name="l681"></a> </span><span class=cF9>I64</span><span class=cF0> sc, ch, arg1, arg2, message_code;
|
|
<a name="l682"></a> </span><span class=cF9>CDoc</span><span class=cF0> *doc = </span><span class=cF3>NULL</span><span class=cF0>, *old_put_doc = </span><span class=cF5>DocPut</span><span class=cF0>, *old_display_doc = </span><span class=cF5>DocDisplay</span><span class=cF0>;
|
|
<a name="l683"></a> </span><span class=cF1>U8</span><span class=cF0> *res = </span><span class=cF3>NULL</span><span class=cF0>, *st, *st2, *old_cur_dir = </span><span class=cF5>DirCur</span><span class=cF0>;
|
|
<a name="l684"></a> </span><span class=cF9>CDocEntry</span><span class=cF0> *doc_ce = </span><span class=cF3>NULL</span><span class=cF0>, *doc_e;
|
|
<a name="l685"></a> </span><span class=cF1>Bool</span><span class=cF0> okay;
|
|
<a name="l686"></a>
|
|
<a name="l687"></a> </span><span class=cF5>SettingsPush</span><span class=cF0>; </span><span class=cF2>//See </span><a href="https://tomawezome.github.io/ZealOS/System/TaskSettings.CC.html#l3"><span class=cF4>SettingsPush</span></a><span class=cF0>
|
|
<a name="l688"></a> </span><span class=cFB>fp_old_final_screen_update</span><span class=cF0> = </span><span class=cFB>gr</span><span class=cF0>.fp_final_screen_update;
|
|
<a name="l689"></a> </span><span class=cF5>MenuFilePush</span><span class=cF0>(</span><span class=cF6>"::/Doc/FileMgrPullDown.DD"</span><span class=cF0>);
|
|
<a name="l690"></a> </span><span class=cF5>FMRebuildDoc</span><span class=cF0>(&doc, &head, mode);
|
|
<a name="l691"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde1 = </span><span class=cF5>Cd2DirEntry</span><span class=cF7>(</span><span class=cF0>head, old_cur_dir</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l692"></a> doc->cur_entry = tmpde1->user_data;
|
|
<a name="l693"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde1)
|
|
<a name="l694"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l695"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde1->attr & </span><span class=cF3>RS_ATTR_DIR</span><span class=cF0>)
|
|
<a name="l696"></a> tmpde1->user_data(</span><span class=cF9>CDocEntry</span><span class=cF0> *)->de_flags &= ~</span><span class=cF3>DOCEF_CHECKED_COLLAPSED</span><span class=cF0>;
|
|
<a name="l697"></a> tmpde1 = tmpde1->parent;
|
|
<a name="l698"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l699"></a> </span><span class=cF1>do</span><span class=cF0>
|
|
<a name="l700"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l701"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l702"></a>
|
|
<a name="l703"></a> </span><span class=cF1>do</span><span class=cF0> message_code = </span><span class=cF5>MessageGet</span><span class=cF0>(&arg1, &arg2,
|
|
<a name="l704"></a> </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0> | </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_L_DOWN</span><span class=cF0> | </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0> | </span><span class=cFE>1</span><span class=cF0> << </span><span class=cF3>MESSAGE_MS_R_UP</span><span class=cF0>);
|
|
<a name="l705"></a> </span><span class=cF1>while</span><span class=cF0> (</span><span class=cF5>Fs</span><span class=cF0> != </span><span class=cFB>sys_focus_task</span><span class=cF0>);
|
|
<a name="l706"></a>
|
|
<a name="l707"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l708"></a> </span><span class=cF1>switch</span><span class=cF0> (message_code)
|
|
<a name="l709"></a> {
|
|
<a name="l710"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MESSAGE_MS_R_UP</span><span class=cF0>:
|
|
<a name="l711"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l712"></a> </span><span class=cF5>FMRightClick</span><span class=cF0>;
|
|
<a name="l713"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l714"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l715"></a>
|
|
<a name="l716"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MESSAGE_MS_L_DOWN</span><span class=cF0>:
|
|
<a name="l717"></a> doc_ce = doc->cur_entry;
|
|
<a name="l718"></a> </span><span class=cFB>fm_mouse_str</span><span class=cF0> = doc_ce->tag;
|
|
<a name="l719"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_final_screen_update = &</span><span class=cF5>FMFinalScreenUpdate</span><span class=cF0>;
|
|
<a name="l720"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l721"></a>
|
|
<a name="l722"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MESSAGE_MS_L_UP</span><span class=cF0>:
|
|
<a name="l723"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce)
|
|
<a name="l724"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l725"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_final_screen_update = </span><span class=cFB>fp_old_final_screen_update</span><span class=cF0>;
|
|
<a name="l726"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>WinCursorPosSet</span><span class=cF7>(</span><span class=cF5>Fs</span><span class=cF0>, arg1 + </span><span class=cF5>Fs</span><span class=cF0>->pix_left + </span><span class=cF5>Fs</span><span class=cF0>->scroll_x, arg2 + </span><span class=cF5>Fs</span><span class=cF0>->pix_top + </span><span class=cF5>Fs</span><span class=cF0>->scroll_y, </span><span class=cF3>TRUE</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l727"></a> {
|
|
<a name="l728"></a> doc_e = doc->cur_entry;
|
|
<a name="l729"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e != doc_ce)
|
|
<a name="l730"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l731"></a> st2 = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l732"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l733"></a> {
|
|
<a name="l734"></a> tmpde1 = doc_e->user_data;
|
|
<a name="l735"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde1 = tmpde1->parent)
|
|
<a name="l736"></a> st2 = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde1->full_name);
|
|
<a name="l737"></a> }
|
|
<a name="l738"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l739"></a> {
|
|
<a name="l740"></a> tmpde1 = doc_e->user_data;
|
|
<a name="l741"></a> st2 = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde1->full_name);
|
|
<a name="l742"></a> }
|
|
<a name="l743"></a> </span><span class=cF1>if</span><span class=cF0> (st2 && doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l744"></a> {
|
|
<a name="l745"></a> tmpde = doc_ce->user_data;
|
|
<a name="l746"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l747"></a> </span><span class=cF5>Move</span><span class=cF0>(tmpde->full_name, st2);
|
|
<a name="l748"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l749"></a> </span><span class=cF5>FMRebuildDoc</span><span class=cF0>(&doc, &head, mode);
|
|
<a name="l750"></a> }
|
|
<a name="l751"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (st2 && doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l752"></a> {
|
|
<a name="l753"></a> tmpde = doc_ce->user_data;
|
|
<a name="l754"></a> okay = </span><span class=cF3>TRUE</span><span class=cF0>;
|
|
<a name="l755"></a> tmpde2 = tmpde1;
|
|
<a name="l756"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde2)
|
|
<a name="l757"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l758"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde2 != tmpde)
|
|
<a name="l759"></a> tmpde2 = tmpde2->parent;
|
|
<a name="l760"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l761"></a> {
|
|
<a name="l762"></a> okay = </span><span class=cF3>FALSE</span><span class=cF0>;
|
|
<a name="l763"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l764"></a> }
|
|
<a name="l765"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l766"></a> </span><span class=cF1>if</span><span class=cF0> (okay)
|
|
<a name="l767"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l768"></a> </span><span class=cF1>if</span><span class=cF0> (*tmpde1->name)
|
|
<a name="l769"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%s/%s"</span><span class=cF0>, tmpde1->full_name, tmpde->name);
|
|
<a name="l770"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l771"></a> st = </span><span class=cF5>MStrPrint</span><span class=cF0>(</span><span class=cF6>"%s%s"</span><span class=cF0>, tmpde1->full_name, tmpde->name);
|
|
<a name="l772"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>tmpde->full_name, st</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l773"></a> {
|
|
<a name="l774"></a> </span><span class=cF5>Silent</span><span class=cF0>;
|
|
<a name="l775"></a> </span><span class=cF5>CopyTree</span><span class=cF0>(tmpde->full_name, st);
|
|
<a name="l776"></a> </span><span class=cF5>DelTree</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l777"></a> </span><span class=cF5>Silent</span><span class=cF0>(</span><span class=cF3>OFF</span><span class=cF0>);
|
|
<a name="l778"></a> </span><span class=cF5>FMRebuildDoc</span><span class=cF0>(&doc, &head, mode);
|
|
<a name="l779"></a> }
|
|
<a name="l780"></a> </span><span class=cF5>Free</span><span class=cF0>(st);
|
|
<a name="l781"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l782"></a> }
|
|
<a name="l783"></a> </span><span class=cF5>Free</span><span class=cF0>(st2);
|
|
<a name="l784"></a> </span><span class=cF5>FlushMessages</span><span class=cF0>;
|
|
<a name="l785"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l786"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l787"></a> </span><span class=cF1>if</span><span class=cF0> (doc_e->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l788"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l789"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l790"></a> </span><span class=cF5>Ed</span><span class=cF0>(doc_e->user_data</span><span class=cF7>(</span><span class=cF9>CDirEntry</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>->full_name);
|
|
<a name="l791"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l792"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l793"></a> doc_ce = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l794"></a> }
|
|
<a name="l795"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l796"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l797"></a>
|
|
<a name="l798"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>:
|
|
<a name="l799"></a> doc_ce = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l800"></a> ch = arg1;
|
|
<a name="l801"></a> sc = arg2;
|
|
<a name="l802"></a> </span><span class=cF1>if</span><span class=cF0> (sc.u8[</span><span class=cFE>0</span><span class=cF0>] == </span><span class=cF3>SC_DELETE</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>sc & (</span><span class=cF3>SCF_SHIFT</span><span class=cF0> | </span><span class=cF3>SCF_CTRL</span><span class=cF0>)</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l803"></a> ch = </span><span class=cF3>CH_CTRLY</span><span class=cF0>;
|
|
<a name="l804"></a> </span><span class=cF1>if</span><span class=cF0> (ch && sc & </span><span class=cF3>SCF_ALT</span><span class=cF0>)
|
|
<a name="l805"></a> </span><span class=cF1>goto</span><span class=cF0> fm_regular_key;
|
|
<a name="l806"></a> </span><span class=cF1>switch</span><span class=cF0> (ch)
|
|
<a name="l807"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l808"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'\n'</span><span class=cF0>:
|
|
<a name="l809"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l810"></a> </span><span class=cF5>FMRightClick</span><span class=cF0>;
|
|
<a name="l811"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l812"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l813"></a> </span><span class=cF1>start</span><span class=cF0>:
|
|
<a name="l814"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l815"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_CTRLV</span><span class=cF0>:
|
|
<a name="l816"></a> </span><span class=cF5>FMCopy</span><span class=cF0>(doc);
|
|
<a name="l817"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l818"></a>
|
|
<a name="l819"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'r'</span><span class=cF0>:
|
|
<a name="l820"></a> </span><span class=cF5>FMRename</span><span class=cF0>(doc);
|
|
<a name="l821"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l822"></a>
|
|
<a name="l823"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'d'</span><span class=cF0>:
|
|
<a name="l824"></a> </span><span class=cF5>FMMkDir</span><span class=cF0>(doc);
|
|
<a name="l825"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l826"></a>
|
|
<a name="l827"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_CTRLY</span><span class=cF0>:
|
|
<a name="l828"></a> </span><span class=cF5>FMDelete</span><span class=cF0>(doc);
|
|
<a name="l829"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l830"></a>
|
|
<a name="l831"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'c'</span><span class=cF0>:
|
|
<a name="l832"></a> </span><span class=cF5>FMChangeDisk</span><span class=cF0>(doc);
|
|
<a name="l833"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l834"></a>
|
|
<a name="l835"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'i'</span><span class=cF0>:
|
|
<a name="l836"></a> </span><span class=cF5>FMMountISO</span><span class=cF0>(doc);
|
|
<a name="l837"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l838"></a>
|
|
<a name="l839"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'u'</span><span class=cF0>:
|
|
<a name="l840"></a> </span><span class=cF5>FMUnmount</span><span class=cF0>(doc);
|
|
<a name="l841"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l842"></a>
|
|
<a name="l843"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'m'</span><span class=cF0>:
|
|
<a name="l844"></a> </span><span class=cF5>FMMakeISO</span><span class=cF0>(doc);
|
|
<a name="l845"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l846"></a>
|
|
<a name="l847"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'B'</span><span class=cF0>:
|
|
<a name="l848"></a> </span><span class=cF5>FMBurnISO</span><span class=cF0>(doc);
|
|
<a name="l849"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l850"></a>
|
|
<a name="l851"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF6>'f'</span><span class=cF0>:
|
|
<a name="l852"></a> </span><span class=cF5>FMFormatDrive</span><span class=cF0>(doc);
|
|
<a name="l853"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l854"></a> </span><span class=cF1>end</span><span class=cF0>:
|
|
<a name="l855"></a> </span><span class=cF5>FMRebuildDoc</span><span class=cF0>(&doc, &head, mode);
|
|
<a name="l856"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l857"></a>
|
|
<a name="l858"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>:
|
|
<a name="l859"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l860"></a>
|
|
<a name="l861"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_SPACE</span><span class=cF0>:
|
|
<a name="l862"></a> </span><span class=cF1>if</span><span class=cF0> (doc->cur_entry->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l863"></a> {
|
|
<a name="l864"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l865"></a> </span><span class=cF5>Ed</span><span class=cF0>(doc->cur_entry->user_data</span><span class=cF7>(</span><span class=cF9>CDirEntry</span><span class=cF0> *</span><span class=cF7>)</span><span class=cF0>->full_name);
|
|
<a name="l866"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l867"></a> }
|
|
<a name="l868"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l869"></a> </span><span class=cF1>goto</span><span class=cF0> fm_regular_key;
|
|
<a name="l870"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l871"></a>
|
|
<a name="l872"></a> </span><span class=cF1>case</span><span class=cF0> </span><span class=cF3>CH_ESC</span><span class=cF0>:
|
|
<a name="l873"></a> doc_ce = doc->cur_entry;
|
|
<a name="l874"></a> tmpde = doc_ce->user_data;
|
|
<a name="l875"></a> </span><span class=cF1>if</span><span class=cF0> (mode == </span><span class=cF3>FM_PICK_FILE</span><span class=cF0> && doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l876"></a> res = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde->full_name, mem_task);
|
|
<a name="l877"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (mode == </span><span class=cF3>FM_PICK_DIR</span><span class=cF0>)
|
|
<a name="l878"></a> {
|
|
<a name="l879"></a> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_TREE</span><span class=cF0>)
|
|
<a name="l880"></a> res = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde->full_name, mem_task);
|
|
<a name="l881"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (doc_ce->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0> && </span><span class=cF7>(</span><span class=cF0>tmpde = tmpde->parent</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l882"></a> res = </span><span class=cF5>StrNew</span><span class=cF0>(tmpde->full_name, mem_task);
|
|
<a name="l883"></a> }
|
|
<a name="l884"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l885"></a>
|
|
<a name="l886"></a> </span><span class=cF1>default</span><span class=cF0>:
|
|
<a name="l887"></a> </span><span class=cF1>if</span><span class=cF0> (sc.u8[</span><span class=cFE>0</span><span class=cF0>] == </span><span class=cF3>SC_INS</span><span class=cF0> && sc & </span><span class=cF3>SCF_SHIFT</span><span class=cF0> && !</span><span class=cF7>(</span><span class=cF0>sc & </span><span class=cF3>SCF_CTRL</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l888"></a> {
|
|
<a name="l889"></a> </span><span class=cF5>FMCopy</span><span class=cF0>(doc);
|
|
<a name="l890"></a> </span><span class=cF5>FMRebuildDoc</span><span class=cF0>(&doc, &head, mode);
|
|
<a name="l891"></a> }
|
|
<a name="l892"></a> </span><span class=cF1>else</span><span class=cF0> </span><span class=cF1>if</span><span class=cF0> (sc.u8[</span><span class=cFE>0</span><span class=cF0>] == </span><span class=cF3>SC_F5</span><span class=cF0>)
|
|
<a name="l893"></a> {
|
|
<a name="l894"></a> </span><span class=cF1>if</span><span class=cF0> (doc->cur_entry->type_u8 == </span><span class=cF3>DOCT_MENU_VAL</span><span class=cF0>)
|
|
<a name="l895"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l896"></a> tmpde = doc->cur_entry->user_data;
|
|
<a name="l897"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l898"></a> </span><span class=cF1>if</span><span class=cF0> (sc & </span><span class=cF3>SCF_SHIFT</span><span class=cF0>)
|
|
<a name="l899"></a> </span><span class=cF5>SysFile</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l900"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l901"></a> </span><span class=cF5>PopUpFile</span><span class=cF0>(tmpde->full_name);
|
|
<a name="l902"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l903"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l904"></a> }
|
|
<a name="l905"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l906"></a> {
|
|
<a name="l907"></a>fm_regular_key:
|
|
<a name="l908"></a> </span><span class=cF5>DocUnlock</span><span class=cF0>(doc);
|
|
<a name="l909"></a> </span><span class=cF5>PutKey</span><span class=cF0>(ch, sc);
|
|
<a name="l910"></a> </span><span class=cF5>DocLock</span><span class=cF0>(doc);
|
|
<a name="l911"></a> }
|
|
<a name="l912"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l913"></a> </span><span class=cF1>break</span><span class=cF0>;
|
|
<a name="l914"></a> }
|
|
<a name="l915"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l916"></a> </span><span class=cF1>while</span><span class=cF0> (ch != </span><span class=cF3>CH_ESC</span><span class=cF0> && ch != </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
|
|
<a name="l917"></a>
|
|
<a name="l918"></a> </span><span class=cFB>gr</span><span class=cF0>.fp_final_screen_update = </span><span class=cFB>fp_old_final_screen_update</span><span class=cF0>;
|
|
<a name="l919"></a> </span><span class=cF5>Fs</span><span class=cF0>->put_doc = old_put_doc;
|
|
<a name="l920"></a> </span><span class=cF5>Fs</span><span class=cF0>->display_doc = old_display_doc;
|
|
<a name="l921"></a> </span><span class=cF5>SettingsPop</span><span class=cF0>;
|
|
<a name="l922"></a> </span><span class=cF5>DocDel</span><span class=cF0>(doc);
|
|
<a name="l923"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(head);
|
|
<a name="l924"></a> </span><span class=cF5>Cd</span><span class=cF0>(old_cur_dir);
|
|
<a name="l925"></a> </span><span class=cF5>Free</span><span class=cF0>(old_cur_dir);
|
|
<a name="l926"></a> </span><span class=cF1>if</span><span class=cF0> (mode != </span><span class=cF3>FM_NORMAL</span><span class=cF0> && !res)
|
|
<a name="l927"></a> res = </span><span class=cF5>StrNew</span><span class=cF0>(</span><span class=cF6>""</span><span class=cF0>, mem_task);
|
|
<a name="l928"></a> </span><span class=cF5>MenuPop</span><span class=cF0>;
|
|
<a name="l929"></a>
|
|
<a name="l930"></a> </span><span class=cF1>return</span><span class=cF0> res;
|
|
<a name="l931"></a>}
|
|
</span></pre></body>
|
|
</html>
|