1,6 → 1,7 |
//06.04.2012 |
|
path_string history_list[40]; |
#define MAX_HISTORY_NUM 40 |
path_string history_list[MAX_HISTORY_NUM]; |
int history_num; |
int history_current; |
|
19,17 → 20,18 |
|
void HistoryPath(byte action) |
{ |
/*WriteDebug(""); |
WriteDebug(IntToStr(history_current)); |
for (i=0; i<history_num; i++;) |
if (action==add_new_path) |
{ |
WriteDebug(#history_list[i].Item); |
WriteDebug(IntToStr(history_num)); |
}*/ |
if (history_num>0) && (strcmp(#path,#history_list[history_current].Item)==0) return; |
|
if (action==add_new_path) |
if (history_current>=MAX_HISTORY_NUM-1) |
{ |
if (history_num>0) && (strcmp(#path,#history_list[history_current].Item)==0) return; |
history_current/=2; |
for (i=0; i<history_current; i++;) |
{ |
copystr(#history_list[MAX_HISTORY_NUM-i].Item, #history_list[i].Item); |
} |
} |
history_current++; |
copystr(#path,#history_list[history_current].Item); |
history_num=history_current; |
38,8 → 40,6 |
if (action==go_back) |
{ |
if (history_current<=2) return; |
WriteDebug(""); |
WriteDebug("Fuck!"); |
history_current--; |
copystr(#history_list[history_current].Item,#path); |
} |