]> andersk Git - splint.git/blob - src/Headers/stateCombinationTable.h
75646618a3aef51c119f5920da3751a683dd0d24
[splint.git] / src / Headers / stateCombinationTable.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** stateCombinationTable.h
8 */
9
10 # ifndef STATECOMBINATIONTABLE_H
11 # define STATECOMBINATIONTABLE_H
12
13 /*
14 ** stateCombinationTable is a mapping: int x int -> int x cstring
15 ** The int values must be in a fixed (pre-defined) range, 0, ..., max.
16 */
17
18 typedef struct {
19     int value;
20     cstring msg;
21 } *stateEntry;
22
23 /*@i23 typedef @only@ stateEntry o_stateEntry; */
24
25 typedef struct
26 {
27     int size;
28     /*@only@*/ stateEntry *entries;
29 } *stateRow;
30
31 # if 0
32 this breaks comething? typedef /*@only@*/ stateRow o_stateRow; /*@i324*/
33 # endif
34
35 abst_typedef struct
36 {
37     int size;
38     /*@only@*/ stateRow *rows;
39 } *stateCombinationTable;
40
41 extern /*@only@*/ stateCombinationTable stateCombinationTable_create (int p_size);
42
43 extern void stateCombinationTable_set (stateCombinationTable p_h, 
44                                        int p_from, int p_to, 
45                                        int p_value,
46                                        /*@only@*/ cstring p_msg);
47
48 extern void stateCombinationTable_update (stateCombinationTable p_h, 
49                                           int p_from, int p_to, 
50                                           int p_value,
51                                           /*@only@*/ cstring p_msg);
52
53 extern int stateCombinationTable_lookup 
54                (stateCombinationTable p_h, int p_from,
55                 int p_to, /*@out@*/ /*@observer@*/ cstring *p_msg);
56
57 extern int stateCombinationTable_lookupLoseReference 
58                (stateCombinationTable p_h, int p_from,
59                 /*@out@*/ /*@observer@*/ cstring *p_msg);
60
61 extern void stateCombinationTable_free (/*@only@*/ stateCombinationTable p_t);
62
63 extern int stateCombinationTable_size (stateCombinationTable p_h) /*@*/ ;
64 # define stateCombinationTable_size(h) ((h)->size)
65
66 extern cstring stateCombinationTable_unparse (stateCombinationTable) /*@*/ ;
67
68 # else
69 # error "Multiple include"
70 # endif 
71
72
73
74
75
76
77
78
79
80
81
82
83
This page took 0.037614 seconds and 3 git commands to generate.