Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7738 → Rev 7739

/programs/cmm/browser/WebView.c
1,5 → 1,5
//HTML Viewer in C--
//Copyright 2007-2019 by Veliant & Leency
//Copyright 2007-2020 by Veliant & Leency
//Asper, lev, Lrz, Barsuk, Nable, hidnplayr...
 
#ifndef AUTOBUILD
31,7 → 31,7
char homepage[] = FROM "html\\homepage.htm""\0";
 
#ifdef LANG_RUS
char version[]="’¥ªáâ®¢ë© ¡à ã§¥à 1.82";
char version[]="’¥ªáâ®¢ë© ¡à ã§¥à 1.83";
?define IMAGES_CACHE_CLEARED "Šíè ª à⨭®ª ®ç¨é¥­"
?define T_LAST_SLIDE "â® ¯®á«¥¤­¨© á« ©¤"
char loading[] = "‡ £à㧪  áâà ­¨æë...<br>";
46,7 → 46,7
"Š®¯¨à®¢ âì áá뫪ã
‘ª ç âì ᮤ¥à¦¨¬®¥ áá뫪¨";
#else
char version[]="Text-based Browser 1.82";
char version[]="Text-based Browser 1.83";
?define IMAGES_CACHE_CLEARED "Images cache cleared"
?define T_LAST_SLIDE "This slide is the last"
char loading[] = "Loading...<br>";
426,6 → 426,7
SetPageDefaults();
if (!strcmp(#URL, URL_SERVICE_HOME)) WB1.LoadInternalPage(#homepage, sizeof(homepage));
else if (!strcmp(#URL, URL_SERVICE_HISTORY)) ShowHistory();
else {bufsize=0; ShowPage();} //page not found
DrawEditBoxWebView();
return;
}
454,9 → 455,9
else
{
file_size stdcall (#URL);
if (EBX)
{
bufsize = EBX;
if (bufsize)
{
free(bufpointer);
bufpointer = malloc(bufsize);
SetPageDefaults();
509,8 → 510,9
}
 
 
void ClickLink()
char anchor[256];
void ClickLink()
int anchor_pos;
{
if (http.transfer > 0)
{
537,10 → 539,17
return;
}
//liner.ru#1
if (strrchr(#URL, '#')!=0)
else if (strrchr(#URL, '#')!=0)
{
strlcpy(#anchor, #URL+strrchr(#URL, '#'), sizeof(anchor));
URL[strrchr(#URL, '#')-1] = 0x00;
anchor_pos = strrchr(#URL, '#')-1;
strlcpy(#anchor, #URL+anchor_pos, sizeof(anchor));
URL[anchor_pos] = 0x00;
OpenPage();
strcat(#editURL, #anchor);
DrawEditBoxWebView();
if (anchors.get_anchor_pos(#anchor+1)!=-1) WB1.list.first = anchors.get_anchor_pos(#anchor+1);
WB1.DrawPage();
return;
}
 
if (!strncmp(#URL,"mailto:", 7))
/programs/cmm/browser/history.h
7,16 → 7,16
free(history_pointer);
history_pointer = malloc(history.items.data_size+256);
strcat(history_pointer, "<html><head><title>History</title></head><body><h1>History</h1>");
strcat(history_pointer, "<h2>Visited pages</h2><blockquote><br>");
strcat(history_pointer, "<br><b>Visited pages</b><br>");
for (i=0; i<history.items.count; i++)
{
strcat(history_pointer, " <a href='");
strcat(history_pointer, "&nbsp; <a href='");
strcat(history_pointer, history.items.get(i));
strcat(history_pointer, "'>");
strcat(history_pointer, history.items.get(i));
strcat(history_pointer, "</a><br>");
}
strcat(history_pointer, "</blockquote><h2>Cached images</h2>");
strcat(history_pointer, "<br><b>Cached images</b>");
for (i=1; i<ImgCache.pics_count; i++)
{
strcat(history_pointer, "<img src='");
/programs/cmm/lib/draw_buf.h
65,17 → 65,33
}
}
 
void DrawBuf_WriteText(dword x, y, byte fontType, dword color, str_offset)
{
EDI = buf_data;
WriteText(x, y, fontType, color, str_offset);
}
void DrawBufer::WriteText(dword x, y, byte fontType, dword color, str_offset)
{
#define BUGFIX_32000 32000
int ydiv=0;
dword reserve_data_1, reserve_data_2;
dword new_buf_offset;
if (y + 30 >= bufh) IncreaseBufSize();
DrawBuf_WriteText(x, y, fontType, color, str_offset);
if (y < BUGFIX_32000) {
WriteBufText(x, y, fontType, color, str_offset, buf_data);
}
else {
ydiv = y / BUGFIX_32000 * BUGFIX_32000;
y -= ydiv;
new_buf_offset = ydiv * bufw * 4 + buf_data;
 
reserve_data_1 = ESDWORD[new_buf_offset];
reserve_data_2 = ESDWORD[new_buf_offset+4];
 
ESDWORD[new_buf_offset] = bufw;
ESDWORD[new_buf_offset+4] = bufh - y;
WriteBufText(x, y, fontType, color, str_offset, new_buf_offset);
 
ESDWORD[new_buf_offset] = reserve_data_1;
ESDWORD[new_buf_offset+4] = reserve_data_2;
}
}
 
void DrawBufer::PutPixel(dword x, y, color)
{
dword pos = y*bufw+x*4+8+buf_data;