Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / src / Headers / qtype.h
bloba2c2e657a7bfddd6f27137b2d2a3b29e25e7f3ff
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** qtype.h
8 **
9 ** Qualified types: a type qualifier list, and a ctype.
12 # ifndef QTYPEH
13 # define QTYPEH
15 abst_typedef /*@null@*/ struct
17 ctype type;
18 qualList quals;
19 } *qtype;
21 /*@constant null qtype qtype_undefined;@*/
22 # define qtype_undefined ((qtype) NULL)
24 extern /*@nullwhentrue@*/ bool qtype_isUndefined (qtype p_q);
25 # define qtype_isUndefined(q) ((q) == qtype_undefined)
27 extern /*@falsewhennull@*/ bool qtype_isDefined (qtype p_q);
28 # define qtype_isDefined(q) ((q) != qtype_undefined)
30 extern ctype qtype_getType (/*@sef@*/ qtype p_q);
31 # define qtype_getType(q) \
32 (qtype_isDefined(q) ? (q)->type : ctype_unknown)
34 extern /*@exposed@*/ qualList qtype_getQuals (/*@sef@*/ qtype p_q);
35 # define qtype_getQuals(q) \
36 (qtype_isDefined(q) ? (q)->quals : qualList_undefined)
38 extern void qtype_setType (/*@sef@*/ qtype p_q, ctype p_c);
39 # define qtype_setType(q, c) (qtype_isDefined(q) ? (q)->type = (c) : (c))
41 extern qtype qtype_addQualList (/*@returned@*/ qtype p_qt, qualList p_ql);
42 extern qtype qtype_mergeImplicitAlt (/*@returned@*/ qtype p_q1, /*@only@*/ qtype p_q2);
43 extern /*@only@*/ qtype qtype_copy (qtype p_q);
45 extern /*@notnull@*/ qtype qtype_create (ctype p_c) /*@*/ ;
46 extern /*@only@*/ qtype qtype_unknown(void) /*@*/ ;
47 extern qtype qtype_addQual (/*@returned@*/ qtype p_qt, qual p_q);
48 extern qtype qtype_combine (/*@returned@*/ qtype p_q1, ctype p_ct);
49 extern qtype qtype_mergeAlt (/*@returned@*/ qtype p_q1, /*@only@*/ qtype p_q2);
51 extern qtype qtype_resolve (/*@returned@*/ qtype p_q);
52 extern void qtype_adjustPointers (/*@only@*/ pointers p_n, /*@returned@*/ qtype p_q);
53 extern /*@only@*/ cstring qtype_unparse (qtype p_q) /*@*/ ;
54 extern qtype qtype_newBase (/*@returned@*/ qtype p_q, ctype p_ct);
55 extern qtype qtype_newQbase (/*@returned@*/ qtype p_q1, qtype p_q2);
56 extern void qtype_free (/*@only@*/ qtype p_q);
58 # else
59 # error "Multiple include"
60 # endif