2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html;charset=US-ASCII" >
2021-07-25 09:07:40 +01:00
< meta name = "generator" content = "ZealOS V0.10" >
2021-07-03 05:07:57 +01:00
< 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 >
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 >
2021-07-05 01:57:09 +01:00
< a name = "l3" > < / a > < / span > < span class = cF2 > //See < / span > < a href = "https://tomawezome.github.io/ZealOS/Doc/Credits.DD.html#l1" > < span class = cF4 > ::/Doc/Credits.DD< / span > < / a > < span class = cF2 > .< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l4" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l5" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > DOCET_UNDEF_COLOR < / span > < span class = cFE > 0x100000000< / span > < span class = cF0 >
< a name = "l6" > < / a > #< / span > < span class = cF1 > define< / span > < span class = cF0 > DOCET_LINK_UNDERLINE < / span > < span class = cFE > 0x200000000< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l7" > < / a > < / span > < span class = cF1 > U0< / span > < span class = cF0 > HtmlPutS(< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc, < / span > < span class = cF9 > I64< / span > < span class = cF0 > u32_attr, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_old_u32_attr, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > underline_update, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st, < / span > < span class = cF9 > I64< / span > < span class = cF0 > *_col, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *style_bitmap=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > )
< a name = "l8" > < / a > {
2021-07-04 23:11:34 +01:00
< a name = "l9" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *ch, *ptr;
2021-07-03 05:07:57 +01:00
< a name = "l10" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l11" > < / a > u32_attr & = < / span > < span class = cFE > 0xFFFFFF00< / span > < span class = cF0 > ;
< a name = "l12" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (u32_attr & < / span > < span class = cF3 > DOCET_INVERT< / span > < span class = cF0 > )
< a name = "l13" > < / a > u32_attr.u8[< / span > < span class = cFE > 1< / span > < span class = cF0 > ] = (u32_attr.u8[< / span > < span class = cFE > 1< / span > < span class = cF0 > ] & < / span > < span class = cFE > 15< / span > < span class = cF0 > ) < < < / span > < span class = cFE > 4< / span > < span class = cF0 > | u32_attr.u8[< / span > < span class = cFE > 1< / span > < span class = cF0 > ] > > < / span > < span class = cFE > 4< / span > < span class = cF0 > ;
< a name = "l14" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (underline_update & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF7 > )< / span > < span class = cF0 > & & *_old_u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > )
< a name = "l15" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l16" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > *_old_u32_attr & DOCET_LINK_UNDERLINE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l17" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < /u> " < / span > < span class = cF0 > );
< a name = "l18" > < / a > *_old_u32_attr & = ~DOCET_LINK_UNDERLINE;
< a name = "l19" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l20" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF7 > )< / span > < span class = cF0 > & & *_old_u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF0 > )
< a name = "l21" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < /blink> " < / span > < span class = cF0 > );
< a name = "l22" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (u32_attr & < / span > < span class = cFE > 0xFF00< / span > < span class = cF0 > != *_old_u32_attr & < / span > < span class = cFE > 0xFF00< / span > < span class = cF0 > )
< a name = "l23" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l24" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > *_old_u32_attr & DOCET_UNDEF_COLOR< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l25" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < /span> " < / span > < span class = cF0 > );
< a name = "l26" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < span class=c%02X> " < / span > < span class = cF0 > , u32_attr.u8[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]);
< a name = "l27" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (style_bitmap)
< a name = "l28" > < / a > < / span > < span class = cF5 > LBts< / span > < span class = cF0 > (style_bitmap, u32_attr.u8[< / span > < span class = cFE > 1< / span > < span class = cF0 > ]);
< a name = "l29" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l30" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF0 > & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > *_old_u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l31" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < blink> " < / span > < span class = cF0 > );
< a name = "l32" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (underline_update)
< a name = "l33" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l34" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > *_old_u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l35" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " < u> " < / span > < span class = cF0 > );
< a name = "l36" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l37" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF2 > //Keep same underline status.< / span > < span class = cF0 >
< a name = "l38" > < / a > u32_attr = u32_attr & ~< / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > | *_old_u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l39" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l40" > < / a > *_old_u32_attr = u32_attr | *_old_u32_attr & DOCET_LINK_UNDERLINE;
2021-07-03 05:07:57 +01:00
< a name = "l41" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l42" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (ch = *st++)
< a name = "l43" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l44" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (ch)
< a name = "l45" > < / a > {
< a name = "l46" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '\t'< / span > < span class = cF0 > :
< a name = "l47" > < / a > < / span > < span class = cF1 > do< / span > < span class = cF0 >
< a name = "l48" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l49" > < / 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 = "l50" > < / a > *_col = *_col + < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l51" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l52" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (*_col & < / span > < span class = cFE > 3< / span > < span class = cF0 > );
< a name = "l53" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l54" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l55" > < / a > < / span > < span class = cF1 > start< / span > < span class = cF0 > :
< a name = "l56" > < / 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 = "l57" > < / 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 = "l58" > < / 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 = "l59" > < / 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 = "l60" > < / 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 = "l61" > < / 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 = "l62" > < / a > < / span > < span class = cF1 > end< / span > < span class = cF0 > :
< a name = "l63" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, ptr);
< a name = "l64" > < / a > *_col = *_col + < / span > < span class = cF5 > StrLen< / span > < span class = cF0 > (ptr);
< a name = "l65" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l66" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l67" > < / a > < / span > < span class = cF1 > start< / span > < span class = cF0 > :
< a name = "l68" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '& '< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " & amp;" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l69" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '< '< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " & lt;" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l70" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '> '< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " & gt;" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l71" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF6 > '" '< / span > < span class = cF0 > : ptr = < / span > < span class = cF6 > " & quot;" < / span > < span class = cF0 > ; < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l72" > < / a > < / span > < span class = cF1 > end< / span > < span class = cF0 > :
< a name = "l73" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, ptr);
< a name = "l74" > < / a > *_col = *_col + < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l75" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l76" > < / a >
2021-07-04 23:11:34 +01:00
< a name = "l77" > < / a > < / span > < span class = cF1 > default< / span > < span class = cF0 > :
< a name = "l78" > < / 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 = "l79" > < / a > < / span > < span class = cF5 > DocPutKey< / span > < span class = cF0 > (doc, ch, < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l80" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l81" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc, < / span > < span class = cF6 > " ." < / span > < span class = cF0 > );
< a name = "l82" > < / a > *_col = *_col + < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l83" > < / a > }
< a name = "l84" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
2021-07-03 05:07:57 +01:00
< a name = "l85" > < / a > }
< a name = "l86" > < / a >
< a name = "l87" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *TOSLinkConvert2(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *filename, < / span > < span class = cF9 > I64< / span > < span class = cF0 > line_num)
< a name = "l88" > < / a > {< / span > < span class = cF2 > // ::/ --> http://www.templeos.org/Wb/< / span > < span class = cF0 >
< a name = "l89" > < / a > < / span > < span class = cF2 > //Make your own LinkConvert routine< / span > < span class = cF0 >
2021-07-05 01:57:09 +01:00
< a name = "l90" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *res = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > , *st1, *st2, extension[< / span > < span class = cF3 > STR_LEN< / 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 > if< / span > < span class = cF0 > (filename)
< a name = "l93" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
2021-07-05 01:57:09 +01:00
< a name = "l94" > < / a > st1 = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (filename);
< a name = "l95" > < / a > < / span > < span class = cF5 > FileExtRemove< / span > < span class = cF0 > (st1, extension);
< a name = "l96" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > StrCompare< / span > < span class = cF7 > (< / span > < span class = cF0 > extension, < / span > < span class = cF6 > " html" < / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l97" > < / a > st2 = < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " %s.%s.html" < / span > < span class = cF0 > , st1, extension);
< a name = "l98" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l99" > < / a > st2 = < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " %s.html" < / span > < span class = cF0 > , st1);
< a name = "l100" > < / a >
< a name = "l101" > < / a > < / span > < span class = cF2 > //< / span > < span class = cF0 > < / span > < span class = cF2 > st = ExtChange(filename, " html" );< / span > < span class = cF0 >
< a name = "l102" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (st2 & & < / span > < span class = cF5 > StrLen< / span > < span class = cF7 > (< / span > < span class = cF0 > st2< / span > < span class = cF7 > )< / span > < span class = cF0 > > < / span > < span class = cFE > 3< / span > < span class = cF0 > & & !< / span > < span class = cF5 > StrNCompare< / span > < span class = cF7 > (< / span > < span class = cF0 > st2 + < / span > < span class = cFE > 1< / span > < span class = cF0 > , < / span > < span class = cF6 > " :/" < / span > < span class = cF0 > , < / span > < span class = cFE > 2< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l103" > < / a > res = < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " https://tomawezome.github.io/ZealOS/%s#l%d" < / span > < span class = cF0 > , st2 + < / span > < span class = cFE > 3< / span > < span class = cF0 > , line_num);
< a name = "l104" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st1);
< a name = "l105" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st2);
< a name = "l106" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l107" > < / a >
< a name = "l108" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
< a name = "l109" > < / a > }
< a name = "l110" > < / a >
< a name = "l111" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *URLBibleGateway(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *src)
< a name = "l112" > < / a > {
< a name = "l113" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > buf[< / span > < span class = cF3 > STR_LEN< / span > < span class = cF0 > ], *dst = buf;
< a name = "l114" > < / a >
< a name = "l115" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF5 > MemCompare< / span > < span class = cF7 > (< / span > < span class = cF0 > src, < / span > < span class = cF6 > " BF:" < / span > < span class = cF0 > , < / span > < span class = cFE > 3< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l116" > < / a > src += < / span > < span class = cFE > 3< / span > < span class = cF0 > ;
< a name = "l117" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (*src)
< a name = "l118" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l119" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (*src == < / span > < span class = cF3 > CH_SPACE< / span > < span class = cF0 > || *src == < / span > < span class = cF6 > ','< / span > < span class = cF0 > )
< a name = "l120" > < / a > *dst++ = < / span > < span class = cF6 > '+'< / span > < span class = cF0 > ;
< a name = "l121" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l122" > < / a > *dst++ = *src;
< a name = "l123" > < / a > src++;
< a name = "l124" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l125" > < / a > *dst = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l126" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > StrOcc< / span > < span class = cF7 > (< / span > < span class = cF0 > buf, < / span > < span class = cF6 > '-'< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l127" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " http://www.biblegateway.com/passage/?search=%s& version=NIV" < / span > < span class = cF0 > , buf);
< a name = "l128" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l129" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > < / span > < span class = cF5 > MStrPrint< / span > < span class = cF0 > (< / span > < span class = cF6 > " http://www.biblegateway.com/verse/en/%s" < / span > < span class = cF0 > , buf);
< a name = "l130" > < / a > }
< a name = "l131" > < / a >
< a name = "l132" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *TOSLinkConvert1(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *link_st)
< a name = "l133" > < / a > {
< a name = "l134" > < / a > < / span > < span class = cF1 > static< / span > < span class = cF0 > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *bible=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l135" > < / a > < / span > < span class = cF1 > static< / span > < span class = cF0 > < / span > < span class = cF9 > I64< / span > < span class = cF0 > locks=< / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l136" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *res=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , *filename, *needle;
< a name = "l137" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, num;
< a name = "l138" > < / a >
< a name = "l139" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (link_st)
< a name = "l140" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l141" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (i = < / span > < span class = cF5 > EdLinkConvert< / span > < span class = cF7 > (< / span > < span class = cF0 > link_st, & filename, & needle, & num< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l142" > < / a > {
< a name = "l143" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_FILE_LINE< / span > < span class = cF0 > :
< a name = "l144" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_PLAIN_LINE< / span > < span class = cF0 > :
< a name = "l145" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_FILE< / span > < span class = cF0 > :
< a name = "l146" > < / a > res = TOSLinkConvert2(filename, num);
< a name = "l147" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l148" > < / a >
< a name = "l149" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > -< / span > < span class = cFE > 1< / span > < span class = cF0 > :
< a name = "l150" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_DEF< / span > < span class = cF0 > :
< a name = "l151" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_HELP_INDEX< / span > < span class = cF0 > :
< a name = "l152" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_DOC< / span > < span class = cF0 > :
< a name = "l153" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_DOC_ANCHOR< / span > < span class = cF0 > :
< a name = "l154" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_DOC_FIND< / span > < span class = cF0 > :
< a name = "l155" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_DOC_LINE< / span > < span class = cF0 > :
< a name = "l156" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l157" > < / a >
< a name = "l158" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > LK_BIBLE_FIND< / span > < span class = cF0 > :
< a name = "l159" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (< / span > < span class = cF5 > LBts< / span > < span class = cF7 > (< / span > < span class = cF0 > & locks, < / span > < span class = cFE > 0< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l160" > < / a > < / span > < span class = cF5 > Yield< / span > < span class = cF0 > ;
< a name = "l161" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!bible)
< a name = "l162" > < / a > bible = < / span > < span class = cF5 > Sys< / span > < span class = cF0 > (< / span > < span class = cF6 > " DocRead(\" %s\" );" < / span > < span class = cF0 > , filename);
< a name = "l163" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > DocFind< / span > < span class = cF7 > (< / span > < span class = cF0 > bible, num, needle< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l164" > < / a > res = URLBibleGateway(link_st);
< a name = "l165" > < / a > < / span > < span class = cF5 > LBtr< / span > < span class = cF0 > (& locks, < / span > < span class = cFE > 0< / span > < span class = cF0 > );
< a name = "l166" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
2021-07-03 05:07:57 +01:00
< a name = "l167" > < / a >
2021-07-05 01:57:09 +01:00
< a name = "l168" > < / a > < / span > < span class = cF1 > default< / span > < span class = cF0 > :
< a name = "l169" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > DocFileEd< / span > < span class = cF7 > (< / span > < span class = cF0 > i, filename, needle, & num, < / span > < span class = cF3 > EDF_UNCOLLAPSE< / span > < span class = cF0 > | < / span > < span class = cF3 > EDF_BAIL< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l170" > < / a > res = TOSLinkConvert2(filename, num);
< a name = "l171" > < / a > }
< a name = "l172" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (filename);
< a name = "l173" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (needle);
< a name = "l174" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l175" > < / a >
< a name = "l176" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > res;
< a name = "l177" > < / a > }
< a name = "l178" > < / a >
< a name = "l179" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *Doc2Html(< / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc_in, < / span > < span class = cF1 > U8< / span > < span class = cF0 > *html_header=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *body_header=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > ,
< a name = "l180" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *body_footer=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *html_footer=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF1 > Bool< / span > < span class = cF0 > line_anchors=< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ,
< a name = "l181" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > < / span > < span class = cF7 > (< / span > < span class = cF0 > *link_convert< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *link_st< / span > < span class = cF7 > )< / span > < span class = cF0 > =& TOSLinkConvert1, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > line_nums=< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > )
< a name = "l182" > < / a > {< / span > < span class = cF2 > //Convert < / span > < a href = "https://tomawezome.github.io/ZealOS/Doc/DolDocOverview.DD.html#l1" > < span class = cF4 > DolDoc< / span > < / a > < span class = cF2 > doc to HTML file.< / span > < span class = cF0 >
< a name = "l183" > < / a > < / span > < span class = cF9 > CDocEntry< / span > < span class = cF0 > *doc_e, *style, *doc_e2;
< a name = "l184" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > i, y, old_y = < / span > < span class = cF3 > I64_MIN< / span > < span class = cF0 > , col, old_u32_attr = DOCET_UNDEF_COLOR, old_attr, digits;
< a name = "l185" > < / a > < / span > < span class = cF9 > U32< / span > < span class = cF0 > *hl, *src;
< a name = "l186" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *st, st_2[< / span > < span class = cFE > 2< / span > < span class = cF0 > ], *link_st, *style_bitmap = < / span > < span class = cF5 > CAlloc< / span > < span class = cF0 > (< / span > < span class = cFE > 256< / span > < span class = cF0 > / < / span > < span class = cFE > 8< / span > < span class = cF0 > );
< a name = "l187" > < / a > < / span > < span class = cF9 > CBGR24< / span > < span class = cF0 > p[< / span > < span class = cF3 > COLORS_NUM< / span > < span class = cF0 > ];
< a name = "l188" > < / a > < / span > < span class = cF5 > GrPaletteGet< / span > < span class = cF0 > (p);
< a name = "l189" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc_out = < / span > < span class = cF5 > DocNew< / span > < span class = cF0 > ;
< a name = "l190" > < / 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;
2021-07-03 05:07:57 +01:00
< a name = "l191" > < / a >
2021-07-05 01:57:09 +01:00
< a name = "l192" > < / a > old_attr = doc_in-> win_task-> text_attr;
< a name = "l193" > < / a > doc_in-> win_task-> text_attr = < / span > < span class = cF3 > DOC_ATTR_DEFAULT_TEXT< / span > < span class = cF0 > ;
< a name = "l194" > < / a >
< a name = "l195" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0xF0< / span > < span class = cF0 > ; i < = < / span > < span class = cFE > 0xFF< / span > < span class = cF0 > ; i++)
< a name = "l196" > < / a > < / span > < span class = cF5 > LBts< / span > < span class = cF0 > (style_bitmap, i);
2021-07-03 05:07:57 +01:00
< a name = "l197" > < / a >
2021-07-05 01:57:09 +01:00
< a name = "l198" > < / a > < / span > < span class = cF5 > DocRecalc< / span > < span class = cF0 > (doc_in, < / span > < span class = cF3 > RECALCt_NORMAL< / span > < span class = cF0 > | < / span > < span class = cF3 > RECALCF_TO_HTML< / span > < span class = cF0 > );
< a name = "l199" > < / a >
< a name = "l200" > < / a > digits = < / span > < span class = cF5 > Log10< / span > < span class = cF0 > (doc_in-> head.last-> y + < / span > < span class = cFE > 1< / span > < span class = cF0 > ) + < / span > < span class = cFE > 1< / span > < span class = cF0 > ;
< a name = "l201" > < / a >
< a name = "l202" > < / a > st_2[< / span > < span class = cFE > 0< / span > < span class = cF0 > ] = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l203" > < / a > st_2[< / span > < span class = cFE > 1< / span > < span class = cF0 > ] = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l204" > < / 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 > ;
< a name = "l205" > < / a >
< a name = "l206" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!html_header)
< a name = "l207" > < / a > html_header =
< a name = "l208" > < / a > < / span > < span class = cF6 > " < !DOCTYPE HTML> \n" < / span > < span class = cF0 >
< a name = "l209" > < / a > < / span > < span class = cF6 > " < html> \n" < / span > < span class = cF0 >
< a name = "l210" > < / a > < / span > < span class = cF6 > " < head> \n" < / span > < span class = cF0 >
< a name = "l211" > < / a > < / span > < span class = cF6 > " < meta http-equiv=\" Content-Type\" " < / span > < span class = cF0 >
< a name = "l212" > < / a > < / span > < span class = cF6 > " content=\" text/html;charset=US-ASCII\" > \n" < / span > < span class = cF0 >
2021-07-25 09:07:40 +01:00
< a name = "l213" > < / a > < / span > < span class = cF6 > " < meta name=\" generator\" content=\" ZealOS V0.10\" > \n" < / span > < span class = cF0 > ;
2021-07-05 01:57:09 +01:00
< a name = "l214" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!body_header)
< a name = "l215" > < / a > body_header =
< a name = "l216" > < / a > < / span > < span class = cF6 > " < body> \n" < / span > < span class = cF0 >
< a name = "l217" > < / a > < / span > < span class = cF6 > " < pre style=\" font-family:monospace;font-size:12pt\" > \n" < / span > < span class = cF0 > ;
< a name = "l218" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!body_footer)
< a name = "l219" > < / a > body_footer =
< a name = "l220" > < / a > < / span > < span class = cF6 > " < /pre> < /body> \n" < / span > < span class = cF0 > ;
< a name = "l221" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!html_footer)
< a name = "l222" > < / a > html_footer =
< a name = "l223" > < / a > < / span > < span class = cF6 > " < /html> \n" < / span > < span class = cF0 > ;
< a name = "l224" > < / a >
< a name = "l225" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " %s" < / span > < span class = cF0 > , html_header);
< a name = "l226" > < / a >
< a name = "l227" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < style type=\" text/css\" > \n" < / span > < span class = cF0 > );
< a name = "l228" > < / a > style = doc_out-> cur_entry-> last;
< a name = "l229" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out,
< a name = "l230" > < / a > < / span > < span class = cF6 > " < /style> \n" < / span > < span class = cF0 >
< a name = "l231" > < / a > < / span > < span class = cF6 > " < /head> \n" < / span > < span class = cF0 > );
< a name = "l232" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " %s" < / span > < span class = cF0 > , body_header);
< a name = "l233" > < / a >
< a name = "l234" > < / a > doc_e = doc_in-> head.next;
< a name = "l235" > < / a > col = doc_e-> x;
< a name = "l236" > < / a > y = doc_e-> y;
< a name = "l237" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (doc_e != doc_in)
< a name = "l238" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l239" > < / 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 = "l240" > < / a > {
< a name = "l241" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (y != old_y)
2021-07-04 23:11:34 +01:00
< a name = "l242" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
2021-07-05 01:57:09 +01:00
< a name = "l243" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (line_anchors)
< a name = "l244" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < a name=\" l%d\" > < /a> " < / span > < span class = cF0 > , y + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l245" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (line_nums)
< a name = "l246" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " %0*d " < / span > < span class = cF0 > , digits, y + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l247" > < / a > old_y = y;
< a name = "l248" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l249" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (y < doc_e-> y)
< a name = "l250" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l251" > < / a > HtmlPutS(doc_out, doc_e-> settings.final_u32_attr, & old_u32_attr, < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > , < / span > < span class = cF6 > " \n" < / span > < span class = cF0 > , & col, style_bitmap);
< a name = "l252" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (++y != old_y)
< a name = "l253" > < / a > {
< a name = "l254" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (line_anchors)
< a name = "l255" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < a name=\" l%d\" > < /a> " < / span > < span class = cF0 > , y + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l256" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (line_nums)
< a name = "l257" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " %0*d " < / span > < span class = cF0 > , digits, y + < / span > < span class = cFE > 1< / span > < span class = cF0 > );
< a name = "l258" > < / a > old_y = y;
< a name = "l259" > < / a > }
< a name = "l260" > < / a > col = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l261" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l262" > < / a >
< a name = "l263" > < / a > no_bwd = < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ;
< a name = "l264" > < / a > doc_e2 = doc_e-> next;
< a name = "l265" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (doc_e2 != doc_in & & doc_e2-> y == doc_e-> y)
< a name = "l266" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l267" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e2-> x < doc_e-> x)
< a name = "l268" > < / a > {
< a name = "l269" > < / a > no_bwd = < / span > < span class = cF3 > FALSE< / span > < span class = cF0 > ;
< a name = "l270" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l271" > < / a > }
< a name = "l272" > < / a > doc_e2 = doc_e2-> next;
< a name = "l273" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l274" > < / a >
< a name = "l275" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (no_bwd)
< a name = "l276" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (col < doc_e-> x)
< a name = "l277" > < / a > HtmlPutS(doc_out,
< a name = "l278" > < / a > doc_e-> settings.final_u32_attr & ~< / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > , & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > , < / span > < span class = cF6 > " " < / span > < span class = cF0 > , & col, style_bitmap);
< a name = "l279" > < / a >
< a name = "l280" > < / a > link_st = < / span > < span class = cF3 > NULL< / span > < span class = cF0 > ;
< a name = "l281" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_HTML_LINK< / span > < span class = cF0 > )
< a name = "l282" > < / a > link_st = < / span > < span class = cF5 > StrNew< / span > < span class = cF0 > (doc_e-> html_link);
< a name = "l283" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 > < / span > < span class = cF1 > if< / span > < span class = cF0 > (st = < / span > < span class = cF5 > DocEntryLink< / span > < span class = cF7 > (< / span > < span class = cF0 > doc_in, doc_e< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l284" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l285" > < / a > link_st = link_convert(st);
< a name = "l286" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (st);
< a name = "l287" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l288" > < / a >
< a name = "l289" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (link_st)
< a name = "l290" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l291" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_LINK_UNDERLINE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l292" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /u> " < / span > < span class = cF0 > );
< a name = "l293" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF0 > )
< a name = "l294" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /blink> " < / span > < span class = cF0 > );
< a name = "l295" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_UNDEF_COLOR< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l296" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /span> " < / span > < span class = cF0 > );
< a name = "l297" > < / a > old_u32_attr = DOCET_UNDEF_COLOR | < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > | DOCET_LINK_UNDERLINE;
< a name = "l298" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < a href=\" %s\" > " < / span > < span class = cF0 > , link_st);
< a name = "l299" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l300" > < / a >
< a name = "l301" > < / a > < / span > < span class = cF1 > switch< / span > < span class = cF0 > (doc_e-> type_u8)
< a name = "l302" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l303" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_TEXT< / span > < span class = cF0 > :
< a name = "l304" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> de_flags & < / span > < span class = cF3 > DOCEF_HIGHLIGHT< / span > < span class = cF0 > )
< a name = "l305" > < / a > {
< a name = "l306" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (doc_e-> last == doc_in)
< a name = "l307" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (& doc_e-> settings, & doc_in-> settings_head, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CDocSettings< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l308" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l309" > < / a > < / span > < span class = cF5 > MemCopy< / span > < span class = cF0 > (& doc_e-> settings, & doc_e-> last-> settings, < / span > < span class = cF1 > sizeof< / span > < span class = cF7 > (< / span > < span class = cF9 > CDocSettings< / span > < span class = cF7 > )< / span > < span class = cF0 > );
< a name = "l310" > < / a > src = hl = < / span > < span class = cF5 > DocHighlight< / span > < span class = cF0 > (doc_e, doc_e-> tag, < / span > < span class = cF5 > StrLen< / span > < span class = cF7 > (< / span > < span class = cF0 > doc_e-> tag< / span > < span class = cF7 > )< / span > < span class = cF0 > , doc_e-> type & < / span > < span class = cFE > 0xFF00< / span > < span class = cF0 > );
< a name = "l311" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (*src)
< a name = "l312" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l313" > < / a > st_2[< / span > < span class = cFE > 0< / span > < span class = cF0 > ] = *src & < / span > < span class = cFE > 0xFF< / span > < span class = cF0 > ;
< a name = "l314" > < / a > HtmlPutS(doc_out, *src++, & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > , st_2, & col, style_bitmap);
< a name = "l315" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l316" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (hl);
< a name = "l317" > < / a > }
< a name = "l318" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l319" > < / a > HtmlPutS(doc_out,
< a name = "l320" > < / a > doc_e-> settings.final_u32_attr, & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > , doc_e-> tag, & col, style_bitmap);
< a name = "l321" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l322" > < / a >
< a name = "l323" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_TAB< / span > < span class = cF0 > :
< a name = "l324" > < / a > HtmlPutS(doc_out, doc_e-> settings.final_u32_attr, & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > , < / span > < span class = cF6 > " \t" < / span > < span class = cF0 > , & col, style_bitmap);
< a name = "l325" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l326" > < / a >
< a name = "l327" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_HTML_CODE< / span > < span class = cF0 > :
< a name = "l328" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_LINK_UNDERLINE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l329" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /u> " < / span > < span class = cF0 > );
< a name = "l330" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF0 > )
< a name = "l331" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /blink> " < / span > < span class = cF0 > );
< a name = "l332" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_UNDEF_COLOR< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l333" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /span> " < / span > < span class = cF0 > );
< a name = "l334" > < / a > old_u32_attr = DOCET_UNDEF_COLOR;
< a name = "l335" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " %s" < / span > < span class = cF0 > , doc_e-> tag);
< a name = "l336" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l337" > < / a >
< a name = "l338" > < / a > < / span > < span class = cF1 > case< / span > < span class = cF0 > < / span > < span class = cF3 > DOCT_SPRITE< / span > < span class = cF0 > :
< a name = "l339" > < / a > HtmlPutS(doc_out, doc_e-> settings.final_u32_attr, & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > , doc_e-> tag, & col, style_bitmap);
< a name = "l340" > < / a > HtmlPutS(doc_out, doc_e-> settings.final_u32_attr, & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ,
< a name = "l341" > < / a > < / span > < span class = cF6 > " /* Graphics Not Rendered in HTML */" < / span > < span class = cF0 > , & col, style_bitmap);
< a name = "l342" > < / a > < / span > < span class = cF1 > break< / span > < span class = cF0 > ;
< a name = "l343" > < / a >
< a name = "l344" > < / a > < / span > < span class = cF1 > default< / span > < span class = cF0 > :
< a name = "l345" > < / 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 = "l346" > < / a > HtmlPutS(doc_out,
< a name = "l347" > < / a > doc_e-> settings.final_u32_attr, & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > , doc_e-> tag, & col, style_bitmap);
< a name = "l348" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l349" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (link_st)
< a name = "l350" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l351" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_LINK_UNDERLINE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l352" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /u> " < / span > < span class = cF0 > );
< a name = "l353" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF0 > )
< a name = "l354" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /blink> " < / span > < span class = cF0 > );
< a name = "l355" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_UNDEF_COLOR< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l356" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /span> " < / span > < span class = cF0 > );
< a name = "l357" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /a> " < / span > < span class = cF0 > );
< a name = "l358" > < / a > old_u32_attr = DOCET_UNDEF_COLOR | < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > | DOCET_LINK_UNDERLINE;
< a name = "l359" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (link_st);
< a name = "l360" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l361" > < / a > }
< a name = "l362" > < / a > doc_e = doc_e-> next;
< a name = "l363" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l364" > < / a > < / span > < span class = cF1 > while< / span > < span class = cF0 > (y++ < doc_e-> y)
< a name = "l365" > < / a > < / span > < span class = cF7 > {< / span > < span class = cF0 >
< a name = "l366" > < / a > HtmlPutS(doc_out, doc_e-> settings.final_u32_attr, & old_u32_attr, < / span > < span class = cF3 > TRUE< / span > < span class = cF0 > , < / span > < span class = cF6 > " \n" < / span > < span class = cF0 > , & col, style_bitmap);
< a name = "l367" > < / a > col = < / span > < span class = cFE > 0< / span > < span class = cF0 > ;
< a name = "l368" > < / a > < / span > < span class = cF7 > }< / span > < span class = cF0 >
< a name = "l369" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_UNDERLINE< / span > < span class = cF0 > & & !< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_LINK_UNDERLINE< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l370" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /u> " < / span > < span class = cF0 > );
< a name = "l371" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (old_u32_attr & < / span > < span class = cF3 > DOCET_BLINK< / span > < span class = cF0 > )
< a name = "l372" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /blink> " < / span > < span class = cF0 > );
< a name = "l373" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (!< / span > < span class = cF7 > (< / span > < span class = cF0 > old_u32_attr & DOCET_UNDEF_COLOR< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l374" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " < /span> " < / span > < span class = cF0 > );
< a name = "l375" > < / a > old_u32_attr = DOCET_UNDEF_COLOR;
< a name = "l376" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " %s" < / span > < span class = cF0 > , body_footer);
< a name = "l377" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " %s" < / span > < span class = cF0 > , html_footer);
< a name = "l378" > < / a >
< a name = "l379" > < / a > doc_out-> cur_entry = style-> next;
< a name = "l380" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out, < / span > < span class = cF6 > " body {background-color:#%02x%02x%02x;}\n" < / span > < span class = cF0 > , p[< / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ].r, p[< / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ].g, p[< / span > < span class = cF3 > WHITE< / span > < span class = cF0 > ].b);
< a name = "l381" > < / a > < / span > < span class = cF1 > for< / span > < span class = cF0 > (i = < / span > < span class = cFE > 0< / span > < span class = cF0 > ; i < < / span > < span class = cFE > 256< / span > < span class = cF0 > ; i++)
< a name = "l382" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (< / span > < span class = cF5 > Bt< / span > < span class = cF7 > (< / span > < span class = cF0 > style_bitmap, i< / span > < span class = cF7 > )< / span > < span class = cF0 > )
< a name = "l383" > < / a > < / span > < span class = cF5 > DocPrint< / span > < span class = cF0 > (doc_out,
< a name = "l384" > < / a > < / span > < span class = cF6 > " .c%02X{color:#%02x%02x%02x;background-color:#%02x%02x%02x;}\n" < / span > < span class = cF0 > ,
< a name = "l385" > < / a > i, p[i & < / span > < span class = cFE > 15< / span > < span class = cF0 > ].r, p[i & < / span > < span class = cFE > 15< / span > < span class = cF0 > ].g, p[i & < / span > < span class = cFE > 15< / span > < span class = cF0 > ].b,
< a name = "l386" > < / a > p[i/< / span > < span class = cFE > 16< / span > < span class = cF0 > ].r, p[i / < / span > < span class = cFE > 16< / span > < span class = cF0 > ].g, p[i / < / span > < span class = cFE > 16< / span > < span class = cF0 > ].b);
< a name = "l387" > < / a > doc_out-> cur_entry = & doc_out-> head;
< a name = "l388" > < / a > < / span > < span class = cF5 > DocRecalc< / span > < span class = cF0 > (doc_out);
2021-07-03 05:07:57 +01:00
< a name = "l389" > < / a >
2021-07-05 01:57:09 +01:00
< a name = "l390" > < / a > doc_in-> win_task-> text_attr = old_attr;
< a name = "l391" > < / a >
< a name = "l392" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (unlock_doc_in)
< a name = "l393" > < / a > < / span > < span class = cF5 > DocUnlock< / span > < span class = cF0 > (doc_in);
< a name = "l394" > < / a >
< a name = "l395" > < / a > < / span > < span class = cF1 > return< / span > < span class = cF0 > doc_out;
< a name = "l396" > < / a > }
< a name = "l397" > < / a >
< a name = "l398" > < / 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 = "l399" > < / a > < / span > < span class = cF1 > public< / span > < span class = cF0 > < / span > < span class = cF1 > U0< / span > < span class = cF0 > ToHtml(< / 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 = cF1 > U8< / span > < span class = cF0 > *html_header=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > ,
< a name = "l400" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *body_header=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *body_footer=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > , < / span > < span class = cF1 > U8< / span > < span class = cF0 > *html_footer=< / span > < span class = cF3 > NULL< / span > < span class = cF0 > ,
< a name = "l401" > < / a > < / span > < span class = cF9 > I64< / span > < span class = cF0 > width=< / span > < span class = cFE > 128< / span > < span class = cF0 > , < / span > < span class = cF1 > Bool< / span > < span class = cF0 > line_anchors=< / span > < span class = cF3 > TRUE< / span > < span class = cF0 > ,
< a name = "l402" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > < / span > < span class = cF7 > (< / span > < span class = cF0 > *link_convert< / span > < span class = cF7 > )(< / span > < span class = cF1 > U8< / span > < span class = cF0 > *link_st< / span > < span class = cF7 > )< / span > < span class = cF0 > =& TOSLinkConvert1, < / span > < span class = cF1 > Bool< / span > < span class = cF0 > line_nums=< / span > < span class = cF3 > FALSE< / span > < span class = cF0 > )
< a name = "l403" > < / a > {< / span > < span class = cF2 > //Convert < / span > < a href = "https://tomawezome.github.io/ZealOS/Doc/DolDocOverview.DD.html#l1" > < span class = cF4 > DolDoc< / span > < / a > < span class = cF2 > file to HTML.< / span > < span class = cF0 >
< a name = "l404" > < / a > < / span > < span class = cF2 > //Supply your own link_convert routine.< / span > < span class = cF0 >
< a name = "l405" > < / a > < / span > < span class = cF1 > U8< / span > < span class = cF0 > *in_name, *out_name;
< a name = "l406" > < / a > < / span > < span class = cF9 > CDoc< / span > < span class = cF0 > *doc_in, *doc_out;
< a name = "l407" > < / a >
< a name = "l408" > < / 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 >
2021-07-12 08:26:39 +01:00
< a name = "l409" > < / a > < / span > < span class = cF5 > WinHorz< / span > < span class = cF0 > (< / span > < span class = cFE > 1< / span > < span class = cF0 > , width - < / span > < span class = cFE > 2< / span > < span class = cF0 > ); < / span > < span class = cF2 > //Sets doc width for word wrap.< / span > < span class = cF0 >
2021-07-05 01:57:09 +01:00
< a name = "l410" > < / a >
< a name = "l411" > < / a > in_name=< / span > < span class = cF5 > ExtDefault< / span > < span class = cF0 > (_in_name, < / span > < span class = cF6 > " CC" < / span > < span class = cF0 > );
< a name = "l412" > < / a > < / span > < span class = cF1 > if< / span > < span class = cF0 > (_out_name)
< a name = "l413" > < / a > out_name = < / span > < span class = cF5 > ExtDefault< / span > < span class = cF0 > (_out_name, < / span > < span class = cF6 > " html" < / span > < span class = cF0 > );
< a name = "l414" > < / a > < / span > < span class = cF1 > else< / span > < span class = cF0 >
< a name = "l415" > < / a > out_name = < / span > < span class = cF5 > ExtChange< / span > < span class = cF0 > (_in_name, < / span > < span class = cF6 > " html" < / span > < span class = cF0 > );
< a name = "l416" > < / a >
< a name = "l417" > < / a > doc_in = < / span > < span class = cF5 > DocRead< / span > < span class = cF0 > (in_name);
< a name = "l418" > < / a > doc_out = Doc2Html(doc_in, html_header, body_header, body_footer, html_footer,
< a name = "l419" > < / a > line_anchors, link_convert, line_nums);
< a name = "l420" > < / a > < / span > < span class = cF5 > StrCopy< / span > < span class = cF0 > (& doc_out-> filename.name, out_name);
< a name = "l421" > < / a >
< a name = "l422" > < / a > < / span > < span class = cF5 > SettingsPop< / span > < span class = cF0 > ;
< a name = "l423" > < / a >
< a name = "l424" > < / a > < / span > < span class = cF5 > DocWrite< / span > < span class = cF0 > (doc_out);
< a name = "l425" > < / a > < / span > < span class = cF5 > DocDel< / span > < span class = cF0 > (doc_in);
< a name = "l426" > < / a > < / span > < span class = cF5 > DocDel< / span > < span class = cF0 > (doc_out);
< a name = "l427" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (in_name);
< a name = "l428" > < / a > < / span > < span class = cF5 > Free< / span > < span class = cF0 > (out_name);
< a name = "l429" > < / a > }
2021-07-03 05:07:57 +01:00
< / span > < / pre > < / body >
< / html >