Subversion Repositories Kolibri OS

Rev

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

Rev 7738 Rev 7752
Line 1... Line 1...
1
struct _anchors {
1
struct _anchors {
-
 
2
	char current_anchor_name[100];
2
	collection anchor_name;
3
	collection anchor_name;
3
	collection anchor_position;
4
	collection anchor_position;
4
	void add();
5
	void add();
5
	int get_anchor_pos();
6
	int get_pos_by_name();
-
 
7
	void clear();
6
} anchors;
8
} anchors;
Line 7... Line 9...
7
 
9
 
8
void _anchors::add(dword _name, _pos)
10
void _anchors::add(dword _name, _pos)
9
{
11
{
10
	anchor_name.add(_name);
12
	anchor_name.add(_name);
11
	anchor_position.add(itoa(_pos));
13
	anchor_position.add(itoa(_pos));
Line 12... Line 14...
12
}
14
}
13
 
15
 
14
int _anchors::get_anchor_pos(dword _get_name)
16
int _anchors::get_pos_by_name(dword _get_name)
-
 
17
{
15
{
18
	dword pos_name = anchor_name.get_pos_by_name(_get_name);
-
 
19
	if (ESBYTE[_get_name]==NULL) return 0;
-
 
20
	if (pos_name==-1) { 
16
	dword pos_name = anchor_name.get_pos_by_name(_get_name);
21
		return -1;
17
	if (pos_name==-1) return -1;
22
	} else {
-
 
23
		return atoi(anchor_position.get(pos_name));
-
 
24
	}
-
 
25
}
-
 
26
 
-
 
27
void _anchors::clear()
-
 
28
{
-
 
29
	anchor_name.drop();