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