2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-08-17 07:47:37 +01:00
< meta name = "generator" content = "ZealOS V1.00" >
2021-07-03 05:07:57 +01:00
< style type = "text/css" >
2021-07-29 03:20:15 +01:00
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
2021-07-03 05:07:57 +01:00
< / style >
< / head >
< body >
2021-07-05 01:12:38 +01:00
< pre style = "font-family:monospace;font-size:12pt" >
2021-07-03 05:07:57 +01:00
< a name = "l1" > < / a > < span class = cF0 > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " DolDoc/Conversion" < / span > < span class = cF0 >
< a name = "l2" > < / a >
< a name = "l3" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > TXTPutS< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_col)
< a name = "l4" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l5" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *ch, *ptr;
2021-07-03 05:07:57 +01:00
< a name = "l6" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l7" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (ch = *st++)
< a name = "l8" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l9" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (ch)
< a name = "l10" > < / a > {
< a name = "l11" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '\t'< / span > < span class = cF0 > :
< a name = "l12" > < / a > < / span > < span class = cF1 > do< / span > < span class = cF0 >
< a name = "l13" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l14" > < / a > < / span > < span class = cF5 > DocPutKey< / span > < span class = cF0 > (doc, < / span > < span class = cF3 > CH_SPACE< / span > < span class = cF0 > , < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l15" > < / a > *_col = *_col + < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l16" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l17" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (*_col & < / span > < span class = cFE > 7< / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l18" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l19" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l20" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l21" > < / a > < / span > < span class = cF1 > start< / span > < span class = cF0 > :
< a name = "l22" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'pi'< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " pi" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l23" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'theta'< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " theta" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l24" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'phi'< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " phi" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l25" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'omega'< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " omega" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l26" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'inf'< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " inf" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l27" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > 'u'< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " u" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l28" > < / a > < / span > < span class = cF1 > end< / span > < span class = cF0 > :
< a name = "l29" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, ptr);
< a name = "l30" > < / a > *_col = *_col + < / span > < span class = cF5 > StrLen< / span > < span class = cF0 > (ptr);
< a name = "l31" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l32" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l33" > < / a > < / span > < span class = cF1 > default< / span > < span class = cF0 > :
< a name = "l34" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF3 > CH_SPACE< / span > < span class = cF0 > < = ch < < / span > < span class = cFE > 0x7F< / span > < span class = cF0 > || ch == < / span > < span class = cF6 > '\n'< / span > < span class = cF0 > )
< a name = "l35" > < / a > < / span > < span class = cF5 > DocPutKey< / span > < span class = cF0 > (doc, ch, < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l36" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l37" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " ." < / span > < span class = cF0 > );
< a name = "l38" > < / a > *_col = *_col + < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l39" > < / a > }
< a name = "l40" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l41" > < / a > }
< a name = "l42" > < / a >
< a name = "l43" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *< / span > < span class = cF5 > Doc2TXT< / span > < span class = cF0 > (< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc_in)
2021-07-26 20:29:49 +01:00
< a name = "l44" > < / a > {< / span > < span class = cF2 > //Convert < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/Doc/DolDocOverview.DD.html#l1" > < span class = cF4 > DolDoc< / span > < / a > < span class = cF2 > doc to plain text.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l45" > < / a > < / span > < span class = cF9 > CDocEntry< / span > < span class = cF0 > *doc_e, *doc_e2;
< a name = "l46" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > y, col;
< a name = "l47" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc_out = < / span > < span class = cF5 > DocNew< / span > < span class = cF0 > ;
< a name = "l48" > < / a > < / span > < span class = cF1 > Bool< / span > < span class = cF0 > unlock_doc_in = < / span > < span class = cF5 > DocLock< / span > < span class = cF0 > (doc_in), no_bwd, line_has_html_code = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l49" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l50" > < / a > < / span > < span class = cF5 > DocRecalc< / span > < span class = cF0 > (doc_in);
2021-07-03 05:07:57 +01:00
< a name = "l51" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l52" > < / a > doc_out-> flags |= < / span > < span class = cF3 > DOCF_PLAIN_TEXT< / span > < span class = cF0 > | < / span > < span class = cF3 > DOCF_NO_CURSOR< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l53" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l54" > < / a > doc_e = doc_in-> head.next;
< a name = "l55" > < / a > col = doc_e-> x;
< a name = "l56" > < / a > y = doc_e-> y;
< a name = "l57" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (doc_e != doc_in)
< a name = "l58" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l59" > < / 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_SKIP< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l60" > < / a > {
< a name = "l61" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (y < doc_e-> y)
< a name = "l62" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l63" > < / a > < / span > < span class = cF5 > TXTPutS< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " \n" < / span > < span class = cF0 > , & col);
< a name = "l64" > < / a > y++;
< a name = "l65" > < / a > col = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l66" > < / a > line_has_html_code = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l67" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l68" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> type_u8 == < / span > < span class = cF3 > DOCT_HTML_CODE< / span > < span class = cF0 > )
< a name = "l69" > < / a > line_has_html_code = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l70" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l71" > < / a > no_bwd = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l72" > < / a > doc_e2 = doc_e-> next;
< a name = "l73" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (doc_e2 != doc_in & & doc_e2-> y == doc_e-> y)
< a name = "l74" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l75" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e2-> x < doc_e-> x)
< a name = "l76" > < / a > {
< a name = "l77" > < / a > no_bwd = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l78" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l79" > < / a > }
< a name = "l80" > < / a > doc_e2 = doc_e2-> next;
< a name = "l81" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l82" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (no_bwd & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > doc_e-> type_u8 == < / span > < span class = cF3 > DOCT_NEW_LINE< / span > < span class = cF0 > & & line_has_html_code< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l83" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (col < doc_e-> x)
< a name = "l84" > < / a > < / span > < span class = cF5 > TXTPutS< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " " < / span > < span class = cF0 > , & col);
2021-07-03 05:07:57 +01:00
< a name = "l85" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l86" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (doc_e-> type_u8)
< a name = "l87" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l88" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_TEXT< / span > < span class = cF0 > :
< a name = "l89" > < / a > < / span > < span class = cF5 > TXTPutS< / span > < span class = cF0 > (doc_out, doc_e-> tag,& col);
< a name = "l90" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l91" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l92" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_TAB< / span > < span class = cF0 > :
< a name = "l93" > < / a > < / span > < span class = cF5 > TXTPutS< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " \t" < / span > < span class = cF0 > , & col);
< a name = "l94" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l95" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l96" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_HTML_CODE< / span > < span class = cF0 > :
< a name = "l97" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l98" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l99" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_SPRITE< / span > < span class = cF0 > :
< a name = "l100" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l101" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l102" > < / a > < / span > < span class = cF1 > default< / span > < span class = cF0 > :
< a name = "l103" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_TAG< / span > < span class = cF0 > )
< a name = "l104" > < / a > < / span > < span class = cF5 > TXTPutS< / span > < span class = cF0 > (doc_out, doc_e-> tag, & col);
< a name = "l105" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l106" > < / a > }
< a name = "l107" > < / a > doc_e = doc_e-> next;
< a name = "l108" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l109" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (y < doc_e-> y)
< a name = "l110" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l111" > < / a > < / span > < span class = cF5 > TXTPutS< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " \n" < / span > < span class = cF0 > , & col);
< a name = "l112" > < / a > y++;
< a name = "l113" > < / a > col = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l114" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l115" > < / a > doc_out-> cur_entry = & doc_out-> head;
< a name = "l116" > < / a > < / span > < span class = cF5 > DocRecalc< / span > < span class = cF0 > (doc_out);
2021-07-03 05:07:57 +01:00
< a name = "l117" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l118" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unlock_doc_in)
< a name = "l119" > < / a > < / span > < span class = cF5 > DocUnlock< / span > < span class = cF0 > (doc_in);
2021-07-03 05:07:57 +01:00
< a name = "l120" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l121" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > doc_out;
2021-07-03 05:07:57 +01:00
< a name = "l122" > < / a > }
< a name = "l123" > < / a >
< a name = "l124" > < / a > #< / span > < span class = cF1 > help_index< / span > < span class = cF0 > < / span > < span class = cF6 > " Cmd Line (Typically);DolDoc/Conversion;DolDoc/Cmd Line (Typically)" < / span > < span class = cF0 >
< a name = "l125" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > < / span > < span class = cF5 > ToTXT< / span > < span class = cF0 > (< / span > < span class = cF1 > U8< / span > < span class = cF0 > *_in_name, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *_out_name=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF9 > I64< / span > < span class = cF0 > width=< / span > < span class = cFE > 70< / span > < span class = cF0 > )
2021-07-26 20:29:49 +01:00
< a name = "l126" > < / a > {< / span > < span class = cF2 > //Convert < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/Doc/DolDocOverview.DD.html#l1" > < span class = cF4 > DolDoc< / span > < / a > < span class = cF2 > file to plain text.< / span > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l127" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *in_name, *out_name;
< a name = "l128" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc_in, *doc_out;
2021-07-03 05:07:57 +01:00
< a name = "l129" > < / a >
2021-07-26 20:29:49 +01:00
< a name = "l130" > < / a > < / span > < span class = cF5 > SettingsPush< / span > < span class = cF0 > ; < / span > < span class = cF2 > //See < / span > < a href = "https://zeal-operating-system.github.io/ZealOS/System/TaskSettings.CC.html#l3" > < span class = cF4 > SettingsPush< / span > < / a > < span class = cF0 >
2021-07-04 23:11:34 +01:00
< a name = "l131" > < / a > < / span > < span class = cF5 > WinHorz< / span > < span class = cF0 > (< / span > < span class = cFE > 0< / span > < span class = cF0 > , width - < / span > < span class = cFE > 1< / span > < span class = cF0 > ); < / span > < span class = cF2 > //Sets doc width for word wrap.< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l132" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l133" > < / a > in_name = < / span > < span class = cF5 > ExtDefault< / span > < span class = cF0 > (_in_name, < / span > < span class = cF6 > " .DD" < / span > < span class = cF0 > );
< a name = "l134" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (_out_name)
< a name = "l135" > < / a > out_name = < / span > < span class = cF5 > ExtDefault< / span > < span class = cF0 > (_out_name, < / span > < span class = cF6 > " TXT" < / span > < span class = cF0 > );
< a name = "l136" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l137" > < / a > out_name = < / span > < span class = cF5 > ExtChange< / span > < span class = cF0 > (_in_name, < / span > < span class = cF6 > " TXT" < / span > < span class = cF0 > );
2021-07-03 05:07:57 +01:00
< a name = "l138" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l139" > < / a > doc_in = < / span > < span class = cF5 > DocRead< / span > < span class = cF0 > (in_name);
< a name = "l140" > < / a > doc_out = < / span > < span class = cF5 > Doc2TXT< / span > < span class = cF0 > (doc_in);
< a name = "l141" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (& doc_out-> filename.name, out_name);
2021-07-03 05:07:57 +01:00
< a name = "l142" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l143" > < / a > < / span > < span class = cF5 > SettingsPop< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l144" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l145" > < / a > < / span > < span class = cF5 > DocWrite< / span > < span class = cF0 > (doc_out);
< a name = "l146" > < / a > < / span > < span class = cF5 > DocDel< / span > < span class = cF0 > (doc_in);
< a name = "l147" > < / a > < / span > < span class = cF5 > DocDel< / span > < span class = cF0 > (doc_out);
< a name = "l148" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (in_name);
< a name = "l149" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (out_name);
2021-07-03 05:07:57 +01:00
< a name = "l150" > < / a > }
< / span > < / pre > < / body >
< / html >