Subversion Repositories Kolibri OS

Rev

Rev 4692 | Rev 5746 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ShowHistory()
  2. {
  3.                 int i;
  4.                 static int history_pointer;
  5.                 int t;
  6.                
  7.                 free(history_pointer);
  8.                 history_pointer = malloc(64000);
  9.                 strcat(history_pointer, "<html><head><title>History</title></head><body><h1>History</h1>");
  10.                 strcat(history_pointer, "<h2>Visited pages</h2><blockquote><br>");
  11.                 for (i=1; i<BrowserHistory.links_count; i++)
  12.                 {
  13.                         // t = BrowserHistory.GetFirstLine(i);
  14.                         // strcat(history_pointer, itoa(t));
  15.                         strcat(history_pointer, " <a href='");
  16.                         strcat(history_pointer, BrowserHistory.GetUrl(i));
  17.                         strcat(history_pointer, "'>");
  18.                         strcat(history_pointer, BrowserHistory.GetUrl(i));
  19.                         strcat(history_pointer, "</a><br>");
  20.                 }
  21.                 strcat(history_pointer, "</blockquote><h2>Cached images</h2><br>");
  22.                 for (i=1; i<ImgCache.pics_count; i++)
  23.                 {
  24.                         strcat(history_pointer, "<img src='");
  25.                         strcat(history_pointer, #pics[i].path);
  26.                         strcat(history_pointer, "'><br>");
  27.                         strcat(history_pointer, #pics[i].path);
  28.                 }
  29.                 strcat(history_pointer, "</body></html>");
  30.                 WB1.Prepare(history_pointer, strlen(history_pointer));
  31. }