Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2605 → Rev 2604

/programs/network/htmlv/browser/TWB.h
15,7 → 15,7
char download_path[]="/rd/1/.download";
//char search_path[]="http://nova.rambler.ru/search?words=";
char search_path[]="http://nigma.ru/index.php?s=";
char version[]=" Text-based Browser 0.80";
char version[]=" Text-based Browser 0.78";
 
 
struct TWebBrowser {
36,7 → 36,7
 
 
dword text_colors[10],
text_color_index,
text_color_index = 0,
link_color,
bg_color=0xFFFFFF;
 
108,19 → 108,9
break;
case BACK:
BrowserHistory.GoBack();
copystr(#URL, #editURL);
za_kadrom = count = 0;
if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
ShowPage(#URL);
return;
case FORWARD:
BrowserHistory.GoForward();
 
copystr(#URL, #editURL);
za_kadrom = count = 0;
if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
ShowPage(#URL);
RunProgram("@notify", "Forward button is not realized yet");
return;
case 054: //F5
IF(edit1.flags == 66) break;
319,7 → 309,7
temp = '';
goto NEXT_MARK;
}
case '\9':
CASE '\9':
if (pre_text == 1) //èíà÷å èä¸ì íà 0x0d
{
tab_len=strlen(#line)/8;
722,10 → 712,10
return;
}
 
if (!chTag("meta")) || (!chTag("?xml"))
if (!chTag("meta"))
{
META:
if (!strcmp(#parametr, "charset=")) || (!strcmp(#parametr, "content=")) || (!strcmp(#parametr, "encoding="))
if (!strcmp(#parametr, "charset=")) || (!strcmp(#parametr, "content="))
{
copystr(#options[find_symbol(#options, '=')],#options); //ïîèñê â content=
 
/programs/network/htmlv/browser/include/history.h
1,55 → 1,36
struct UrlsHistory {
dword CurrentUrl();
byte UrlHistory[6000];
void AddUrl();
void GoBack();
void GoForward();
dword CurrentUrl();
};
 
UrlsHistory BrowserHistory;
 
struct path_string {
char Item[4096];
};
void UrlsHistory::GoBack()
{
j = find_symbol(#UrlHistory, '|') -1; //òåêóùàÿ ñòðàíèöà
if (j<=0) return;
UrlHistory[j] = 0x00;
j = find_symbol(#UrlHistory, '|'); //ïðåäûäóùàÿ ñòðàíèöà -> îíà íàì è íóæíà
copystr(#UrlHistory + j, #URL);
 
#define MAX_HISTORY_NUM 40
path_string history_list[MAX_HISTORY_NUM];
int history_num;
int history_current;
 
dword UrlsHistory::CurrentUrl()
{
return #history_list[history_current].Item;
copystr(#URL, #editURL);
za_kadrom = count = 0;
if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
WB1.ShowPage(#URL);
}
 
void UrlsHistory::AddUrl() //òóò íóæåí ââîäèìûé ýëåìåíò - äëÿ óíèâåðñàëüíîñòè
void UrlsHistory::AddUrl()
{
if (history_num>0) && (strcmp(#URL,#history_list[history_current].Item)==0) return;
if (strcmp(BrowserHistory.CurrentUrl(), #URL)==0) return; //åñëè íîâûé àäðåññ = òåêóùåìó
if (history_current>=MAX_HISTORY_NUM-1)
{
history_current/=2;
for (i=0; i<history_current; i++;)
{
copystr(#history_list[MAX_HISTORY_NUM-i].Item, #history_list[i].Item);
IF (strlen(#UrlHistory)>6000) copystr(#UrlHistory+5000,#UrlHistory);
copystr("|", #UrlHistory + strlen(#UrlHistory));
copystr(#URL, #UrlHistory + strlen(#UrlHistory));
}
}
history_current++;
copystr(#URL,#history_list[history_current].Item);
history_num=history_current;
}
 
 
void UrlsHistory::GoBack()
dword UrlsHistory::CurrentUrl()
{
if (history_current<=2) return;
history_current--;
copystr(#history_list[history_current].Item,#URL);
EAX=#UrlHistory + find_symbol(#UrlHistory, '|');
}
 
 
void UrlsHistory::GoForward()
{
if (history_current==history_num) return;
history_current++;
copystr(#history_list[history_current].Item,#URL);
}
/programs/network/htmlv/browser/History.txt
1,11 → 1,10
13.04.12 -- v0.80
õõ.õõ.12 -- v0.80
- ïîääåðæêà <body> "bgcolor=" è "text=";
- îáðàáîòêà ïåðåõîäà ââåðõ "../";
- jpg, gif, png îòêðûâàþòñÿ ÷åðåç kiv.
- òåïåðü èçîáðàæåíèÿ ëåãêî ìîãóò áûòü ññûëêàìè;
- 2 íåáîëüøèõ ôèêñà äëÿ èçîáðàæåíèé, êíîïêè BackSpace;
- ÷óòîê óëó÷øåíà îáðàáîòêà óðëîâ, ñîäåðæàùèõ #;
- çàðàáîòàëà êíîïêà "Âïåð¸ä".
- ÷óòîê óëó÷øåíà îáðàáîòêà óðëîâ, ñîäåðæàùèõ #.
 
 
 
/programs/network/htmlv/browser/compile.bat
2,4 → 2,4
del HTMLv
rename HTMLv.com HTMLv
rem ..\C--\kpack HTMLv
pause
rem pause