]> andersk Git - splint.git/blob - src/Headers/globals.h
Committed my changes (but there are several splintme errors currently).
[splint.git] / src / Headers / globals.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
4 **
5 */
6 # ifndef GLOBALS_H
7 # define GLOBALS_H
8
9 extern /*@owned@*/ fileloc g_currentloc;
10
11 /*
12 ** All the streams are unchecked for now. 
13 */
14
15 /* stream for warning messages */
16 /*@unchecked@*/ extern /*@relnull@*/ /*@dependent@*/ /*:open:*/ FILE *g_warningstream; 
17
18 /* stream for status messages */
19 /*@unchecked@*/ extern /*@relnull@*/ /*@dependent@*/ /*:open:*/ FILE *g_messagestream; 
20
21 /* stream for error messages */
22 /*@unchecked@*/ extern /*@relnull@*/ /*@dependent@*/ /*:open:*/ FILE *g_errorstream; 
23
24 /*@-ansireserved@*/
25 /* This macro is defined by flex. */
26 /*@constant external int ECHO@*/
27 /*@=ansireserved@*/
28
29 /*@-redecl@*/
30 /*@-incondefs@*/ 
31 /*@-namechecks@*/
32 /*@-declundef@*/ /* Might not process grammar files */
33 extern /*@dependent@*/ /*@open@*/ FILE *yyin;
34 extern /*@dependent@*/ /*@open@*/ /*@unused@*/ FILE *yyout;
35 extern /*@unused@*/ int yyleng;
36 /*@=incondefs@*/ 
37
38 extern int yydebug;
39 /*@=redecl@*/
40 /*@=declundef@*/
41 /*@=namechecks@*/
42
43 extern /*@observer@*/ cstring g_codeFile;
44 extern int g_codeLine;
45
46 extern /*@observer@*/ cstring g_prevCodeFile;
47 extern int g_prevCodeLine;
48
49 extern /*@observer@*/ char *g_localSpecPath;
50
51 extern /*@only@*/ cstring g_currentSpec;
52 extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
53
54 extern void setCodePoint (void);
55 # define setCodePoint() \
56   (g_prevCodeFile = g_codeFile, g_prevCodeLine = g_codeLine, \
57    g_codeFile = cstring_makeLiteralTemp (__FILE__), g_codeLine = __LINE__)
58
59 extern void printCodePoint (void);
60
61 extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
62 # define currentFile()               (fileloc_fileId (g_currentloc))
63
64 extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
65 # define currentColumn()             (fileloc_column(g_currentloc))
66
67 extern void incColumn (void) 
68    /*@globals g_currentloc; @*/ 
69    /*@modifies g_currentloc@*/ ;
70 # define incColumn()                  (fileloc_incColumn(g_currentloc)) 
71
72 extern void decColumn (void)
73    /*@globals g_currentloc; @*/ 
74    /*@modifies g_currentloc@*/ ;
75 # define decColumn()                  (fileloc_addColumn(g_currentloc, -1))
76
77 extern void incLine (void)
78    /*@globals g_currentloc; @*/ 
79    /*@modifies g_currentloc; @*/ ;
80 # define incLine()                    (fileloc_nextLine(g_currentloc))
81
82 extern void decLine (void)
83    /*@globals g_currentloc; @*/ 
84    /*@modifies g_currentloc; @*/ ;
85 # define decLine()                    (fileloc_addLine (g_currentloc, -1))
86
87 extern void beginLine (void)
88    /*@globals g_currentloc; @*/ 
89    /*@modifies g_currentloc; @*/ ;
90 # define beginLine()                  (fileloc_setColumn(g_currentloc, 1))
91
92 extern void addColumn (int p_n)
93    /*@globals g_currentloc; @*/ 
94    /*@modifies g_currentloc; @*/ ;
95 # define addColumn(n)                 (fileloc_addColumn(g_currentloc, n))
96
97 extern void setLine (int p_n)
98    /*@globals fileloc g_currentloc; @*/ 
99    /*@modifies g_currentloc; @*/ ;
100 # define setLine(n)                   (fileloc_setLineno(g_currentloc, n))
101
102 extern void setColumn (int p_n)
103    /*@globals fileloc g_currentloc; @*/ 
104    /*@modifies g_currentloc; @*/ ;
105 # define setColumn(n)                 (fileloc_setColumn(g_currentloc, n))
106
107 extern void setSpecFileId (fileId p_s)
108    /*@globals fileloc g_currentloc; @*/ 
109    /*@modifies g_currentloc; @*/ ;
110 # define setSpecFileId(s) \
111   (fileloc_reallyFree (g_currentloc), g_currentloc = fileloc_createSpec (s, 1, 1))
112
113 extern void setFileLine (fileId p_s, int p_line)
114    /*@globals fileloc g_currentloc; @*/ 
115    /*@modifies g_currentloc; @*/ ;
116 # define setFileLine(s, line) \
117   (context_setFilename(s, line))
118
119 # else
120 # error "Multiple include"
121 # endif
122
123
124
125
126
127
This page took 0.044384 seconds and 5 git commands to generate.