]> andersk Git - splint.git/blame_incremental - src/Headers/misc.h
Fixed all /*@i...@*/ tags (except 1).
[splint.git] / src / Headers / misc.h
... / ...
CommitLineData
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
17extern void assertSet (/*@special@*/ /*@sef@*/ /*@unused@*/ void *p_x)
18 /*@sets p_x, *p_x@*/ ;
19# define assertSet(x) ;
20
21extern void assertDefined (/*@sef@*/ /*@unused@*/ void *p_x) ;
22# define assertDefined(x) ;
23
24
25/*@-czechfcns@*/
26extern int size_toInt (size_t p_x) /*@*/ /*@ensures result == p_x@*/;
27extern long size_toLong (size_t p_x) /*@*/ /*@ensures result == p_x@*/ ;
28extern size_t size_fromInt (int p_x) /*@*/ /*@ensures result == p_x@*/ ;
29extern size_t size_fromLong (long p_x) /*@*/ /*@ensures result == p_x@*/ ;
30extern size_t size_fromLongUnsigned (long unsigned p_x) /*@*/ /*@ensures result == p_x@*/ ;
31extern int longUnsigned_toInt (long unsigned int p_x) /*@*/ /*@ensures result == p_x@*/ ;
32extern int long_toInt (long p_x) /*@*/ /*@ensures result == p_x@*/;
33extern long unsigned longUnsigned_fromInt (int p_x) /*@*/ /*@ensures result == p_x@*/ ;
34/*@=czechfcns@*/
35
36# include "mstring.h"
37
38extern int int_compare (/*@sef@*/ int p_x, /*@sef@*/ int p_y) /*@*/ ;
39# define int_compare(x,y) (((x) > (y)) ? 1 : (((x) < (y)) ? -1 : 0))
40
41/*@-macroparams@*/
42/*@-macrofcndecl@*/ /* works for lots of types */
43# define generic_compare(x,y) (((x) > (y)) ? 1 : (((x) < (y)) ? -1 : 0))
44/*@=macrofcndecl@*/
45/*@=macroparams@*/
46
47/*@notfunction@*/
48# define GET(s) ((s *)smalloc(sizeof(s)))
49
50/*@-czechfcns@*/
51extern bool isHeaderFile (cstring) /*@*/ ;
52
53extern void fputline (FILE *p_out, char *p_s) /*@modifies p_out@*/;
54
55extern int int_log (int p_x) /*@*/ ;
56
57extern char char_fromInt (int p_x) /*@*/ ;
58
59extern /*@exposed@*/ cstring removePreDirs (cstring p_s);
60
61/* These are defined by the bison library (?) */
62extern /*@external@*/ int isatty (int);
63extern /*@external@*/ int yywrap (void);
64/*@=czechfcns@*/
65
66# else
67# error "Multiple include"
68# endif
69
70
71
72
73
This page took 0.042105 seconds and 5 git commands to generate.