Subversion Repositories Kolibri OS

Rev

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

  1.  
  2. struct LinksArray
  3. {
  4.         char page_links[12000];
  5.         void Add();
  6.         dword GetURL();
  7.         void Clear();
  8. } PageLinks;
  9.  
  10. void LinksArray::Add(dword new_link)
  11. {
  12.         strcat(#page_links, new_link);
  13.         strcat(#page_links, "|");
  14. }
  15.  
  16. dword LinksArray::GetURL(int id)
  17. {
  18.         int i, j = 0;
  19.         for (i = 0; i <= id - 401; i++)
  20.         {
  21.                 do
  22.                 {
  23.                         j++;
  24.                         if (j>=strlen(#page_links)) return;
  25.                 }
  26.                 while (page_links[j] <>'|');
  27.         }
  28.         page_links[j] = 0x00;
  29.         strcpy(#URL, #page_links+strrchr(#page_links, '|'));
  30.         return #URL;
  31. }
  32.  
  33. void LinksArray::Clear()
  34. {
  35.         strcpy(#page_links,"|");
  36. }