]> andersk Git - splint.git/blame - src/Headers/qtype.h
Merged this branch with the one in the splint.sf.net repository.
[splint.git] / src / Headers / qtype.h
CommitLineData
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/*
7** qtype.h
8**
9** Qualified types: a type qualifier list, and a ctype.
10*/
11
12# ifndef QTYPEH
13# define QTYPEH
14
28bf4b0b 15abst_typedef /*@null@*/ struct
885824d3 16{
17 ctype type;
18 qualList quals;
19} *qtype;
20
21/*@constant null qtype qtype_undefined;@*/
22# define qtype_undefined ((qtype) NULL)
23
0e41eb0e 24extern /*@nullwhentrue@*/ bool qtype_isUndefined (qtype p_q);
885824d3 25# define qtype_isUndefined(q) ((q) == qtype_undefined)
26
495af944 27extern /*@falsewhennull@*/ bool qtype_isDefined (qtype p_q) /*@*/;
885824d3 28# define qtype_isDefined(q) ((q) != qtype_undefined)
29
30extern ctype qtype_getType (/*@sef@*/ qtype p_q);
31# define qtype_getType(q) \
32 (qtype_isDefined(q) ? (q)->type : ctype_unknown)
33
34extern /*@exposed@*/ qualList qtype_getQuals (/*@sef@*/ qtype p_q);
35# define qtype_getQuals(q) \
36 (qtype_isDefined(q) ? (q)->quals : qualList_undefined)
37
38extern void qtype_setType (/*@sef@*/ qtype p_q, ctype p_c);
39# define qtype_setType(q, c) (qtype_isDefined(q) ? (q)->type = (c) : (c))
40
41# ifndef NOLCL
42extern qtype qtype_addQualList (/*@returned@*/ qtype p_qt, qualList p_ql);
43extern qtype qtype_mergeImplicitAlt (/*@returned@*/ qtype p_q1, /*@only@*/ qtype p_q2);
44extern /*@only@*/ qtype qtype_copy (qtype p_q);
45# endif
46
47extern /*@notnull@*/ qtype qtype_create (ctype p_c) /*@*/ ;
48extern /*@only@*/ qtype qtype_unknown(void) /*@*/ ;
49extern qtype qtype_addQual (/*@returned@*/ qtype p_qt, qual p_q);
50extern qtype qtype_combine (/*@returned@*/ qtype p_q1, ctype p_ct);
51extern qtype qtype_mergeAlt (/*@returned@*/ qtype p_q1, /*@only@*/ qtype p_q2);
52
53extern qtype qtype_resolve (/*@returned@*/ qtype p_q);
495af944 54extern void qtype_adjustPointers (int p_n, /*@returned@*/ qtype p_q);
885824d3 55extern /*@only@*/ cstring qtype_unparse (qtype p_q) /*@*/ ;
56extern qtype qtype_newBase (/*@returned@*/ qtype p_q, ctype p_ct);
57extern qtype qtype_newQbase (/*@returned@*/ qtype p_q1, qtype p_q2);
58extern void qtype_free (/*@only@*/ qtype p_q);
59
495af944 60extern cstring qtype_unparseArraySize (qtype p_q);
61extern cstring qtype_unparseArrayType (qtype p_q);
62
63extern bool qtype_isFixedArray (qtype p_q) /*@*/;
64
65extern bool qtype_isArray (qtype p_q) /*@*/;
66
885824d3 67# else
68# error "Multiple include"
69# endif
This page took 0.072954 seconds and 5 git commands to generate.