]> andersk Git - splint.git/blame - src/Headers/constraintList2.h
Updating for cert move
[splint.git] / src / Headers / constraintList2.h
CommitLineData
d1eb43aa 1/*
2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000.
3** See ../LICENSE for license information.
4*/
5
6# ifndef constraintLIST_H
7# define constraintLIST_H
8
9typedef /*@only@*/ constraint o_constraint;
10
11struct _constraintList
12{
13 int nelements;
14 int nspacehigh;
15 int nspacelow;
16 int current;
17 /*@dependent@*/ /*@reldef@*/ /*@relnull@*/ o_constraint *elements;
18 /*@only@*/ /*@reldef@*/ /*@relnull@*/ o_constraint *elementsroot;
19} ;
20
21/*@iter constraintList_elements (sef constraintList x, yield exposed constraint el); @*/
22# define constraintList_elements(x, m_el) \
23 { int m_ind; constraint *m_elements = &((x)->elements[0]); \
24 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
25 { constraint m_el = *(m_elements++);
26
27# define end_constraintList_elements }}
28
29extern int constraintList_size (/*@sef@*/ constraintList);
30# define constraintList_size(s) (constraintList_isDefined (s) ? (s)->nelements : 0)
31
32extern bool constraintList_empty (/*@sef@*/ constraintList);
33# define constraintList_empty(s) (constraintList_size(s) == 0)
34
35extern /*@falsenull@*/ bool constraintList_isDefined (constraintList p_t);
36# define constraintList_isDefined(s) ((s) != (constraintList) 0)
37
6e88de2d 38extern /*@only@*/ constraintList constraintList_makeNew(void);
d1eb43aa 39extern constraintList constraintList_push (/*@returned@*/ constraintList p_s,
40 /*@keep@*/ constraint p_el) ;
41
42extern void constraintList_addh (constraintList p_s, /*@keep@*/ constraint p_el) ;
43extern void constraintList_addl (constraintList p_s, /*@keep@*/ constraint p_el) ;
44
45extern void constraintList_reset (constraintList p_s)
46 /*@modifies p_s@*/ ;
47extern void constraintList_finish (constraintList p_s)
48 /*@modifies p_s@*/ ;
49extern void constraintList_advance (constraintList p_s)
50 /*@modifies p_s@*/ ;
51
52extern /*@exposed@*/ constraint constraintList_getN (constraintList p_s, int p_n) /*@*/ ;
53
54//extern /*@only@*/ cstring constraintList_unparse (constraintList p_s) ;
55//extern /*@only@*/ cstring constraintList_unparseTail (constraintList p_s);
56//extern /*@only@*/ cstring constraintList_unparseToCurrent (constraintList p_s);
57//extern /*@only@*/ cstring constraintList_unparseSecondToCurrent (constraintList p_s);
58
59extern void constraintList_free (/*@only@*/ constraintList p_s) ;
60
61extern /*@exposed@*/ constraint constraintList_head (constraintList p_s) ;
62extern /*@exposed@*/ constraint constraintList_current (constraintList p_s) ;
63
64extern /*@only@*/ constraintList constraintList_copy (constraintList p_s) ;
65
66/*@constant int constraintListGROWLOW;@*/
67# define constraintListGROWLOW 4 /* addl used in abstract.c */
68
69/*@constant int constraintListGROWHI;@*/
70# define constraintListGROWHI 4
71
72/*@constant int constraintListBASESIZE;@*/
73# define constraintListBASESIZE (constraintListGROWLOW + constraintListGROWHI)
74
75# else
76# error "Multiple include"
77# endif
78
79
80
81
This page took 0.058209 seconds and 5 git commands to generate.