Rev 2823 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2823 | Rev 2825 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | int i; |
7 | int i; |
8 | 8 | ||
Line 9... | Line 9... | ||
9 | char download_path[]="/rd/1/.download"; |
9 | char download_path[]="/rd/1/.download"; |
10 | char search_path[]="http://nigma.ru/index.php?s="; |
10 | char search_path[]="http://nigma.ru/index.php?s="; |
11 | char version[]=" Text-based Browser 0.94d"; |
11 | char version[]=" Text-based Browser 0.94e"; |
Line 12... | Line 12... | ||
12 | 12 | ||
13 | 13 | ||
14 | struct TWebBrowser { |
14 | struct TWebBrowser { |
Line 37... | Line 37... | ||
37 | int stroka, |
37 | int stroka, |
38 | stolbec, |
38 | stolbec, |
39 | tab_len; |
39 | tab_len; |
Line 40... | Line 40... | ||
40 | 40 | ||
41 | char line[330], |
41 | char line[500], |
42 | tag[100], |
42 | tag[100], |
43 | tagparam[10000], |
43 | tagparam[10000], |
44 | parametr[1200], |
44 | parametr[1200], |
Line 316... | Line 316... | ||
316 | 316 | ||
Line 317... | Line 317... | ||
317 | if (!strcmp(#URL + strlen(#URL) - 4, ".txt")) pre_text = 1; |
317 | if (!strcmp(#URL + strlen(#URL) - 4, ".txt")) pre_text = 1; |
318 | if (!strcmp(#URL + strlen(#URL) - 4, ".mht")) ignor_text = 1; |
318 | if (!strcmp(#URL + strlen(#URL) - 4, ".mht")) ignor_text = 1; |
Line -... | Line 319... | ||
- | 319 | ||
319 | 320 | #ifdef DEBUG_ON |
|
- | 321 | debug("Start parsing"); |
|
Line 320... | Line 322... | ||
320 | debug("Start parsing"); |
322 | #endif |
321 | 323 | ||
322 | for ( ; buf+filesize > bword; bword++;) {//ESBYTE[bword] |
324 | for ( ; buf+filesize > bword; bword++;) {//ESBYTE[bword] |
323 | bukva = ESBYTE[bword]; |
325 | bukva = ESBYTE[bword]; |
Line 461... | Line 463... | ||
461 | lines.first=anchor_line_num; |
463 | lines.first=anchor_line_num; |
462 | ParseHTML(buf); |
464 | ParseHTML(buf); |
463 | } |
465 | } |
464 | 466 | ||
Line -... | Line 467... | ||
- | 467 | #ifdef DEBUG_ON |
|
465 | debug("End parsing"); |
468 | debug("End parsing"); |
- | 469 | #endif |
|
466 | DrawScroller(); //ðèñóåì ñêðîëë |
470 | DrawScroller(); //ðèñóåì ñêðîëë |
467 | } |
471 | } |
Line 468... | Line 472... | ||
468 | 472 | ||
469 | 473 | ||
470 | char oldtag[100]; |
474 | char oldtag[100]; |
Line 471... | Line 475... | ||
471 | void TWebBrowser::WhatTextStyle(int left1, top1, width1) { |
475 | void TWebBrowser::WhatTextStyle(int left1, top1, width1) { |
472 | dword hr_color; |
476 | dword hr_color; |
473 | 477 | ||
Line 474... | Line 478... | ||
474 | dword image=0; |
478 | dword image; |
475 | char temp[4096]; |
479 | char temp[4096]; |
476 | int w, h, img_lines_first=0; |
480 | int w, h, img_lines_first, line_length; |
477 | 481 | ||
Line 511... | Line 515... | ||
511 | { |
515 | { |
512 | DrawBar(left, top, width-15, 15, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
516 | DrawBar(left, top, width-15, 15, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
513 | first_line_drawed=1; |
517 | first_line_drawed=1; |
514 | } |
518 | } |
515 | WriteText(stolbec * 6 + left1, top1, 0x80, text_colors[text_color_index], #line, 0); //ìîæåò òóò ðèñîâàòü áåëóþ ñòðîêó? |
519 | line_length=strlen(#line)*6; |
- | 520 | WriteText(stolbec * 6 + left1, top1, 0x80, text_colors[text_color_index], #line, 0); //ìîæåò òóò ðèñîâàòü áåëóþ ñòðîêó? |
|
516 | //text_out stdcall (#line, -1, 16, text_colors[text_color_index], stolbec * 6 + left1, top1); |
521 | //line_length = get_length stdcall (#line,-1,16,line_length); |
- | 522 | //text_out stdcall (#line, -1, 17, text_colors[text_color_index], stolbec * 6 + left1, top1-2); |
|
517 | IF (b_text) { $add ebx, 1<<16 $int 0x40 } |
523 | IF (b_text) { $add ebx, 1<<16 $int 0x40 } |
518 | IF (i_text) Skew(stolbec * 6 + left1, top1, strlen(#line)+1*6, 10); //íàêëîííûé òåêñò |
524 | IF (i_text) Skew(stolbec * 6 + left1, top1, line_length+6, 10); //íàêëîííûé òåêñò |
519 | IF (s_text) DrawBar(stolbec * 6 + left1, top1 + 4, strlen(#line) * 6, 1, text_colors[text_color_index]); //çà÷¸ðêíóòûé |
525 | IF (s_text) DrawBar(stolbec * 6 + left1, top1 + 4, line_length, 1, text_colors[text_color_index]); //çà÷¸ðêíóòûé |
520 | IF (u_text) DrawBar(stolbec * 6 + left1, top1 + 8, strlen(#line) * 6, 1, text_colors[text_color_index]); //ïîä÷¸ðêíóòûé |
526 | IF (u_text) DrawBar(stolbec * 6 + left1, top1 + 8, line_length, 1, text_colors[text_color_index]); //ïîä÷¸ðêíóòûé |
521 | IF (link) { |
527 | IF (link) { |
522 | DefineButton(stolbec * 6 + left1 - 2, top1, strlen(#line) * 6 + 3, 9, blink + BT_HIDE, 0xB5BFC9); // |
528 | DefineButton(stolbec * 6 + left1 - 2, top1, line_length + 3, 9, blink + BT_HIDE, 0xB5BFC9); // |
523 | DrawBar(stolbec * 6 + left1, top1 + 8, strlen(#line) * 6, 1, text_colors[text_color_index]); |
529 | DrawBar(stolbec * 6 + left1, top1 + 8, line_length, 1, text_colors[text_color_index]); |
524 | } |
530 | } |
525 | } |
531 | } |
526 | 532 | ||
Line 527... | Line 533... | ||
527 | IF(!tag) return; |
533 | IF(!tag) return; |
528 | stolbec += strlen(#line); |
534 | stolbec += strlen(#line); |