Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6020 → Rev 6021

/programs/cmm/lib/patterns/history.h
1,6 → 1,6
#include "..\lib\collection.h"
 
struct _History {
struct _history {
collection items;
int active;
int add();
7,9 → 7,9
int back();
int forward();
dword current();
} History;
} history;
 
int _History::add(dword in)
int _history::add(dword in)
{
if (!strcmp(in, items.get(active-1))) return 0;
items.count = active;
18,7 → 18,7
return 1;
}
int _History::back()
int _history::back()
{
if (active==1) return 0;
active--;
25,7 → 25,7
return 1;
}
 
int _History::forward()
int _history::forward()
{
if (active==items.count) return 0;
active++;
32,7 → 32,7
return 1;
}
 
dword _History::current()
dword _history::current()
{
return items.get(active-1);
}