From 40d376403abf9aba72c6aa74eeefcbef064eabba Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 13 Sep 2011 19:40:37 +0000 Subject: [PATCH] HTMv 0.69b: opening pages up to 1mg size git-svn-id: svn://kolibrios.org@2184 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/htmlv/browser/History.txt | 1 + programs/network/htmlv/browser/TWB.h-- | 42 ++++------------------ 2 files changed, 7 insertions(+), 36 deletions(-) diff --git a/programs/network/htmlv/browser/History.txt b/programs/network/htmlv/browser/History.txt index 18055933ed..b6e859bc3b 100644 --- a/programs/network/htmlv/browser/History.txt +++ b/programs/network/htmlv/browser/History.txt @@ -1,5 +1,6 @@ 13.09.11 -- v0.69 -- 11.2 Кб - нормальная прокрутка изображений; +- работа с файлами любого размера; - оптимизация процедуры парсинга тега с параметрами. 05.09.11 -- v0.68 -- 11.2 Кб diff --git a/programs/network/htmlv/browser/TWB.h-- b/programs/network/htmlv/browser/TWB.h-- index 289085bf1b..1aac28707a 100644 --- a/programs/network/htmlv/browser/TWB.h-- +++ b/programs/network/htmlv/browser/TWB.h-- @@ -176,9 +176,6 @@ void GetNewUrl(){ void ReadHtml(byte DO_LOAD) { - mem_Free(buf); - - buf = mem_Alloc(1048576); if (!strcmp(get_URL_part(5),"http:"))) { @@ -190,42 +187,15 @@ void ReadHtml(byte DO_LOAD) IF (downloader_id<0) RunProgram("@notify", "Error running Downloader. Internet unavilable."); RETURN; } - ReadFile(0, 1048576, buf, #download_path); + file_size stdcall (#download_path); } - ELSE ReadFile(0, 1048576, buf, #URL); - + ELSE file_size stdcall (#URL); + 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; -}*/ - + buf = mem_Alloc(filesize); + ReadFile(0, filesize, buf, #URL); +}