]> andersk Git - splint.git/blob - src/Headers/misc.h
35244e4d7c1f78525b2b3ef3c886624bc822c57d
[splint.git] / src / Headers / misc.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** misc.h
8 **
9 ** (general.c)
10 */
11
12 # ifndef MISC_H
13 # define MISC_H
14
15 # include "lclMisc.h"
16
17 extern void assertSet (/*@special@*/ /*@sef@*/ /*@unused@*/ void *p_x) 
18    /*@sets p_x, *p_x@*/ ;
19 # define assertSet(x) ;
20
21 extern void assertDefined (/*@sef@*/ /*@unused@*/ void *p_x) ;
22 # define assertDefined(x) ;
23
24
25 /*@-czechfcns@*/
26 extern int size_toInt (size_t p_x) /*@*/ /*@ensures result == p_x@*/;
27 extern long size_toLong (size_t p_x) /*@*/ /*@ensures result == p_x@*/ ;
28 extern size_t size_fromInt (int p_x) /*@*/ /*@ensures result == p_x@*/ ;
29 extern size_t size_fromLong (long p_x) /*@*/ /*@ensures result == p_x@*/ ;
30 extern size_t size_fromLongUnsigned (long unsigned p_x) /*@*/ /*@ensures result == p_x@*/ ;
31 extern int longUnsigned_toInt (long unsigned int p_x) /*@*/ /*@ensures result == p_x@*/ ;
32 extern int long_toInt (long p_x) /*@*/ /*@ensures result == p_x@*/;
33 extern long unsigned longUnsigned_fromInt (int p_x) /*@*/  /*@ensures result == p_x@*/ ;
34 /*@=czechfcns@*/
35
36 # include "mstring.h"
37
38
39 extern int int_compare (/*@sef@*/ int p_x, /*@sef@*/ int p_y) /*@*/ ;
40 # define int_compare(x,y) (((x) > (y)) ? 1 : (((x) < (y)) ? -1 : 0))
41
42 /*@-macroparams@*/
43 /*@-macrofcndecl@*/ /* works for lots of types */
44 # define generic_compare(x,y) (((x) > (y)) ? 1 : (((x) < (y)) ? -1 : 0)) 
45 /*@=macrofcndecl@*/
46 /*@=macroparams@*/
47
48 /*@notfunction@*/
49 # define GET(s) ((s *)smalloc(sizeof(s)))
50
51 /*@-czechfcns@*/
52 extern bool isHeaderFile (cstring) /*@*/ ;
53
54 extern void fputline (FILE *p_out, char *p_s) /*@modifies p_out@*/;
55
56 extern int int_log (int p_x) /*@*/ ;
57
58 extern char char_fromInt (int p_x) /*@*/ ;
59
60 extern /*@exposed@*/ cstring removePreDirs (cstring p_s);
61
62 /* These are defined by the bison library (?) */
63 extern /*@external@*/ int isatty (int);
64 extern /*@external@*/ int yywrap (void);
65 /*@=czechfcns@*/
66
67 # else
68 # error "Multiple include"
69 # endif
70
71
72
73
74
This page took 0.028345 seconds and 3 git commands to generate.