Subversion Repositories Kolibri OS

Rev

Rev 6285 | Rev 7043 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6285 Rev 6738
Line 61... Line 61...
61
=                                                        =
61
=                                                        =
62
=                       Integer                          =
62
=                       Integer                          =
63
=                                                        =
63
=                                                        =
64
========================================================*/
64
========================================================*/
Line 65... Line 65...
65
 
65
 
66
struct collection_int
66
:struct collection_int
67
{
67
{
68
	int count;
68
	int count;
69
	dword element[4096*3];
69
	dword element[4096*3];
70
	int add();
70
	int add();
71
	dword get();
71
	dword get();
72
	void drop();
72
	void drop();
Line 73... Line 73...
73
};
73
};
74
 
74
 
75
int collection_int::add(dword in) {
75
:int collection_int::add(dword in) {
76
	if (count >= 4096*3) return 0;
76
	if (count >= 4096*3) return 0;
77
	element[count] = in;
77
	element[count] = in;
78
	count++;
78
	count++;
Line 79... Line 79...
79
	return 1;
79
	return 1;
80
}
80
}
81
 
81
 
82
dword collection_int::get(dword pos) {
82
:dword collection_int::get(dword pos) {
Line 83... Line 83...
83
	if (pos<0) || (pos>=count) return 0;
83
	if (pos<0) || (pos>=count) return 0;
84
	return element[pos];
84
	return element[pos];
85
}
85
}
86
 
86
 
Line 87... Line 87...
87
void collection_int::drop() {
87
:void collection_int::drop() {
88
	element[0] = 
88
	element[0] =