]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
c0de361f | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | */ | |
5 | # ifndef sortSetLIST_H | |
6 | # define sortSetLIST_H | |
7 | ||
8 | typedef /*@dependent@*/ sortSet o_sortSet; | |
9 | ||
28bf4b0b | 10 | abst_typedef struct |
885824d3 | 11 | { |
12 | int nelements; | |
13 | int free; | |
14 | int current; | |
15 | /*@reldef@*/ /*@only@*/ /*@relnull@*/ o_sortSet *elements; | |
16 | } *sortSetList ; | |
17 | ||
18 | /*@iter sortSetList_elements (sef sortSetList x, yield exposed sortSet el); @*/ | |
19 | # define sortSetList_elements(x, m_el) \ | |
20 | { int m_ind; sortSet *m_elements = &((x)->elements[0]); \ | |
21 | for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \ | |
22 | { sortSet m_el = *(m_elements++); | |
23 | ||
24 | # define end_sortSetList_elements }} | |
25 | ||
26 | extern int sortSetList_size (sortSetList); | |
27 | ||
28 | # define sortSetList_size(s) ((s)->nelements) | |
29 | ||
30 | extern /*@only@*/ sortSetList sortSetList_new(void); | |
31 | extern void sortSetList_addh (sortSetList p_s, /*@dependent@*/ /*@exposed@*/ sortSet p_el) ; | |
32 | ||
33 | extern void sortSetList_reset (sortSetList p_s) ; | |
34 | extern void sortSetList_advance (sortSetList p_s) ; /* was "list_pointToNext" */ | |
35 | ||
36 | extern /*@unused@*/ /*@only@*/ cstring sortSetList_unparse (sortSetList p_s) ; | |
37 | extern void sortSetList_free (/*@only@*/ sortSetList p_s) ; | |
38 | ||
39 | extern /*@observer@*/ sortSet sortSetList_head (sortSetList p_s) ; | |
40 | extern /*@observer@*/ sortSet sortSetList_current (sortSetList p_s) ; | |
41 | ||
42 | /*@constant int sortSetListBASESIZE;@*/ | |
43 | # define sortSetListBASESIZE (8) | |
44 | ||
45 | # else | |
46 | # error "Multiple include" | |
47 | # endif | |
48 | ||
49 | ||
50 | ||
51 |