Rev 8330 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8330 | Rev 8439 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | enum {DT=1, OL, UL}; |
- | |
2 | struct LIST |
1 | struct LIST |
3 | { |
2 | { |
4 | int level; |
3 | int level; |
5 | int ordered[5]; |
4 | char ordered[5]; |
6 | int counter[5]; |
5 | int counter[5]; |
7 | void reset(); |
6 | void reset(); |
8 | void upd_level(); |
7 | void upd_level(); |
9 | int inc_counter(); |
8 | int inc_counter(); |
10 | int get_order_type(); |
9 | char order_type(); |
11 | }; |
10 | }; |
Line 12... | Line 11... | ||
12 | 11 | ||
13 | void LIST::reset() |
12 | void LIST::reset() |
14 | { |
13 | { |
15 | level = 0; |
14 | level = 0; |
Line 16... | Line 15... | ||
16 | } |
15 | } |
17 | 16 | ||
18 | void LIST::upd_level(int direction, type) |
17 | void LIST::upd_level(int direction, char type) |
19 | { |
18 | { |
20 | if (direction == 1) && (level<5) { |
19 | if (direction == 1) && (level<5) { |
21 | level++; |
20 | level++; |
Line 31... | Line 30... | ||
31 | { |
30 | { |
32 | counter[level]++; |
31 | counter[level]++; |
33 | return counter[level]; |
32 | return counter[level]; |
34 | } |
33 | } |
Line 35... | Line 34... | ||
35 | 34 | ||
36 | int LIST::get_order_type() |
35 | char LIST::order_type() |
37 | { |
36 | { |
38 | return ordered[level]; |
37 | return ordered[level]; |