]> andersk Git - splint.git/blob - src/Headers/globals.h
Updated library headers to include some missing functions.
[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 /* stream for error messages */
12 extern /*:open:*/ FILE *g_msgstream; 
13
14 /*@-ansireserved@*/
15 /* This macro is defined by flex. */
16 /*@constant external int ECHO@*/
17 /*@=ansireserved@*/
18
19 /*@-redecl@*/
20 /*@-incondefs@*/ 
21 /*@-namechecks@*/
22 extern /*@dependent@*/ /*:open:*/ FILE *yyin;
23 extern /*@dependent@*/ /*:open:*/ FILE *yyout;
24 extern int yyleng;
25 /*@=incondefs@*/ 
26
27 extern int yydebug;
28 /*@=redecl@*/
29 /*@=namechecks@*/
30
31 extern /*@observer@*/ cstring g_codeFile;
32 extern int g_codeLine;
33
34 extern /*@observer@*/ cstring g_prevCodeFile;
35 extern int g_prevCodeLine;
36
37 extern /*@observer@*/ char *g_localSpecPath;
38
39 # ifndef NOLCL
40 extern /*@only@*/ cstring g_currentSpec;
41 extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
42 # endif
43
44 extern void setCodePoint (void);
45 # define setCodePoint() \
46   (g_prevCodeFile = g_codeFile, g_prevCodeLine = g_codeLine, \
47    g_codeFile = cstring_makeLiteralTemp (__FILE__), g_codeLine = __LINE__)
48
49 extern void printCodePoint (void);
50
51 extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
52 # define currentFile()               (fileloc_fileId (g_currentloc))
53
54 extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
55 # define currentColumn()             (fileloc_column(g_currentloc))
56
57 extern void incColumn (void) 
58    /*@globals g_currentloc; @*/ 
59    /*@modifies g_currentloc@*/ ;
60 # define incColumn()                  (fileloc_incColumn(g_currentloc)) 
61
62 extern void decColumn (void)
63    /*@globals g_currentloc; @*/ 
64    /*@modifies g_currentloc@*/ ;
65 # define decColumn()                  (fileloc_addColumn(g_currentloc, -1))
66
67 extern void incLine (void)
68    /*@globals g_currentloc; @*/ 
69    /*@modifies g_currentloc; @*/ ;
70 # define incLine()                    (fileloc_nextLine(g_currentloc))
71
72 extern void decLine (void)
73    /*@globals g_currentloc; @*/ 
74    /*@modifies g_currentloc; @*/ ;
75 # define decLine()                    (fileloc_addLine (g_currentloc, -1))
76
77 extern void beginLine (void)
78    /*@globals g_currentloc; @*/ 
79    /*@modifies g_currentloc; @*/ ;
80 # define beginLine()                  (fileloc_setColumn(g_currentloc, 1))
81
82 extern void addColumn (int p_n)
83    /*@globals g_currentloc; @*/ 
84    /*@modifies g_currentloc; @*/ ;
85 # define addColumn(n)                 (fileloc_addColumn(g_currentloc, n))
86
87 extern void setLine (int p_n)
88    /*@globals fileloc g_currentloc; @*/ 
89    /*@modifies g_currentloc; @*/ ;
90 # define setLine(n)                   (fileloc_setLineno(g_currentloc, n))
91
92 extern void setColumn (int p_n)
93    /*@globals fileloc g_currentloc; @*/ 
94    /*@modifies g_currentloc; @*/ ;
95 # define setColumn(n)                 (fileloc_setColumn(g_currentloc, n))
96
97 # ifndef NOLCL
98 extern void setSpecFileId (fileId p_s)
99    /*@globals fileloc g_currentloc; @*/ 
100    /*@modifies g_currentloc; @*/ ;
101 # define setSpecFileId(s) \
102   (fileloc_reallyFree (g_currentloc), g_currentloc = fileloc_createSpec (s, 1, 1))
103 # endif
104
105 extern void setFileLine (fileId p_s, int p_line)
106    /*@globals fileloc g_currentloc; @*/ 
107    /*@modifies g_currentloc; @*/ ;
108 # define setFileLine(s, line) \
109   (context_setFilename(s, line))
110
111 /*@constant int PRINTBREADTH;@*/ /* For printing lists.  Should be parameter... */ /*@i32@*/
112 # define PRINTBREADTH 3
113
114 # else
115 # error "Multiple include"
116 # endif
117
118
119
120
121
122
This page took 0.08535 seconds and 5 git commands to generate.