157,7 → 157,7 |
break; |
} |
case '\9': |
if (style.pre) //èíà÷å èä¸ì íà 0x0d |
if (style.pre) //otherwise go to 0x0d |
{ |
tab_len = strlen(#line) % 4; |
if (!tab_len) tab_len = 4; |
205,7 → 205,7 |
Perenos(); |
DrawStyle(); |
line = NULL; |
if (tag) SetStyle(); //îáðàáîòêà òåãîâ |
if (tag) SetStyle(); |
strlcpy(#oldtag, #tag, sizeof(oldtag)); |
tag = attr = tagparam = ignor_param = NULL; |
break; |
226,7 → 226,7 |
NewLine(); |
DrawPage(); |
if (list.first == 0) list.count = stroka; |
if (anchor) //åñëè ïîñðåäè òåêñòà ïîÿâèòñÿ íîâûé ÿêîðü - áóäåò áåñêîíå÷íûé öèêë |
if (anchor) |
{ |
anchor=NULL; |
list.first=anchor_line_num; |
253,7 → 253,6 |
int top1 = stroka * list.item_h + list.y + 5; |
byte opened; |
byte meta_encoding; |
//ïðîâåðÿåì òåã îòêðûâàåòñÿ èëè çàêðûâàåòñÿ |
if (tag[0] == '/') |
{ |
opened = 0; |
268,7 → 267,7 |
if (istag("form")) if (!opened) ignor_text = false; |
if(istag("title")) { |
if (opened) header=NULL; |
else if (!stroka) DrawTitle(#header); //òåã çàêðûëñÿ - âûâåëè ñòðîêó |
else if (!stroka) DrawTitle(#header); |
return; |
} |
if (ignor_text) return; |
279,7 → 278,7 |
if (!opened) strcat(#line, "\" "); |
return; |
} |
if (anchor) && (isattr("id=")) { //î÷åíü ïëîõî!!! ïîòîìó ÷òî åñëè íå ïîñëåäíèé òåã, ðàáîòàòü íå áóäåò |
if (anchor) if (isattr("id=")) || (isattr("name=")) { //very bad: if the tag is not the last it wound work |
if (!strcmp(#anchor, #val)) anchor_line_num=list.first+stroka; |
} |
if (istag("body")) { |
310,13 → 309,6 |
text_colors[text_color_index] = link_color_inactive; |
PageLinks.AddLink(#val, DrawBuf.zoom * stolbec * list.font_w + left1, top1-DrawBuf.zoom); |
} |
if (anchor) && (isattr("name=")) |
{ |
if (!strcmp(#anchor, #val)) |
{ |
anchor_line_num=list.first+stroka; |
} |
} |
} while(GetNextParam()); |
} |
else { |
419,7 → 411,7 |
do{ |
if (isattr("charset=")) || (isattr("content=")) || (isattr("encoding=")) |
{ |
strcpy(#val, #val[strrchr(#val, '=')]); //ïîèñê â content= |
strcpy(#val, #val[strrchr(#val, '=')]); //search in content= |
strlwr(#val); |
if (isval("utf-8")) || (isval("utf8")) meta_encoding = CH_UTF8; |
else if (isval("koi8-r")) || (isval("koi8-u")) meta_encoding = CH_KOI8; |