Subversion Repositories Kolibri OS

Rev

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

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