Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7877 → Rev 7878

/programs/cmm/lib/collection.h
20,6 → 20,8
dword get_pos_by_name();
void drop();
void increase_data_size();
dword get_last();
bool delete_last();
};
 
:void collection::increase_data_size() {
40,7 → 42,10
}
 
:int collection::addn(dword in, len) {
if (count >= 4000) return 0;
if (count >= 4000) {
debugln("collection: more than 4000 elements!");
return 0;
}
if (element_offset[count]+len+2 > data_size) {
increase_data_size();
addn(in, len);
57,6 → 62,10
return data_start + element_offset[pos];
}
 
:dword collection::get_last() {
return get(count-1);
}
 
:dword collection::get_pos_by_name(dword name) {
dword i;
for (i=0; i<count; i++) {
73,6 → 82,9
count = 0;
}
 
:bool collection::delete_last() {
count--;
}
 
/*========================================================
= =