2011-06-25 03:52:11 +02:00
|
|
|
|
struct UrlsHistory {
|
2012-04-12 23:28:24 +02:00
|
|
|
|
dword CurrentUrl();
|
2011-06-25 03:52:11 +02:00
|
|
|
|
void AddUrl();
|
2012-06-05 10:25:06 +02:00
|
|
|
|
byte GoBack();
|
|
|
|
|
byte GoForward();
|
2011-06-25 03:52:11 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
UrlsHistory BrowserHistory;
|
|
|
|
|
|
2012-04-12 23:28:24 +02:00
|
|
|
|
struct path_string {
|
|
|
|
|
char Item[4096];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define MAX_HISTORY_NUM 40
|
|
|
|
|
path_string history_list[MAX_HISTORY_NUM];
|
|
|
|
|
int history_num;
|
|
|
|
|
int history_current;
|
|
|
|
|
|
|
|
|
|
dword UrlsHistory::CurrentUrl()
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
2012-04-12 23:28:24 +02:00
|
|
|
|
return #history_list[history_current].Item;
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-04-12 23:28:24 +02:00
|
|
|
|
void UrlsHistory::AddUrl() //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
2012-07-02 20:24:48 +02:00
|
|
|
|
int i;
|
2012-04-12 23:28:24 +02:00
|
|
|
|
if (history_num>0) && (strcmp(#URL,#history_list[history_current].Item)==0) return;
|
2012-06-02 23:50:26 +02:00
|
|
|
|
|
2012-04-12 23:28:24 +02:00
|
|
|
|
if (history_current>=MAX_HISTORY_NUM-1)
|
|
|
|
|
{
|
|
|
|
|
history_current/=2;
|
|
|
|
|
for (i=0; i<history_current; i++;)
|
|
|
|
|
{
|
2012-06-20 19:22:56 +02:00
|
|
|
|
strcpy(#history_list[i].Item, #history_list[MAX_HISTORY_NUM-i].Item);
|
2012-04-12 23:28:24 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
history_current++;
|
2012-06-20 19:22:56 +02:00
|
|
|
|
strcpy(#history_list[history_current].Item, #URL);
|
2012-04-12 23:28:24 +02:00
|
|
|
|
history_num=history_current;
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
|
|
|
|
|
2012-04-12 23:28:24 +02:00
|
|
|
|
|
2012-06-05 10:25:06 +02:00
|
|
|
|
byte UrlsHistory::GoBack()
|
2011-06-25 03:52:11 +02:00
|
|
|
|
{
|
2012-06-05 10:25:06 +02:00
|
|
|
|
if (history_current<=1) return 0;
|
|
|
|
|
|
2012-04-12 23:28:24 +02:00
|
|
|
|
history_current--;
|
2012-06-20 19:22:56 +02:00
|
|
|
|
strcpy(#URL, #history_list[history_current].Item);
|
2012-11-18 22:49:28 +01:00
|
|
|
|
return 1;
|
2011-06-25 03:52:11 +02:00
|
|
|
|
}
|
2012-04-12 23:28:24 +02:00
|
|
|
|
|
|
|
|
|
|
2012-06-05 10:25:06 +02:00
|
|
|
|
byte UrlsHistory::GoForward()
|
2012-04-12 23:28:24 +02:00
|
|
|
|
{
|
2012-06-05 10:25:06 +02:00
|
|
|
|
if (history_current==history_num) return 0;
|
2012-04-12 23:28:24 +02:00
|
|
|
|
history_current++;
|
2012-06-20 19:22:56 +02:00
|
|
|
|
strcpy(#URL, #history_list[history_current].Item);
|
2012-06-05 10:25:06 +02:00
|
|
|
|
return 1;
|
2012-04-12 23:28:24 +02:00
|
|
|
|
}
|