kolibrios-fun/programs/network/htmlv/browser/include/history.h

37 lines
916 B
C
Raw Normal View History

struct UrlsHistory {
byte UrlHistory[6000];
void AddUrl();
void GoBack();
dword CurrentUrl();
};
UrlsHistory BrowserHistory;
void UrlsHistory::GoBack()
{
j = find_symbol(#UrlHistory, '|') -1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (j<=0) return;
UrlHistory[j] = 0x00;
j = find_symbol(#UrlHistory, '|'); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -> <20><><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
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; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
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, '|');
}