kolibrios-gitea/programs/network/htmlv/browser/include/history.h
Kirill Lipatov (Leency) af9f746fc1 HTMLv 0.78
git-svn-id: svn://kolibrios.org@2433 a494cfbc-eb01-0410-851d-a64ba20cac60
2012-03-07 22:51:05 +00:00

37 lines
916 B
C

struct UrlsHistory {
byte UrlHistory[6000];
void AddUrl();
void GoBack();
dword CurrentUrl();
};
UrlsHistory BrowserHistory;
void UrlsHistory::GoBack()
{
j = find_symbol(#UrlHistory, '|') -1; //ňĺęóůŕ˙ ńňđŕíčöŕ
if (j<=0) return;
UrlHistory[j] = 0x00;
j = find_symbol(#UrlHistory, '|'); //ďđĺäűäóůŕ˙ ńňđŕíčöŕ -> îíŕ íŕě č íóćíŕ
copystr(#UrlHistory + j, #URL);
copystr(#URL, #editURL);
za_kadrom = count = 0;
if (!strcmp(get_URL_part(5),"http:"))) HttpLoad();
WB1.ShowPage(#URL);
}
void UrlsHistory::AddUrl()
{
if (strcmp(BrowserHistory.CurrentUrl(), #URL)==0) return; //ĺńëč íîâűé ŕäđĺńń = ňĺęóůĺěó
IF (strlen(#UrlHistory)>6000) copystr(#UrlHistory+5000,#UrlHistory);
copystr("|", #UrlHistory + strlen(#UrlHistory));
copystr(#URL, #UrlHistory + strlen(#UrlHistory));
}
dword UrlsHistory::CurrentUrl()
{
EAX=#UrlHistory + find_symbol(#UrlHistory, '|');
}