]> andersk Git - splint.git/blame - src/Headers/globals.h
Updated copyrights
[splint.git] / src / Headers / globals.h
CommitLineData
885824d3 1/*
c0de361f 2** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
885824d3 3** See ../LICENSE for license information.
4**
5*/
6# ifndef GLOBALS_H
7# define GLOBALS_H
8
9extern /*@owned@*/ fileloc g_currentloc;
10
80489f0a 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
885824d3 21/* stream for error messages */
80489f0a 22/*@unchecked@*/ extern /*@relnull@*/ /*@dependent@*/ /*:open:*/ FILE *g_errorstream;
885824d3 23
53306cab 24/* stream for error messages */
25/*@unchecked@*/ extern /*@null@*/ /*@dependent@*/ /*:open:*/ FILE *g_csvstream;
26
885824d3 27/*@-ansireserved@*/
28/* This macro is defined by flex. */
29/*@constant external int ECHO@*/
30/*@=ansireserved@*/
31
32/*@-redecl@*/
33/*@-incondefs@*/
34/*@-namechecks@*/
a956d444 35/*@-declundef@*/ /* Might not process grammar files */
36extern /*@dependent@*/ /*@open@*/ FILE *yyin;
37extern /*@dependent@*/ /*@open@*/ /*@unused@*/ FILE *yyout;
38extern /*@unused@*/ int yyleng;
885824d3 39/*@=incondefs@*/
40
885824d3 41extern int yydebug;
42/*@=redecl@*/
a956d444 43/*@=declundef@*/
885824d3 44/*@=namechecks@*/
45
46extern /*@observer@*/ cstring g_codeFile;
47extern int g_codeLine;
48
49extern /*@observer@*/ cstring g_prevCodeFile;
50extern int g_prevCodeLine;
51
52extern /*@observer@*/ char *g_localSpecPath;
53
885824d3 54extern /*@only@*/ cstring g_currentSpec;
55extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
885824d3 56
57extern 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
62extern void printCodePoint (void);
63
64extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
65# define currentFile() (fileloc_fileId (g_currentloc))
66
67extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
68# define currentColumn() (fileloc_column(g_currentloc))
69
70extern void incColumn (void)
28bf4b0b 71 /*@globals g_currentloc; @*/
885824d3 72 /*@modifies g_currentloc@*/ ;
73# define incColumn() (fileloc_incColumn(g_currentloc))
74
75extern void decColumn (void)
28bf4b0b 76 /*@globals g_currentloc; @*/
885824d3 77 /*@modifies g_currentloc@*/ ;
78# define decColumn() (fileloc_addColumn(g_currentloc, -1))
79
80extern void incLine (void)
28bf4b0b 81 /*@globals g_currentloc; @*/
885824d3 82 /*@modifies g_currentloc; @*/ ;
83# define incLine() (fileloc_nextLine(g_currentloc))
84
85extern void decLine (void)
28bf4b0b 86 /*@globals g_currentloc; @*/
885824d3 87 /*@modifies g_currentloc; @*/ ;
88# define decLine() (fileloc_addLine (g_currentloc, -1))
89
90extern void beginLine (void)
28bf4b0b 91 /*@globals g_currentloc; @*/
885824d3 92 /*@modifies g_currentloc; @*/ ;
93# define beginLine() (fileloc_setColumn(g_currentloc, 1))
94
95extern void addColumn (int p_n)
28bf4b0b 96 /*@globals g_currentloc; @*/
885824d3 97 /*@modifies g_currentloc; @*/ ;
98# define addColumn(n) (fileloc_addColumn(g_currentloc, n))
99
100extern void setLine (int p_n)
101 /*@globals fileloc g_currentloc; @*/
102 /*@modifies g_currentloc; @*/ ;
103# define setLine(n) (fileloc_setLineno(g_currentloc, n))
104
105extern void setColumn (int p_n)
106 /*@globals fileloc g_currentloc; @*/
107 /*@modifies g_currentloc; @*/ ;
108# define setColumn(n) (fileloc_setColumn(g_currentloc, n))
109
885824d3 110extern 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))
885824d3 115
116extern 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.081559 seconds and 5 git commands to generate.