Rev 7770 | Rev 8016 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
7764 | leency | 1 | |
2 | { |
||
3 | dword current_page_buf; |
||
4 | dword current_page_size; |
||
5 | collection url; |
||
6 | collection_int data; |
||
7972 | leency | 7 | collection_int size; |
8 | void add(); |
||
7764 | leency | 9 | bool has(); |
10 | void clear(); |
||
7770 | leency | 11 | } pages_cache=0; |
7972 | leency | 12 | |
7764 | leency | 13 | |
14 | { |
||
15 | dword data_pointer; |
||
16 | data_pointer = malloc(_size); |
||
17 | memmov(data_pointer, _data, _size); |
||
18 | data.add(data_pointer); |
||
7972 | leency | 19 | |
7764 | leency | 20 | |
21 | size.add(_size); |
||
7972 | leency | 22 | } |
7764 | leency | 23 | |
24 | |||
25 | { |
||
26 | int pos; |
||
27 | pos = url.get_pos_by_name(_link); |
||
28 | if (pos != -1) { |
||
29 | current_page_buf = data.get(pos); |
||
7972 | leency | 30 | current_page_size = size.get(pos); |
31 | return true; |
||
7764 | leency | 32 | } |
33 | return false; |
||
34 | } |
||
7770 | leency | 35 | |
36 | |||
37 | { |
||
38 | url.drop(); |
||
39 | data.drop(); |
||
40 | size.drop(); |
||
41 | current_page_buf = NULL; |
||
42 | current_page_size = NULL; |
||
43 | } |
||
7764 | leency | 44 |