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='");