From 6e00c935d0b09e083b79f6a297b7a01a36e8af00 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 4 Sep 2011 16:37:00 +0000 Subject: [PATCH] htmlv 0.68b: memory.h-- deleted, now using mem.h-- git-svn-id: svn://kolibrios.org@2153 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/htmlv/browser/HTMLv.c-- | 7 +++- programs/network/htmlv/browser/History.txt | 5 ++- programs/network/htmlv/browser/TWB.h-- | 38 +++++++++++++++++-- .../htmlv/browser/include/some_code.h-- | 5 ++- programs/network/htmlv/lib/mem.h-- | 31 +++++++++++++++ 5 files changed, 78 insertions(+), 8 deletions(-) diff --git a/programs/network/htmlv/browser/HTMLv.c-- b/programs/network/htmlv/browser/HTMLv.c-- index c0c9fab814..71ce765daa 100644 --- a/programs/network/htmlv/browser/HTMLv.c-- +++ b/programs/network/htmlv/browser/HTMLv.c-- @@ -3,7 +3,6 @@ //Asper, Lrz, Nable, lev. #include "../lib/kolibri.h--" -#include "../lib/memory.h--" #include "../lib/file_system.h--" #include "include/some_code.h--" #include "img/toolbar_icons.c--" @@ -39,10 +38,14 @@ proc_info Form; void main() { - mouse m; dword btn; byte key; + mouse m; + int btn; + byte key; + IF (param) copystr(#param,#URL); BrowserHistory.AddUrl(); copystr(#URL,#editURL); + //Asper [ mem_Init(); $or eax, eax diff --git a/programs/network/htmlv/browser/History.txt b/programs/network/htmlv/browser/History.txt index 341b97bd56..e0b487751c 100644 --- a/programs/network/htmlv/browser/History.txt +++ b/programs/network/htmlv/browser/History.txt @@ -1,5 +1,8 @@ 04.09.11 -- v0.68 -- 11.1 Кб -- устранён вылет программы при неправильном параметре color тега - алсо иногда действительно полезно читать маны. +- устранён вылет программы при неправильном параметре color тега - алсо + иногда действительно полезно читать маны; +- memory.h-- удалён как старый дубликат, все функции работы с памятью отныне + используют mem.h--, написанный Asper'ом. 20.08.11 -- v0.67 -- 11.1 Кб - более адекватная прокрутка изображений; diff --git a/programs/network/htmlv/browser/TWB.h-- b/programs/network/htmlv/browser/TWB.h-- index 1a5358c225..e3aa7f2b5f 100644 --- a/programs/network/htmlv/browser/TWB.h-- +++ b/programs/network/htmlv/browser/TWB.h-- @@ -173,9 +173,11 @@ void GetNewUrl(){ -void ReadHtml(byte DO_LOAD) { - IF(buf) free(buf); - buf = malloc(1048576); +void ReadHtml(byte DO_LOAD) +{ + mem_Free(buf); + + buf = mem_Alloc(1048576); IF (!strcmp(get_URL_part(5),"http:"))) { @@ -193,6 +195,36 @@ void ReadHtml(byte DO_LOAD) { filesize = EBX; } +/*void ReadHtml(byte DO_LOAD) +{ + char FileAdress[4096]; + + IF (!strcmp(get_URL_part(5),"http:")) + { + IF (DO_LOAD) //&& (!WindowRePaint) + { + DeleteFile(#download_path); + IF (URL[strlen(#URL)-1]=='/') URL[strlen(#URL)-1]=''; + RunProgram("/sys/network/downloader", #URL); + RETURN; + } + copystr(#download_path, #FileAdress); + //ReadFile(0, 1048576, buf, #download_path); + } + ELSE copystr(#URL, #FileAdress);//ReadFile(0, 1048576, buf, #URL); + + mem_Free(buf); + file_size stdcall (#FileAdress); + $mov filesize, ebx + buf = mem_Alloc(filesize); + WriteDebug(IntToStr(filesize)); + //$mov buf, eax + //buf = malloc(1048576); + + //filesize = EBX; +}*/ + + void TWebBrowser::Load(dword adress) { diff --git a/programs/network/htmlv/browser/include/some_code.h-- b/programs/network/htmlv/browser/include/some_code.h-- index 7de52ab2bb..4943e923f3 100644 --- a/programs/network/htmlv/browser/include/some_code.h-- +++ b/programs/network/htmlv/browser/include/some_code.h-- @@ -49,7 +49,8 @@ int tile_height=2,// i, skin_width, shift=-2; - italic_buf = malloc(w*h*3); + italic_buf = mem_Alloc(w*h*3); + skin_width = GetSkinWidth(); CopyScreen(italic_buf, w * 65536 + h, x + Form.left + 2 * 65536 + y + Form.top + skin_width); @@ -58,5 +59,5 @@ shift=-2; FOR (i=0;i*tile_height