]> andersk Git - splint.git/blame - src/Headers/ekind.h
Updating to use the LEnsures and LRequires instead of the ensures requires so
[splint.git] / src / Headers / ekind.h
CommitLineData
885824d3 1/*
2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000.
3** See ../LICENSE for license information.
4**
5*/
6# ifndef EKIND_H
7# define EKIND_H
8
9/* need to maintain compatibility with libraries */
10
11immut_typedef enum {
12 KINVALID = -1,
13 KDATATYPE = 0, /* must dump datatypes first, so ctypes are ok */
14 KCONST, KENUMCONST,
15 KVAR, KFCN, KITER, KENDITER,
16 KSTRUCTTAG, KUNIONTAG, KENUMTAG,
17 KELIPSMARKER
18 } ekind;
19
20/*@constant ekind KELAST;@*/
21# define KELAST KELIPSMARKER
22
23extern bool ekind_equal (ekind, ekind) /*@*/ ;
24# define ekind_equal(e1, e2) ((e1) == (e2))
25
26extern ekind ekind_fromInt (int p_i) /*@*/ ;
27extern int ekind_toInt (ekind p_k) /*@*/ ;
28
29extern bool ekind_isFunction (ekind p_k) /*@*/ ;
30# define ekind_isFunction(k) ((k) == KFCN)
31
32extern /*@unused@*/ bool ekind_isVariable (ekind p_k) /*@*/ ;
33# define ekind_isVariable(k) ((k) == KVAR)
34
35extern bool ekind_isElipsis (ekind p_k) /*@*/ ;
36# define ekind_isElipsis(k) ((k) == KELIPSMARKER)
37
38extern bool ekind_isConst (ekind p_k) /*@*/ ;
39# define ekind_isConst(k) ((k) == KCONST)
40
41extern bool ekind_isEnumConst (ekind p_k) /*@*/ ;
42# define ekind_isEnumConst(k) ((k) == KENUMCONST)
43
44# define ekind_toInt(k) ((int)(k))
45
46/*@constant ekind ekind_variable; @*/
47# define ekind_variable ((ekind)KVAR)
48
49/*@constant ekind ekind_function; @*/
50# define ekind_function ((ekind)KFCN)
51
52extern /*@observer@*/ cstring ekind_capName (ekind p_k) /*@*/ ;
53extern /*@observer@*/ cstring ekind_unparse (ekind p_k) /*@*/ ;
54extern /*@observer@*/ cstring ekind_unparseLong (ekind p_k) /*@*/ ;
55
56# else
57# error "Multiple include"
58# endif
This page took 0.119639 seconds and 5 git commands to generate.