kolibrios/programs/cmm/browser/history.h
Kirill Lipatov (Leency) cb9906f10d WebView 1.0 Beta 4: fixes, view page source
git-svn-id: svn://kolibrios.org@4718 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-03-30 11:57:13 +00:00

31 lines
1.0 KiB
C

ShowHistory()
{
int i;
static int history_pointer;
int t;
free(history_pointer);
history_pointer = malloc(64000);
strcat(history_pointer, "<html><head><title>History</title></head><body><h1>History</h1>");
strcat(history_pointer, "<h2>Visited pages</h2><blockquote><br>");
for (i=1; i<BrowserHistory.links_count; i++)
{
// t = BrowserHistory.GetFirstLine(i);
// strcat(history_pointer, itoa(t));
strcat(history_pointer, " <a href='");
strcat(history_pointer, BrowserHistory.GetUrl(i));
strcat(history_pointer, "'>");
strcat(history_pointer, BrowserHistory.GetUrl(i));
strcat(history_pointer, "</a><br>");
}
strcat(history_pointer, "</blockquote><h2>Cached images</h2><br>");
for (i=1; i<ImgCache.pics_count; i++)
{
strcat(history_pointer, "<img src='");
strcat(history_pointer, #pics[i].path);
strcat(history_pointer, "'><br>");
strcat(history_pointer, #pics[i].path);
}
strcat(history_pointer, "</body></html>");
WB1.Prepare(history_pointer, strlen(history_pointer));
}