Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / src / Headers / mttok.h
blobdd321e36b73af5bc2ff91f5a99d17b2f9d989eef
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** mttok.h
8 */
10 # ifndef MTTOK_H
11 # define MTTOK_H
13 struct s_mttok
15 int tok;
16 cstring text;
17 fileloc loc;
18 } ;
20 /* in forwardTypes.h: abst_typedef struct _mttok *mttok; */
22 extern mttok mttok_create (int p_tok,
23 /*@only@*/ cstring p_text,
24 /*@only@*/ fileloc p_loc) /*@modifies nothing@*/ ;
25 extern /*@only@*/ cstring mttok_unparse (mttok p_tok) /*@*/ ;
27 extern void mttok_free (/*@only@*/ mttok p_t) ;
29 extern int mttok_getTok (mttok p_t) /*@*/ ;
30 # define mttok_getTok(t) ((t)->tok)
32 extern /*@dependent@*/ /*@exposed@*/ fileloc mttok_getLoc (mttok p_t) /*@*/ ;
33 # define mttok_getLoc(t) ((t)->loc)
35 extern /*@only@*/ fileloc mttok_stealLoc (mttok p_t) /*@modifies p_t@*/ ;
37 extern /*@only@*/ cstring mttok_getText (mttok p_t) /*@*/ ;
38 # define mttok_getText(t) (cstring_copy ((t)->text))
40 extern /*@observer@*/ cstring mttok_observeText (mttok p_t) /*@*/ ;
41 # define mttok_observeText(t) ((t)->text)
43 extern bool mttok_isIdentifier (mttok p_t) /*@*/ ;
45 # else
46 # error "Multiple include"
47 # endif