Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 3467 → Rev 3468

/programs/cmm/browser/HTMLv.c
61,7 → 61,7
if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();}
if (load_dll2(libio, #libio_init,1)!=0) debug("Error: library doesn't exists - libio"w);
if (load_dll2(libimg, #libimg_init,1)!=0) debug("Error: library doesn't exists - libimg"w);
if (load_dll2(libtruetype, #truetype,0)!=0) {debug("Error: library doesn't exists - TrueType"w); use_truetype = 2; }
if (load_dll2(libtruetype, #truetype,0)!=0) {debug("Warning: library doesn't exists - TrueType"w); use_truetype = 2; }
else init_font(#fontlol);
if (!URL) strcpy(#URL, "/sys/home.htm");
181,6 → 181,7
WB1.line_h = 10;
lines.column_max = WB1.width - 30 / 6;
lines.visible = WB1.height - 3 / WB1.line_h - 2;
DrawBufInit();
}
 
 
/programs/cmm/browser/History.txt
1,3 → 1,9
12.04.13 - 0.99.01
- èñïðàâëåíî ïàäåíèå ïðè î÷èñòêå êýøà èçîáðàæåíèé
- èñïðàâëåíà ðàáîòà ïóíêòà ìåíþ "âêëþ÷èòü ðàçðûâû ñòðîê"
- óñêîðåíèå ïðè ïðîêðóòêå ñòðàíèöû
- óñêîðåíèå îáðàáîòêè quotted printable
 
12.04.13 - 0.99
- îòðèñîâêà â áóôåð;
- èñïðàâëåíèå îøèáîê è îáíîâëåíèå êîäà.
/programs/cmm/browser/TWB.h
8,7 → 8,7
 
char download_path[]="/rd/1/.download";
char search_path[]="http://nigma.ru/index.php?s=";
char version[]=" Text-based Browser 0.99";
char version[]=" Text-based Browser 0.99.01";
 
 
struct TWebBrowser {
60,7 → 60,6
drawbuf = malloc(WB1.width * WB1.line_h +4 * 4 + 8); //+1 for good luck
ESDWORD[drawbuf] = WB1.width;
ESDWORD[drawbuf+4] = WB1.line_h;
DrawBufFill();
}
void DrawBufFill()
{
202,12 → 201,12
case 004: //Ctrl+D
ReadHtml(_DOS);
break;
case 001:
case 002: //free img cache
FreeImgCache();
break;
case 003:
if (!pre_text) pre_text=2;
else pre_text=0;
break;
case 002: //free img cache
FreeImgCache();
break;
case 005: //truetype
if (use_truetype == 2)
225,9 → 224,9
if (!BrowserHistory.GoForward()) return;
OpenPage();
return;
//case 255: //F12
// RunProgram("/rd/1/HTMLv_old", #URL);
// return;
case 255: //F12
RunProgram("/rd/1/HTMLv_old", #URL);
return;
case 052: //F3
if (strcmp(get_URL_part(5),"http:")<>0) RunProgram("/rd/1/tinypad", #URL); else RunProgram("/rd/1/tinypad", #download_path);
return;
426,20 → 425,17
byte ignor_param;
char temp[768];
stroka = -lines.first;
stolbec = 0;
for (j = 400; j < blink + 1; j++;) DeleteButton(j);
blink = 400;
 
if (blink<400) blink=400; else for ( ; blink>400; blink--;) DeleteButton(blink);
b_text = i_text = u_text = s_text = blq_text =
li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab = 0; //îáíóëÿåì òåãè
link_color = 0x0000FF;
bg_color = 0xFFFFFF;
DrawBufFill();
line = NULL;
strcpy(#page_links,"|");
strcpy(#header, #version);
DrawBufInit();
stroka = -lines.first;
stolbec = 0;
 
if (pre_text<>2)
{
466,24 → 462,21
tab_len=strlen(#line)/8;
tab_len=tab_len*8;
tab_len=8+tab_len-strlen(#line);
for (j=0; j<tab_len; j++;) strcat(#line," ");
for (j=0; j<tab_len; j++;) chrcat(#line,' ');
break;
}
case 0x0d:
bukva = ' ';
goto DEFAULT_MARK;
case '=': //ïîääåðæêà øàéòàíñêîé êîäèðîâêè ñòðàíèö, ñîõðàí¸ííûõ ÷åðåç ÈÅ7
}
goto DEFAULT_MARK;
case '=': //quoted printable
if (strcmp(#URL + strlen(#URL) - 4, ".mht")<>0) goto DEFAULT_MARK;
 
bword++;
bukva=ESBYTE[bword];
strcpy(#temp,#bukva);
bword++;
bukva=ESBYTE[bword];
strcat(#temp,#bukva);
bukva=Hex2Symb(#temp);
if (bukva) goto DEFAULT_MARK;
temp[0] = ESBYTE[bword+1];
temp[1] = ESBYTE[bword+2];
temp[2] = '\0';
if (bukva = Hex2Symb(#temp))
{
bword+=2;
goto DEFAULT_MARK;
}
break;
case '&': //&nbsp; and so on
492,7 → 485,7
for (j=0; (ESBYTE[bword]<>';') && (j<7); j++, bword++;)
{
bukva = ESBYTE[bword];
strcat(#tag, #bukva);
chrcat(#tag, bukva);
}
bukva = GetUnicodeSymbol();
559,6 → 552,7
break;
default:
DEFAULT_MARK:
if (bukva<=15) bukva=' ';
if (!pre_text) && (bukva == ' ')
{
if (line[strlen(#line)-1]==' ') break; //óáðàòü 2 ïðîáåëà ïîäðÿä
/programs/cmm/browser/include/img_cache.h
19,13 → 19,11
 
void FreeImgCache()
{
int i;
for (i=0; i<=num_of_pics; i++)
for ( ; num_of_pics>0; num_of_pics--)
{
img_destroy stdcall (pics[num_of_pics].image);
if (pics[num_of_pics].image) img_destroy stdcall (pics[num_of_pics].image);
pics[num_of_pics].path = NULL;
}
num_of_pics=0;
}
 
 
/programs/cmm/browser/include/menu_rmb.h
10,9 → 10,9
"DOS Ctrl+D",04,
"KOI Ctrl+K",11,
"UTF Ctrl+U",21,
"Line breaks ON" ,01,
"Line breaks ON" ,03,
"Free image cache" ,02,
"TrueType fonts" ,05,
//"TrueType fonts" ,05,
0};
 
 
86,7 → 86,7
if (i<>items_cur) EDX=0xFFFFFF; else EDX=0x94AECE;
DrawBar(1, i*ITEM_HEIGHT+1, ITEM_WIDTH-1, ITEM_HEIGHT, EDX);
WriteText(8,i*ITEM_HEIGHT+6,0x80,0x000000,ITEMS_LIST[i*2]);
if (ITEMS_LIST[i*2+1]==1) && (pre_text==2) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+8, 4, 4, 0x444444);
if (ITEMS_LIST[i*2+1]==3) && (pre_text==2) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+8, 4, 4, 0x444444);
if (ITEMS_LIST[i*2+1]==5) && (use_truetype==1) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+8, 4, 4, 0x444444);
}
DrawBar(33, cur_encoding+1*ITEM_HEIGHT+8, 4, 4, 0x444444); //ïîêàçûâàåò âûáðàíóþ êîäèðîâêó