/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.77 2003/08/04 00:43:33 momjian Exp $ */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* (C) Michael Meskes Feb 5th, 1998 */ /* Placed under the same license as PostgreSQL */ #include "postgres_fe.h" #include #include #ifdef HAVE_GETOPT_H #include #endif extern int optind; extern char *optarg; #include "extern.h" int ret_value = 0, autocommit = false, auto_create_c = false, system_includes = false, force_indicator = true; enum COMPAT_MODE compat = ECPG_COMPAT_PGSQL; struct _include_path *include_paths = NULL; struct cursor *cur = NULL; struct typedefs *types = NULL; struct _defines *defines = NULL; static void help(const char *progname) { printf("%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n", progname); printf("Usage:\n" " %s [OPTION]... FILE...\n\n", progname); printf("Options:\n"); printf(" -c automatically generate C code from embedded SQL code;\n" " currently this works for EXEC SQL TYPE\n"); #ifdef YYDEBUG printf(" -d generate parser debug output\n"); #endif printf(" -C set compatibility mode\n" " mode may be one of\n" " \"INFORMIX\"\n" " \"INFORMIX_SE\"\n"); printf(" -r