37 printf(
_(
"%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n"),
40 " %s [OPTION]... FILE...\n\n"),
43 printf(
_(
" -c automatically generate C code from embedded SQL code;\n"
44 " this affects EXEC SQL TYPE\n"));
45 printf(
_(
" -C MODE set compatibility mode; MODE can be one of\n"
46 " \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"));
48 printf(
_(
" -d generate parser debug output\n"));
50 printf(
_(
" -D SYMBOL define SYMBOL\n"));
51 printf(
_(
" -h parse a header file, this option includes option \"-c\"\n"));
52 printf(
_(
" -i parse system include files as well\n"));
53 printf(
_(
" -I DIRECTORY search DIRECTORY for include files\n"));
54 printf(
_(
" -o OUTFILE write result to OUTFILE\n"));
55 printf(
_(
" -r OPTION specify run-time behavior; OPTION can be:\n"
56 " \"no_indicator\", \"prepare\", \"questionmarks\"\n"));
57 printf(
_(
" --regression run in regression testing mode\n"));
58 printf(
_(
" -t turn on autocommit of transactions\n"));
59 printf(
_(
" -V, --version output version information, then exit\n"));
60 printf(
_(
" -?, --help show this help, then exit\n"));
61 printf(
_(
"\nIf no output file is specified, the name is formed by adding .c to the\n"
62 "input file name, after stripping off .pgc if present.\n"));
107 for (tmp = ptr - 1; tmp >=
define_copy && *tmp ==
' '; tmp--);
114 newdef->cmdvalue = ptr + 1;
128#define ECPG_GETOPT_LONG_REGRESSION 1
130main(
int argc,
char *
const argv[])
152 fprintf(
stderr,
_(
"%s: could not locate my own executable path\n"), argv[0]);
158 if (
strcmp(argv[1],
"--help") == 0 ||
strcmp(argv[1],
"-?") == 0)
163 if (
strcmp(argv[1],
"--version") == 0 ||
strcmp(argv[1],
"-V") == 0)
195 fprintf(
stderr,
_(
"Try \"%s --help\" for more information.\n"), argv[0]);
203 fprintf(
stderr,
_(
"%s: parser debug support (-d) not available\n"),
246 fprintf(
stderr,
_(
"Try \"%s --help\" for more information.\n"), argv[0]);
260 fprintf(
stderr,
_(
"Try \"%s --help\" for more information.\n"), argv[0]);
274 _(
"%s, the PostgreSQL embedded C preprocessor, version %s\n"),
286 fprintf(
stderr,
_(
"Try \"%s --help\" for more information.\n"), argv[0]);
370 struct cursor *
this = ptr;
468 fprintf(
base_yyout,
"/* These include files are added by the preprocessor */\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n");
472 fprintf(
base_yyout,
"/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n");
#define PG_TEXTDOMAIN(domain)
int find_my_exec(const char *argv0, char *retpath)
void set_pglocale_pgservice(const char *argv0, const char *app)
#define fprintf(file, fmt, msg)
struct _include_path * include_paths
static void add_include_path(char *path)
struct _defines * defines
static void add_preprocessor_define(char *define)
static const char * progname
#define ECPG_GETOPT_LONG_REGRESSION
struct declared_list * g_declared_list
@ ECPG_COMPAT_INFORMIX_SE
int getopt_long(int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
char my_exec_path[MAXPGPATH]
void output_line_number(void)
struct when when_error when_nf when_warn
PGDLLIMPORT char * optarg
void get_include_path(const char *my_exec_path, char *ret_path)
char * last_dir_separator(const char *filename)
int pg_strcasecmp(const char *s1, const char *s2)
const char * get_progname(const char *argv0)
void get_pkginclude_path(const char *my_exec_path, char *ret_path)
char * mm_strdup(const char *string)
void mmerror(int error_code, enum errortype type, const char *error,...) pg_attribute_printf(3
void * mm_alloc(size_t size)
struct ECPGstruct_member * struct_member_list[STRUCT_DEPTH]
struct _include_path * next
struct arguments * argsinsert
struct arguments * argsresult
void ECPGfree_struct_member(struct ECPGstruct_member *rm)