aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/extern.h
blob: 2a1da562a7bd0a141b97bce00cae7b57d028b805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "parser/keywords.h"
#include "type.h"
#include <errno.h>

/* defines */

#define STRUCT_DEPTH 128

/* variables */

extern int	braces_open,
		autocommit,
		ret_value,
		struct_level;
extern char *yytext,
			errortext[128];
extern int	yylineno,
			yyleng;
extern FILE *yyin,
		   *yyout;

extern struct _include_path *include_paths;
extern struct cursor *cur;
extern struct typedefs *types;
extern struct _defines *defines;
extern struct ECPGtype ecpg_no_indicator;
extern struct variable no_indicator;
extern struct arguments *argsinsert;
extern struct arguments *argsresult;
extern struct when when_error, when_nf, when_warn;
extern struct ECPGstruct_member *struct_member_list[STRUCT_DEPTH];
extern struct descriptor *descriptors;

/* functions */

extern void output_line_number(void);
extern void lex_init(void);
extern char *input_filename;
extern int	yyparse(void);
extern int	yylex(void);
extern void yyerror(char *);
extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
extern char *mm_strdup(const char *);
extern void mmerror(enum errortype, char * );
ScanKeyword *ScanECPGKeywordLookup(char *);
ScanKeyword *ScanCKeywordLookup(char *);

/* return codes */

#define OK			 0
#define PARSE_ERROR		-1
#define ILLEGAL_OPTION		-2
#define INDICATOR_NOT_ARRAY	-3

#define NO_INCLUDE_FILE		ENOENT
#define OUT_OF_MEMORY		ENOMEM