Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. struct UrlsHistory {
  2.         byte UrlHistory[6000]; 
  3.         void AddUrl();
  4.         void GoBack();
  5.         dword CurrentUrl();
  6. };
  7.  
  8. UrlsHistory BrowserHistory;
  9.  
  10. void UrlsHistory::GoBack()
  11. {
  12.         //WriteDebug(#UrlHistory);
  13.        
  14.        
  15.         j = strlen(#UrlHistory);
  16.         WHILE(UrlHistory[j] <>'|') && (j > 0) j--;
  17.         IF (j > 0) UrlHistory[j] = 0x00;
  18.         WHILE(UrlHistory[j] <>'|') && (j > 0) {
  19.                 copystr(#UrlHistory[j], #URL);
  20.                 j--;
  21.         }
  22.         UrlHistory[j] = 0x00;
  23.         WB1.ShowPage(#URL);
  24. }
  25.  
  26. void UrlsHistory::AddUrl()
  27. {
  28.         IF (strlen(#UrlHistory)>6000) copystr(#UrlHistory+5000,#UrlHistory);
  29.         copystr("|", #UrlHistory + strlen(#UrlHistory));
  30.         copystr(#URL, #UrlHistory + strlen(#UrlHistory));
  31. }
  32.  
  33. dword UrlsHistory::CurrentUrl()
  34. {
  35.         EAX=#UrlHistory + find_symbol(#UrlHistory, '|');
  36. }
  37.