]> 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
885824d3 27extern int yydebug;
28/*@=redecl@*/
29/*@=namechecks@*/
30
31extern /*@observer@*/ cstring g_codeFile;
32extern int g_codeLine;
33
34extern /*@observer@*/ cstring g_prevCodeFile;
35extern int g_prevCodeLine;
36
37extern /*@observer@*/ char *g_localSpecPath;
38
39# ifndef NOLCL
40extern /*@only@*/ cstring g_currentSpec;
41extern /*@null@*/ /*@only@*/ char *g_currentSpecName;
42# endif
43
44extern 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
49extern void printCodePoint (void);
50
51extern fileId currentFile (void) /*@globals g_currentloc; @*/ ;
52# define currentFile() (fileloc_fileId (g_currentloc))
53
54extern int currentColumn (void) /*@globals g_currentloc; @*/ ;
55# define currentColumn() (fileloc_column(g_currentloc))
56
57extern void incColumn (void)
28bf4b0b 58 /*@globals g_currentloc; @*/
885824d3 59 /*@modifies g_currentloc@*/ ;
60# define incColumn() (fileloc_incColumn(g_currentloc))
61
62extern void decColumn (void)
28bf4b0b 63 /*@globals g_currentloc; @*/
885824d3 64 /*@modifies g_currentloc@*/ ;
65# define decColumn() (fileloc_addColumn(g_currentloc, -1))
66
67extern void incLine (void)
28bf4b0b 68 /*@globals g_currentloc; @*/
885824d3 69 /*@modifies g_currentloc; @*/ ;
70# define incLine() (fileloc_nextLine(g_currentloc))
71
72extern void decLine (void)
28bf4b0b 73 /*@globals g_currentloc; @*/
885824d3 74 /*@modifies g_currentloc; @*/ ;
75# define decLine() (fileloc_addLine (g_currentloc, -1))
76
77extern void beginLine (void)
28bf4b0b 78 /*@globals g_currentloc; @*/
885824d3 79 /*@modifies g_currentloc; @*/ ;
80# define beginLine() (fileloc_setColumn(g_currentloc, 1))
81
82extern void addColumn (int p_n)
28bf4b0b 83 /*@globals g_currentloc; @*/
885824d3 84 /*@modifies g_currentloc; @*/ ;
85# define addColumn(n) (fileloc_addColumn(g_currentloc, n))
86
87extern void setLine (int p_n)
88 /*@globals fileloc g_currentloc; @*/
89 /*@modifies g_currentloc; @*/ ;
90# define setLine(n) (fileloc_setLineno(g_currentloc, n))
91
92extern 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
98extern 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
105extern 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
28bf4b0b 111/*@constant int PRINTBREADTH;@*/ /* For printing lists. Should be parameter... */ /*@i32@*/
112# define PRINTBREADTH 3
113
885824d3 114# else
115# error "Multiple include"
116# endif
117
118
119
120
121
122
This page took 0.074065 seconds and 5 git commands to generate.