/programs/cmm/browser/cache.h |
---|
File deleted |
\ No newline at end of file |
/programs/cmm/browser/WebView.c |
---|
36,7 → 36,6 |
bool debug_mode = false; |
#include "..\TWB\TWB.c" //HTML Parser, a core component |
#include "texts.h" |
#include "cache.h" |
TWebBrowser WB1; |
118,7 → 117,7 |
int i, btn, redirect_count=0; |
LoadLibraries(); |
CreateDir("/tmp0/1/Downloads"); |
//CreateDir("/tmp0/1/WebView_Cache"); |
CreateDir("/tmp0/1/WebView_Cache"); |
Libimg_LoadImage(#skin, "/sys/toolbar.png"); |
HandleParam(); |
skin.h = 26; |
232,7 → 231,6 |
// Loading the page is complete, free resources |
redirect_count = 0; |
http.free(); |
pages_cache.add(history.current(), http.content_pointer, http.content_received); |
LoadInternalPage(http.content_pointer, http.content_received); |
} |
} |
452,17 → 450,15 |
history.add(#new_url); |
if (pages_cache.has(#new_url)) { |
//CACHED PAGE |
LoadInternalPage(pages_cache.current_page_buf, pages_cache.current_page_size); |
} else if (!strncmp(#new_url,"WebView:",8)) { |
//if (pages_cache.have(#new_url)) { |
// LoadInternalPage(pages_cache.current_page_buf, pages_cache.pages_cache.current_page_size); |
//} else |
if (!strncmp(#new_url,"WebView:",8)) { |
//INTERNAL PAGE |
if (!strcmp(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#homepage, sizeof(homepage)); |
else if (!strcmp(#new_url, URL_SERVICE_HELP)) LoadInternalPage(#help, sizeof(help)); |
else if (!strcmp(#new_url, URL_SERVICE_HISTORY)) ShowHistory(); |
else LoadInternalPage(#page_not_found, sizeof(page_not_found)); |
} else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) { |
//WEB PAGE |
if (ReplaceSpaceInUrl(#new_url, URL_SIZE)) { |
/programs/cmm/browser/texts.h |
---|
1,4 → 1,4 |
char version[]="WebView 2.2"; |
char version[]="WebView 2.15"; |
#ifdef LANG_RUS |
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0"; |
/programs/cmm/TWB/TWB.c |
---|
400,15 → 400,7 |
if (tag.is("button")) { style.button = tag.opened; stolbec++; return; } |
if (tag.is("u")) || (tag.is("ins")) { style.u=tag.opened; return;} |
if (tag.is("s")) || (tag.is("strike")) || (tag.is("del")) { style.s=tag.opened; return; } |
if (tag.is("dl")) { |
if (tag.opened) NewLine(); |
return; |
} |
if (tag.is("dd")) { |
//NewLine(); |
//if (tag.opened) stolbec += 5; //stolbec overflow! |
return; |
} |
//if (tag.is("dd")) { stolbec += 5; return; } //stolbec overflow! |
if (tag.is("blockquote")) { style.blq = tag.opened; return; } |
if (tag.is("code")) { |
if (tag.opened) style.bg_color = 0xe4ffcb; else style.bg_color = page_bg; |
/programs/cmm/lib/strings.h |
---|
917,15 → 917,6 |
return 0; |
} |
// void * memset( ptr, value, num ); |
// fills the memory with a dword |
// example: memset(str,'-', sizeof(str)); |
inline void MEMSETD(EDI,ECX,EAX) |
{ |
$REP |
$STOSD |
} |
:replace_char(dword in_str, char from_char, to_char, int length) { |
int i; |
for (i=0; i<length; i++) { |
/programs/cmm/lib/draw_buf.h |
---|
49,8 → 49,9 |
{ |
dword i; |
dword max_i = bufw * bufh * 4 + buf_data + 8; |
fill_color = i_fill_color; |
MEMSETD(buf_data+start_pointer+8, max_i-buf_data-start_pointer-8/4, fill_color); |
EDI = fill_color = i_fill_color; |
for (ESI=buf_data+start_pointer+8; ESI<max_i; ESI+=4) ESDWORD[ESI] = EDI; |
//for (i=buf_data+start_pointer+8; i<max_i; i+=4) ESDWORD[i] = fill_color; |
} |
void DrawBufer::DrawBar(dword x, y, w, h, color) |
67,7 → 68,7 |
void DrawBufer::WriteText(dword x, y, byte fontType, dword color, str_offset) |
{ |
#define BUGFIX_32000 32000 |
dword ydiv=0; |
int ydiv=0; |
dword reserve_data_1, reserve_data_2; |
dword new_buf_offset; |
if (y + 30 >= bufh) IncreaseBufSize(); |