]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
28bf4b0b | 2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001. |
885824d3 | 3 | ** See ../LICENSE for license information. |
4 | */ | |
5 | ||
6 | # ifndef STRUCTDECLNODELIST_H | |
7 | # define STRUCTDECLNODELIST_H | |
8 | ||
9 | typedef /*@only@*/ stDeclNode o_stDeclNode; | |
10 | ||
28bf4b0b | 11 | abst_typedef struct |
885824d3 | 12 | { |
13 | int nelements; | |
14 | int nspace; | |
15 | /*@reldef@*/ /*@relnull@*/ o_stDeclNode *elements; | |
16 | } *stDeclNodeList ; | |
17 | ||
18 | /*@iter stDeclNodeList_elements (sef stDeclNodeList x, yield exposed stDeclNode el); @*/ | |
19 | # define stDeclNodeList_elements(x, m_el) \ | |
20 | { int m_ind; stDeclNode *m_elements = &((x)->elements[0]); \ | |
21 | for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \ | |
22 | { stDeclNode m_el = *(m_elements++); | |
23 | ||
24 | # define end_stDeclNodeList_elements }} | |
25 | ||
26 | extern int stDeclNodeList_size (stDeclNodeList); | |
27 | ||
28 | # define stDeclNodeList_size(s) ((s)->nelements) | |
29 | ||
30 | extern /*@only@*/ stDeclNodeList stDeclNodeList_new(void); | |
31 | extern stDeclNodeList | |
32 | stDeclNodeList_add (/*@returned@*/ stDeclNodeList p_s, /*@only@*/ stDeclNode p_el); | |
33 | ||
34 | extern /*@only@*/ cstring stDeclNodeList_unparse (stDeclNodeList p_s) ; | |
35 | extern void stDeclNodeList_free (/*@only@*/ stDeclNodeList p_s) ; | |
36 | ||
37 | extern /*@only@*/ stDeclNodeList stDeclNodeList_copy (stDeclNodeList p_s) ; | |
38 | ||
39 | /*@constant int stDeclNodeListBASESIZE;@*/ | |
40 | # define stDeclNodeListBASESIZE SMALLBASESIZE | |
41 | ||
42 | # else | |
43 | # error "Multiple include" | |
44 | # endif | |
45 | ||
46 | ||
47 | ||
48 |