Subversion Repositories Kolibri OS

Rev

Rev 7970 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7738 leency 1
 
2
	char current[256];
7755 leency 3
	collection anchor_name;
7738 leency 4
	collection anchor_position;
5
	void add();
6
	int get_pos_by_name();
7752 leency 7
	void clear();
8
	void take_anchor_from();
7755 leency 9
} anchors=0;
7972 leency 10
7738 leency 11
 
12
{
13
	anchor_name.add(_name);
14
	anchor_position.add(itoa(_pos));
15
}
16
17
 
7752 leency 18
{
7738 leency 19
	dword pos_name = anchor_name.get_pos_by_name(_get_name);
20
	if (ESBYTE[_get_name]==NULL) return 0;
7752 leency 21
	if (pos_name==-1) {
22
		return -1;
23
	} else {
24
		return atoi(anchor_position.get(pos_name));
25
	}
26
}
7738 leency 27
28
 
7752 leency 29
{
30
	anchor_name.drop();
31
	anchor_position.drop();
32
}
33
34
 
7755 leency 35
{
36
	int anchor_pos;
37
	if (!current) && (_URL) && (anchor_pos = strrchr(_URL, '#')) {
38
		strncpy(#current, _URL+anchor_pos-1, sizeof(_anchors.current)-1);
39
		ESBYTE[_URL+anchor_pos-1] = '\0';
7970 leency 40
	}
7755 leency 41
}
42