diff options
Diffstat (limited to 'src/interfaces/ecpg/preproc/ecpg.c')
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 46bacb0e8ee..3b0de973210 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -165,11 +165,11 @@ main(int argc, char *const argv[]) case 'o': output_filename = mm_strdup(optarg); if (strcmp(output_filename, "-") == 0) - yyout = stdout; + base_yyout = stdout; else - yyout = fopen(output_filename, PG_BINARY_W); + base_yyout = fopen(output_filename, PG_BINARY_W); - if (yyout == NULL) + if (base_yyout == NULL) { fprintf(stderr, _("%s: could not open file \"%s\": %s\n"), progname, output_filename, strerror(errno)); @@ -232,7 +232,7 @@ main(int argc, char *const argv[]) break; case 'd': #ifdef YYDEBUG - yydebug = 1; + base_yydebug = 1; #else fprintf(stderr, _("%s: parser debug support (-d) not available\n"), progname); @@ -280,7 +280,7 @@ main(int argc, char *const argv[]) { input_filename = mm_alloc(strlen("stdin") + 1); strcpy(input_filename, "stdin"); - yyin = stdin; + base_yyin = stdin; } else { @@ -304,13 +304,13 @@ main(int argc, char *const argv[]) ptr2ext[4] = '\0'; } - yyin = fopen(input_filename, PG_BINARY_R); + base_yyin = fopen(input_filename, PG_BINARY_R); } if (out_option == 0) /* calculate the output name */ { if (strcmp(input_filename, "stdin") == 0) - yyout = stdout; + base_yyout = stdout; else { output_filename = mm_strdup(input_filename); @@ -320,8 +320,8 @@ main(int argc, char *const argv[]) ptr2ext[1] = (header_mode == true) ? 'h' : 'c'; ptr2ext[2] = '\0'; - yyout = fopen(output_filename, PG_BINARY_W); - if (yyout == NULL) + base_yyout = fopen(output_filename, PG_BINARY_W); + if (base_yyout == NULL) { fprintf(stderr, _("%s: could not open file \"%s\": %s\n"), progname, output_filename, strerror(errno)); @@ -332,7 +332,7 @@ main(int argc, char *const argv[]) } } - if (yyin == NULL) + if (base_yyin == NULL) fprintf(stderr, _("%s: could not open file \"%s\": %s\n"), progname, argv[fnr], strerror(errno)); else @@ -427,23 +427,23 @@ main(int argc, char *const argv[]) /* we need several includes */ /* but not if we are in header mode */ if (regression_mode) - fprintf(yyout, "/* Processed by ecpg (regression mode) */\n"); + fprintf(base_yyout, "/* Processed by ecpg (regression mode) */\n"); else - fprintf(yyout, "/* Processed by ecpg (%s) */\n", PG_VERSION); + fprintf(base_yyout, "/* Processed by ecpg (%s) */\n", PG_VERSION); if (header_mode == false) { - fprintf(yyout, "/* These include files are added by the preprocessor */\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n"); + fprintf(base_yyout, "/* These include files are added by the preprocessor */\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n"); /* add some compatibility headers */ if (INFORMIX_MODE) - fprintf(yyout, "/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n"); + fprintf(base_yyout, "/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n"); - fprintf(yyout, "/* End of automatic include section */\n"); + fprintf(base_yyout, "/* End of automatic include section */\n"); } if (regression_mode) - fprintf(yyout, "#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))\n"); + fprintf(base_yyout, "#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))\n"); output_line_number(); @@ -458,10 +458,10 @@ main(int argc, char *const argv[]) if (!(ptr->opened)) mmerror(PARSE_ERROR, ET_WARNING, "cursor \"%s\" has been declared but not opened", ptr->name); - if (yyin != NULL && yyin != stdin) - fclose(yyin); - if (out_option == 0 && yyout != stdout) - fclose(yyout); + if (base_yyin != NULL && base_yyin != stdin) + fclose(base_yyin); + if (out_option == 0 && base_yyout != stdout) + fclose(base_yyout); /* * If there was an error, delete the output file. |