]> andersk Git - splint.git/blob - src/Headers/globals.h
noexpand always false.
[splint.git] / src / Headers / globals.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
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 /* stream for error messages */
25 /*@unchecked@*/ extern /*@null@*/ /*@dependent@*/ /*:open:*/ FILE *g_csvstream; 
26
27 /*@-ansireserved@*/
28 /* This macro is defined by flex. */
29 /*@constant external int ECHO@*/
30 /*@=ansireserved@*/
31
32 /*@-redecl@*/
33 /*@-incondefs@*/ 
34 /*@-namechecks@*/
35 /*@-declundef@*/ /* Might not process grammar files */
36 extern /*@dependent@*/ /*@open@*/ FILE *yyin;
37 extern /*@dependent@*/ /*@open@*/ /*@unused@*/ FILE *yyout;
38 extern /*@unused@*/ int yyleng;
39 /*@=incondefs@*/ 
40
41 extern int yydebug;
42 /*@=redecl@*/
43 /*@=declundef@*/
44 /*@=namechecks@*/
45
46 extern /*@observer@*/ cstring g_codeFile;
47 extern int g_codeLine;
48
49 extern /*@observer@*/ cstring g_prevCodeFile;
50 extern int g_prevCodeLine;
51
52 extern /*@observer@*/ char *g_localSpecPath;
53
54 extern /*@only@*/ cstring g_currentSpec;
55 extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
56
57 extern void setCodePoint (void);
58 # define setCodePoint() \
59   (g_prevCodeFile = g_codeFile, g_prevCodeLine = g_codeLine, \
60    g_codeFile = cstring_makeLiteralTemp (__FILE__), g_codeLine = __LINE__)
61
62 extern void printCodePoint (void);
63
64 extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
65 # define currentFile()               (fileloc_fileId (g_currentloc))
66
67 extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
68 # define currentColumn()             (fileloc_column(g_currentloc))
69
70 extern void incColumn (void) 
71    /*@globals g_currentloc; @*/ 
72    /*@modifies g_currentloc@*/ ;
73 # define incColumn()                  (fileloc_incColumn(g_currentloc)) 
74
75 extern void decColumn (void)
76    /*@globals g_currentloc; @*/ 
77    /*@modifies g_currentloc@*/ ;
78 # define decColumn()                  (fileloc_addColumn(g_currentloc, -1))
79
80 extern void incLine (void)
81    /*@globals g_currentloc; @*/ 
82    /*@modifies g_currentloc; @*/ ;
83 # define incLine()                    (fileloc_nextLine(g_currentloc))
84
85 extern void decLine (void)
86    /*@globals g_currentloc; @*/ 
87    /*@modifies g_currentloc; @*/ ;
88 # define decLine()                    (fileloc_addLine (g_currentloc, -1))
89
90 extern void beginLine (void)
91    /*@globals g_currentloc; @*/ 
92    /*@modifies g_currentloc; @*/ ;
93 # define beginLine()                  (fileloc_setColumn(g_currentloc, 1))
94
95 extern void addColumn (int p_n)
96    /*@globals g_currentloc; @*/ 
97    /*@modifies g_currentloc; @*/ ;
98 # define addColumn(n)                 (fileloc_addColumn(g_currentloc, n))
99
100 extern void setLine (int p_n)
101    /*@globals fileloc g_currentloc; @*/ 
102    /*@modifies g_currentloc; @*/ ;
103 # define setLine(n)                   (fileloc_setLineno(g_currentloc, n))
104
105 extern void setColumn (int p_n)
106    /*@globals fileloc g_currentloc; @*/ 
107    /*@modifies g_currentloc; @*/ ;
108 # define setColumn(n)                 (fileloc_setColumn(g_currentloc, n))
109
110 extern void setSpecFileId (fileId p_s)
111    /*@globals fileloc g_currentloc; @*/ 
112    /*@modifies g_currentloc; @*/ ;
113 # define setSpecFileId(s) \
114   (fileloc_reallyFree (g_currentloc), g_currentloc = fileloc_createSpec (s, 1, 1))
115
116 extern void setFileLine (fileId p_s, int p_line)
117    /*@globals fileloc g_currentloc; @*/ 
118    /*@modifies g_currentloc; @*/ ;
119 # define setFileLine(s, line) \
120   (context_setFilename(s, line))
121
122 # else
123 # error "Multiple include"
124 # endif
125
126
127
128
129
130
This page took 0.056553 seconds and 5 git commands to generate.