]> granicus.if.org Git - postgresql/blob - src/interfaces/ecpg/preproc/extern.h
From: Dr. Michael Meskes <meskes@online-club.de>
[postgresql] / src / interfaces / ecpg / preproc / extern.h
1 #include "parser/keywords.h"
2 #include <errno.h>
3
4 /* variables */
5
6 extern int  braces_open;
7 extern char *yytext;
8 extern int      yylineno,
9                         yyleng;
10 extern FILE *yyin,
11                    *yyout;
12
13 struct _include_path {  char * path;
14                         struct _include_path * next;
15                      };
16
17 extern struct _include_path *include_paths;
18
19 /* This is a linked list of the variable names and types. */
20 struct variable
21 {
22     char * name;
23     struct ECPGtype * type;
24     int brace_level;
25     struct variable * next;
26 };
27                 
28 extern struct ECPGtype ecpg_no_indicator;
29 extern struct variable no_indicator;
30
31 /* functions */
32
33 extern void lex_init(void);
34 extern char *input_filename;
35 extern int      yyparse(void);
36 extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
37 ScanKeyword * ScanECPGKeywordLookup(char *);
38 ScanKeyword * ScanCKeywordLookup(char *);
39 extern void yyerror(char *);
40
41 /* return codes */
42
43 #define OK              0
44 #define PARSE_ERROR     -1
45 #define ILLEGAL_OPTION  -2
46
47 #define NO_INCLUDE_FILE ENOENT
48 #define OUT_OF_MEMORY   ENOMEM