diff options
Diffstat (limited to 'src/interfaces/ecpg/preproc')
| -rw-r--r-- | src/interfaces/ecpg/preproc/descriptor.c | 6 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.c | 76 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/pgc.l | 48 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/preproc.y | 97 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/type.c | 26 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/variable.c | 24 |
6 files changed, 141 insertions, 136 deletions
diff --git a/src/interfaces/ecpg/preproc/descriptor.c b/src/interfaces/ecpg/preproc/descriptor.c index 5d506e50c8..587efc54f0 100644 --- a/src/interfaces/ecpg/preproc/descriptor.c +++ b/src/interfaces/ecpg/preproc/descriptor.c @@ -1,7 +1,7 @@ /* * functions needed for descriptor handling * - * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.26 2007/12/21 14:33:20 meskes Exp $ + * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.27 2008/05/16 15:20:04 petere Exp $ * * since descriptor might be either a string constant or a string var * we need to check for a constant if we expect a constant @@ -158,7 +158,7 @@ output_get_descr_header(char *desc_name) if (results->value == ECPGd_count) ECPGnumeric_lvalue(results->variable); else - mmerror(PARSE_ERROR, ET_WARNING, "unknown descriptor header item '%d'", results->value); + mmerror(PARSE_ERROR, ET_WARNING, "unknown descriptor header item \"%d\"", results->value); } drop_assignments(); @@ -207,7 +207,7 @@ output_set_descr_header(char *desc_name) if (results->value == ECPGd_count) ECPGnumeric_lvalue(results->variable); else - mmerror(PARSE_ERROR, ET_WARNING, "unknown descriptor header item '%d'", results->value); + mmerror(PARSE_ERROR, ET_WARNING, "unknown descriptor header item \"%d\"", results->value); } drop_assignments(); diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 8052fa18c1..5c3245bd88 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.104 2008/02/17 18:14:29 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.105 2008/05/16 15:20:04 petere Exp $ */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */ @@ -33,36 +33,36 @@ struct _defines *defines = NULL; static void help(const char *progname) { - printf("%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n", + printf(_("%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n"), progname); - printf("Usage:\n" - " %s [OPTION]... FILE...\n\n", + 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"); - printf(" -C MODE set compatibility mode;\n" - " MODE can be one of \"INFORMIX\", \"INFORMIX_SE\"\n"); + printf(_("Options:\n")); + printf(_(" -c automatically generate C code from embedded SQL code;\n" + " currently this works for EXEC SQL TYPE\n")); + printf(_(" -C MODE set compatibility mode;\n" + " MODE can be one of \"INFORMIX\", \"INFORMIX_SE\"\n")); #ifdef YYDEBUG - printf(" -d generate parser debug output\n"); + printf(_(" -d generate parser debug output\n")); #endif - printf(" -D SYMBOL define SYMBOL\n"); - printf(" -h parse a header file, this option includes option \"-c\"\n"); - printf(" -i parse system include files as well\n"); - printf(" -I DIRECTORY search DIRECTORY for include files\n"); - printf(" -o OUTFILE write result to OUTFILE\n"); - printf(" -r OPTION specify runtime behaviour;\n" + printf(_(" -D SYMBOL define SYMBOL\n")); + printf(_(" -h parse a header file, this option includes option \"-c\"\n")); + printf(_(" -i parse system include files as well\n")); + printf(_(" -I DIRECTORY search DIRECTORY for include files\n")); + printf(_(" -o OUTFILE write result to OUTFILE\n")); + printf(_(" -r OPTION specify runtime behaviour;\n" " OPTION can be:\n" " \"no_indicator\"\n" " \"prepare\"\n" - " \"questionmarks\"\n"); - printf(" -t turn on autocommit of transactions\n"); - printf(" --help show this help, then exit\n"); - printf(" --regression run in regression testing mode\n"); - printf(" --version output version information, then exit\n"); - printf("\nIf no output file is specified, the name is formed by adding .c to the\n" - "input file name, after stripping off .pgc if present.\n"); - printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"); + " \"questionmarks\"\n")); + printf(_(" -t turn on autocommit of transactions\n")); + printf(_(" --help show this help, then exit\n")); + printf(_(" --regression run in regression testing mode\n")); + printf(_(" --version output version information, then exit\n")); + printf(_("\nIf no output file is specified, the name is formed by adding .c to the\n" + "input file name, after stripping off .pgc if present.\n")); + printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n")); } static void @@ -138,6 +138,8 @@ main(int argc, char *const argv[]) char my_exec_path[MAXPGPATH]; char include_path[MAXPGPATH]; + set_pglocale_pgservice(argv[0], "ecpg"); + progname = get_progname(argv[0]); find_my_exec(argv[0], my_exec_path); @@ -181,7 +183,7 @@ main(int argc, char *const argv[]) if (yyout == NULL) { - fprintf(stderr, "%s: could not open file \"%s\": %s\n", + fprintf(stderr, _("%s: could not open file \"%s\": %s\n"), progname, output_filename, strerror(errno)); output_filename = NULL; } @@ -220,7 +222,7 @@ main(int argc, char *const argv[]) } else { - fprintf(stderr, "Try '%s --help' for more information.\n", argv[0]); + fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]); return ILLEGAL_OPTION; } break; @@ -233,7 +235,7 @@ main(int argc, char *const argv[]) questionmarks = true; else { - fprintf(stderr, "Try '%s --help' for more information.\n", argv[0]); + fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]); return ILLEGAL_OPTION; } break; @@ -244,12 +246,12 @@ main(int argc, char *const argv[]) #ifdef YYDEBUG yydebug = 1; #else - fprintf(stderr, "%s: parser debug support (-d) not available\n", + fprintf(stderr, _("%s: parser debug support (-d) not available\n"), progname); #endif break; default: - fprintf(stderr, "Try '%s --help' for more information.\n", argv[0]); + fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]); return ILLEGAL_OPTION; } } @@ -262,19 +264,19 @@ main(int argc, char *const argv[]) if (verbose) { - fprintf(stderr, "%s, the PostgreSQL embedded C preprocessor, version %d.%d.%d\n", + fprintf(stderr, _("%s, the PostgreSQL embedded C preprocessor, version %d.%d.%d\n"), progname, MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL); - fprintf(stderr, "exec sql include ... search starts here:\n"); + fprintf(stderr, _("exec sql include ... search starts here:\n")); for (ip = include_paths; ip != NULL; ip = ip->next) fprintf(stderr, " %s\n", ip->path); - fprintf(stderr, "end of search list\n"); + fprintf(stderr, _("end of search list\n")); return 0; } if (optind >= argc) /* no files specified */ { - fprintf(stderr, "%s: no input files specified\n", progname); - fprintf(stderr, "Try '%s --help' for more information.\n", argv[0]); + fprintf(stderr, _("%s: no input files specified\n"), progname); + fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]); return (ILLEGAL_OPTION); } else @@ -332,7 +334,7 @@ main(int argc, char *const argv[]) yyout = fopen(output_filename, PG_BINARY_W); if (yyout == NULL) { - fprintf(stderr, "%s: could not open file \"%s\": %s\n", + fprintf(stderr, _("%s: could not open file \"%s\": %s\n"), progname, output_filename, strerror(errno)); free(output_filename); free(input_filename); @@ -342,7 +344,7 @@ main(int argc, char *const argv[]) } if (yyin == NULL) - fprintf(stderr, "%s: could not open file \"%s\": %s\n", + fprintf(stderr, _("%s: could not open file \"%s\": %s\n"), progname, argv[fnr], strerror(errno)); else { @@ -467,7 +469,7 @@ main(int argc, char *const argv[]) * Does not really make sense to declare a cursor but * not open it */ - snprintf(errortext, sizeof(errortext), "cursor \"%s\" has been declared but not opened\n", ptr->name); + snprintf(errortext, sizeof(errortext), _("cursor \"%s\" has been declared but not opened\n"), ptr->name); mmerror(PARSE_ERROR, ET_WARNING, errortext); } ptr = ptr->next; diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index 18cdccc7e1..be6f7b0d14 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.164 2008/05/09 15:36:31 petere Exp $ + * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.165 2008/05/16 15:20:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -367,7 +367,7 @@ cppline {space}*#(.*\\{space})*.*{newline} <xc>{op_chars} { ECHO; } <xc>\*+ { ECHO; } -<xc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); } +<xc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated /* comment"); } <SQL>{xbstart} { token_start = yytext; @@ -380,7 +380,7 @@ cppline {space}*#(.*\\{space})*.*{newline} yyless(1); BEGIN(SQL); if (literalbuf[strspn(literalbuf, "01") + 1] != '\0') - mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input."); + mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input"); yylval.str = mm_strdup(literalbuf); return BCONST; } @@ -389,7 +389,7 @@ cppline {space}*#(.*\\{space})*.*{newline} <xb>{xbinside} { addlit(yytext, yyleng); } <xh>{quotecontinue} | <xb>{quotecontinue} { /* ignore */ } -<xb><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); } +<xb><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated bit string"); } <SQL>{xhstart} { token_start = yytext; @@ -405,7 +405,7 @@ cppline {space}*#(.*\\{space})*.*{newline} return XCONST; } -<xh><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); } +<xh><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated hexadecimal integer"); } <SQL>{xnstart} { /* National character. * Transfer it as-is to the backend. @@ -469,7 +469,7 @@ cppline {space}*#(.*\\{space})*.*{newline} /* This is only needed for \ just before EOF */ addlitchar(yytext[0]); } -<xq,xqc,xe,xn><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); } +<xq,xqc,xe,xn><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated quoted string"); } <SQL>{dolqfailed} { /* throw back all but the initial "$" */ yyless(1); @@ -530,7 +530,7 @@ cppline {space}*#(.*\\{space})*.*{newline} } <xd>{xddouble} { addlitchar('"'); } <xd>{xdinside} { addlit(yytext, yyleng); } -<xd,xdc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted identifier"); } +<xd,xdc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated quoted identifier"); } <C,SQL>{xdstart} { state_before = YYSTATE; BEGIN(xdc); @@ -851,7 +851,7 @@ cppline {space}*#(.*\\{space})*.*{newline} BEGIN(C); } <undef>{other}|\n { - mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL UNDEF' command"); + mmerror(PARSE_ERROR, ET_FATAL, "missing identifier in 'EXEC SQL UNDEF' command"); yyterminate(); } <C>{exec_sql}{include}{space}* { BEGIN(incl); } @@ -897,10 +897,10 @@ cppline {space}*#(.*\\{space})*.*{newline} } <C,xskip>{exec_sql}{elif}{space}* { /* pop stack */ if ( preproc_tos == 0 ) { - mmerror(PARSE_ERROR, ET_FATAL, "Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'"); + mmerror(PARSE_ERROR, ET_FATAL, "missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'"); } else if ( stacked_if_value[preproc_tos].else_branch ) - mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'"); + mmerror(PARSE_ERROR, ET_FATAL, "missing 'EXEC SQL ENDIF;'"); else preproc_tos--; @@ -911,9 +911,9 @@ cppline {space}*#(.*\\{space})*.*{newline} if (INFORMIX_MODE) { if (preproc_tos == 0) - mmerror(PARSE_ERROR, ET_FATAL, "Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'"); + mmerror(PARSE_ERROR, ET_FATAL, "missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'"); else if (stacked_if_value[preproc_tos].else_branch) - mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'"); + mmerror(PARSE_ERROR, ET_FATAL, "missing 'EXEC SQL ENDIF;'"); else preproc_tos--; @@ -929,7 +929,7 @@ cppline {space}*#(.*\\{space})*.*{newline} <C,xskip>{exec_sql}{else}{space}*";" { /* only exec sql endif pops the stack, so take care of duplicated 'else' */ if (stacked_if_value[preproc_tos].else_branch) - mmerror(PARSE_ERROR, ET_FATAL, "Duplicated 'EXEC SQL ELSE;'"); + mmerror(PARSE_ERROR, ET_FATAL, "duplicated 'EXEC SQL ELSE;'"); else { stacked_if_value[preproc_tos].else_branch = TRUE; @@ -948,7 +948,7 @@ cppline {space}*#(.*\\{space})*.*{newline} if (INFORMIX_MODE) { if (stacked_if_value[preproc_tos].else_branch) - mmerror(PARSE_ERROR, ET_FATAL, "Duplicated 'EXEC SQL ELSE;'"); + mmerror(PARSE_ERROR, ET_FATAL, "duplicated 'EXEC SQL ELSE;'"); else { stacked_if_value[preproc_tos].else_branch = TRUE; @@ -970,7 +970,7 @@ cppline {space}*#(.*\\{space})*.*{newline} } <C,xskip>{exec_sql}{endif}{space}*";" { if (preproc_tos == 0) - mmerror(PARSE_ERROR, ET_FATAL, "Unmatched 'EXEC SQL ENDIF;'"); + mmerror(PARSE_ERROR, ET_FATAL, "unmatched 'EXEC SQL ENDIF;'"); else preproc_tos--; @@ -984,7 +984,7 @@ cppline {space}*#(.*\\{space})*.*{newline} if (INFORMIX_MODE) { if (preproc_tos == 0) - mmerror(PARSE_ERROR, ET_FATAL, "Unmatched 'EXEC SQL ENDIF;'"); + mmerror(PARSE_ERROR, ET_FATAL, "unmatched 'EXEC SQL ENDIF;'"); else preproc_tos--; @@ -1004,7 +1004,7 @@ cppline {space}*#(.*\\{space})*.*{newline} <xcond>{identifier}{space}*";" { if (preproc_tos >= MAX_NESTED_IF-1) - mmerror(PARSE_ERROR, ET_FATAL, "Too many nested 'EXEC SQL IFDEF' conditions"); + mmerror(PARSE_ERROR, ET_FATAL, "too many nested 'EXEC SQL IFDEF' conditions"); else { struct _defines *defptr; @@ -1037,7 +1037,7 @@ cppline {space}*#(.*\\{space})*.*{newline} } <xcond>{other}|\n { - mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL IFDEF' command"); + mmerror(PARSE_ERROR, ET_FATAL, "missing identifier in 'EXEC SQL IFDEF' command"); yyterminate(); } <def_ident>{identifier} { @@ -1046,7 +1046,7 @@ cppline {space}*#(.*\\{space})*.*{newline} startlit(); } <def_ident>{other}|\n { - mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL DEFINE' command"); + mmerror(PARSE_ERROR, ET_FATAL, "missing identifier in 'EXEC SQL DEFINE' command"); yyterminate(); } <def>{space}*";" { @@ -1079,7 +1079,7 @@ cppline {space}*#(.*\\{space})*.*{newline} <incl>{dquote}{xdinside}{dquote}{space}*";"? { parse_include(); } <incl>[^;\<\>\"]+";" { parse_include(); } <incl>{other}|\n { - mmerror(PARSE_ERROR, ET_FATAL, "Incorrect 'EXEC SQL INCLUDE' command"); + mmerror(PARSE_ERROR, ET_FATAL, "incorrect 'EXEC SQL INCLUDE' command"); yyterminate(); } @@ -1089,7 +1089,7 @@ cppline {space}*#(.*\\{space})*.*{newline} if ( preproc_tos > 0 ) { preproc_tos = 0; - mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'"); + mmerror(PARSE_ERROR, ET_FATAL, "missing 'EXEC SQL ENDIF;'"); } yyterminate(); } @@ -1128,7 +1128,7 @@ cppline {space}*#(.*\\{space})*.*{newline} } } -<INITIAL>{other}|\n { mmerror(PARSE_ERROR, ET_FATAL, "Internal error: unreachable state, please inform pgsql-bugs@postgresql.org"); } +<INITIAL>{other}|\n { mmerror(PARSE_ERROR, ET_FATAL, "Internal error: unreachable state, please report this to <pgsql-bugs@postgresql.org>"); } %% void lex_init(void) @@ -1250,7 +1250,7 @@ parse_include(void) { if (strlen(ip->path) + strlen(yytext) + 3 > MAXPGPATH) { - fprintf(stderr, "Error: Path %s/%s is too long in line %d, skipping.\n", ip->path, yytext, yylineno); + fprintf(stderr, _("Error: Path %s/%s is too long on line %d, skipping\n"), ip->path, yytext, yylineno); continue; } snprintf (inc_file, sizeof(inc_file), "%s/%s", ip->path, yytext); @@ -1266,7 +1266,7 @@ parse_include(void) } } if (!yyin) - mmerror(NO_INCLUDE_FILE, ET_FATAL, "Cannot open include file %s in line %d\n", yytext, yylineno); + mmerror(NO_INCLUDE_FILE, ET_FATAL, "cannot open include file \"%s\" on line %d\n", yytext, yylineno); input_filename = mm_strdup(inc_file); yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE )); diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index e49ffc892b..49acea7640 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.364 2008/05/12 16:29:04 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.365 2008/05/16 15:20:04 petere Exp $ */ /* Copyright comment */ %{ @@ -60,16 +60,19 @@ mmerror(int error_code, enum errortype type, char * error, ...) { va_list ap; + /* internationalize the error message string */ + error = _(error); + fprintf(stderr, "%s:%d: ", input_filename, yylineno); switch(type) { case ET_WARNING: - fprintf(stderr, "WARNING: "); + fprintf(stderr, _("WARNING: ")); break; case ET_ERROR: case ET_FATAL: - fprintf(stderr, "ERROR: "); + fprintf(stderr, _("ERROR: ")); break; } @@ -92,7 +95,7 @@ mmerror(int error_code, enum errortype type, char * error, ...) if (yyout) fclose(yyout); if (unlink(output_filename) != 0 && *output_filename != '-') - fprintf(stderr, "Could not remove output file %s!\n", output_filename); + fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename); exit(error_code); } } @@ -303,7 +306,7 @@ add_additional_variables(char *name, bool insert) if (ptr == NULL) { - mmerror(PARSE_ERROR, ET_ERROR, "trying to access an undeclared cursor %s\n", name); + mmerror(PARSE_ERROR, ET_ERROR, "trying to access an undeclared cursor \"%s\"\n", name); return NULL; } @@ -331,14 +334,14 @@ add_typedef(char *name, char * dimension, char * length, enum ECPGttype type_enu if ((type_enum == ECPGt_struct || type_enum == ECPGt_union) && initializer == 1) - mmerror(PARSE_ERROR, ET_ERROR, "Initializer not allowed in typedef command"); + mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in typedef command"); else { for (ptr = types; ptr != NULL; ptr = ptr->next) { if (strcmp(name, ptr->name) == 0) /* re-definition is a bug */ - mmerror(PARSE_ERROR, ET_ERROR, "Type %s already defined", name); + mmerror(PARSE_ERROR, ET_ERROR, "type %s already defined", name); } adjust_array(type_enum, &dimension, &length, type_dimension, type_index, array, true); @@ -361,7 +364,7 @@ add_typedef(char *name, char * dimension, char * length, enum ECPGttype type_enu type_enum != ECPGt_char && type_enum != ECPGt_unsigned_char && atoi(this->type->type_index) >= 0) - mmerror(PARSE_ERROR, ET_ERROR, "No multidimensional array support for simple data types"); + mmerror(PARSE_ERROR, ET_ERROR, "no multidimensional array support for simple data types"); types = this; } @@ -749,7 +752,7 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } if (pg_strcasecmp($1+strlen("close "), "database") == 0) { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for close database statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for close database statement\n"); fprintf(yyout, "{ ECPGdisconnect(__LINE__, \"CURRENT\");"); whenever_action(2); @@ -787,7 +790,7 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } | DeallocateStmt { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement\n"); output_deallocate_prepare_statement($1); } @@ -862,7 +865,7 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } | ECPGConnect { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for connect statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for connect statement\n"); fprintf(yyout, "{ ECPGconnect(__LINE__, %d, %s, %d); ", compat, $1, autocommit); reset_variables(); @@ -876,7 +879,7 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } | ECPGDeallocateDescr { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement\n"); fprintf(yyout,"ECPGdeallocate_desc(__LINE__, %s);",$1); whenever_action(0); free($1); @@ -899,7 +902,7 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } | ECPGDisconnect { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for disconnect statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for disconnect statement\n"); fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);", $1 ? $1 : "\"CURRENT\""); @@ -951,7 +954,7 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } | ECPGSetConnection { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for set connection statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for set connection statement\n"); fprintf(yyout, "{ ECPGsetconn(__LINE__, %s);", $1); whenever_action(2); @@ -973,7 +976,7 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } | ECPGTypedef { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for typedef statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for typedef statement\n"); fprintf(yyout, "%s", $1); free($1); @@ -982,14 +985,14 @@ stmt: AlterDatabaseStmt { output_statement($1, 0, ECPGst_normal); } | ECPGVar { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for var statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for var statement\n"); output_simple_statement($1); } | ECPGWhenever { if (connection) - mmerror(PARSE_ERROR, ET_ERROR, "no at option for whenever statement.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "no at option for whenever statement\n"); output_simple_statement($1); } @@ -1496,18 +1499,18 @@ CopyStmt: COPY opt_binary qualified_name opt_oids copy_from copy_file_name copy_delimiter opt_with copy_opt_list { if (strcmp($5, "to") == 0 && strcmp($6, "stdin") == 0) - mmerror(PARSE_ERROR, ET_ERROR, "copy to stdin not possible.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "copy to stdin not possible\n"); else if (strcmp($5, "from") == 0 && strcmp($6, "stdout") == 0) - mmerror(PARSE_ERROR, ET_ERROR, "copy from stdout not possible.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "copy from stdout not possible\n"); else if (strcmp($5, "from") == 0 && strcmp($6, "stdin") == 0) - mmerror(PARSE_ERROR, ET_WARNING, "copy from stdin not implemented.\n"); + mmerror(PARSE_ERROR, ET_WARNING, "copy from stdin not implemented\n"); $$ = cat_str(9, make_str("copy"), $2, $3, $4, $5, $6, $7, $8, $9); } | COPY select_with_parens TO copy_file_name opt_with copy_opt_list { if (strcmp($4, "stdin") == 0) - mmerror(PARSE_ERROR, ET_ERROR, "copy to stdin not possible.\n"); + mmerror(PARSE_ERROR, ET_ERROR, "copy to stdin is not possible\n"); $$ = cat_str(6, make_str("copy"), $2, make_str("to"), $4, $5, $6); } @@ -1727,7 +1730,7 @@ key_match: MATCH FULL { $$ = make_str("match full"); } | MATCH PARTIAL { - mmerror(PARSE_ERROR, ET_WARNING, "Currently unsupported FOREIGN KEY/MATCH PARTIAL will be passed to backend"); + mmerror(PARSE_ERROR, ET_WARNING, "currently unsupported FOREIGN KEY/MATCH PARTIAL will be passed to backend"); $$ = make_str("match partial"); } | /*EMPTY*/ @@ -2487,7 +2490,7 @@ grantee: RoleId { $$ = $1; } opt_grant_grant_option: WITH GRANT OPTION { - mmerror(PARSE_ERROR, ET_WARNING, "Currently unsupported GRANT/WITH GRANT OPTION will be passed to backend"); + mmerror(PARSE_ERROR, ET_WARNING, "currently unsupported GRANT/WITH GRANT OPTION will be passed to backend"); $$ = make_str("with grant option"); } | /*EMPTY*/ { $$ = EMPTY; } @@ -3493,7 +3496,7 @@ DeclareCursorStmt: DECLARE name cursor_options CURSOR opt_hold FOR SelectStmt { if (strcmp($2, ptr->name) == 0) /* re-definition is a bug */ - mmerror(PARSE_ERROR, ET_ERROR, "cursor %s already defined", $2); + mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" already defined", $2); } this = (struct cursor *) mm_alloc(sizeof(struct cursor)); @@ -3661,7 +3664,7 @@ select_limit: LIMIT select_limit_value OFFSET select_offset_value { $$ = cat2_str(make_str("offset"), $2); } | LIMIT select_limit_value ',' select_offset_value { - mmerror(PARSE_ERROR, ET_WARNING, "No longer supported LIMIT #,# syntax passed to backend."); + mmerror(PARSE_ERROR, ET_WARNING, "no longer supported LIMIT #,# syntax passed to backend"); $$ = cat_str(4, make_str("limit"), $2, make_str(","), $4); } ; @@ -5010,7 +5013,7 @@ connection_target: opt_database_name opt_server opt_port { /* old style: dbname[@server][:port] */ if (strlen($2) > 0 && *($2) != '@') - mmerror(PARSE_ERROR, ET_ERROR, "Expected '@', found '%s'", $2); + mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\", found \"%s\"", $2); /* C strings need to be handled differently */ if ($1[0] == '\"') @@ -5022,15 +5025,15 @@ connection_target: opt_database_name opt_server opt_port { /* new style: <tcp|unix>:postgresql://server[:port][/dbname] */ if (strncmp($1, "unix:postgresql", strlen("unix:postgresql")) != 0 && strncmp($1, "tcp:postgresql", strlen("tcp:postgresql")) != 0) - mmerror(PARSE_ERROR, ET_ERROR, "only protocols 'tcp' and 'unix' and database type 'postgresql' are supported"); + mmerror(PARSE_ERROR, ET_ERROR, "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"); if (strncmp($3, "//", strlen("//")) != 0) - mmerror(PARSE_ERROR, ET_ERROR, "Expected '://', found '%s'", $3); + mmerror(PARSE_ERROR, ET_ERROR, "expected \"://\", found \"%s\"", $3); if (strncmp($1, "unix", strlen("unix")) == 0 && strncmp($3 + strlen("//"), "localhost", strlen("localhost")) != 0 && strncmp($3 + strlen("//"), "127.0.0.1", strlen("127.0.0.1")) != 0) - mmerror(PARSE_ERROR, ET_ERROR, "unix domain sockets only work on 'localhost' but not on '%s'", $3 + strlen("//")); + mmerror(PARSE_ERROR, ET_ERROR, "unix domain sockets only work on \"localhost\" but not on \"%s\"", $3 + strlen("//")); $$ = make3_str(make3_str(make_str("\""), $1, make_str(":")), $3, make3_str(make3_str($4, make_str("/"), $6), $7, make_str("\""))); } @@ -5056,10 +5059,10 @@ opt_database_name: database_name { $$ = $1; } db_prefix: ident cvariable { if (strcmp($2, "postgresql") != 0 && strcmp($2, "postgres") != 0) - mmerror(PARSE_ERROR, ET_ERROR, "Expected 'postgresql', found '%s'", $2); + mmerror(PARSE_ERROR, ET_ERROR, "expected \"postgresql\", found \"%s\"", $2); if (strcmp($1, "tcp") != 0 && strcmp($1, "unix") != 0) - mmerror(PARSE_ERROR, ET_ERROR, "Illegal connection type %s", $1); + mmerror(PARSE_ERROR, ET_ERROR, "illegal connection type %s", $1); $$ = make3_str($1, make_str(":"), $2); } @@ -5068,7 +5071,7 @@ db_prefix: ident cvariable server: Op server_name { if (strcmp($1, "@") != 0 && strcmp($1, "//") != 0) - mmerror(PARSE_ERROR, ET_ERROR, "Expected '@' or '://', found '%s'", $1); + mmerror(PARSE_ERROR, ET_ERROR, "expected \"@\" or \"://\", found \"%s\"", $1); $$ = make2_str($1, $2); } @@ -5174,7 +5177,7 @@ opt_options: Op connect_options mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement"); if (strcmp($1, "?") != 0) - mmerror(PARSE_ERROR, ET_ERROR, "unrecognised token '%s'", $1); + mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", $1); $$ = make2_str(make_str("?"), $2); } @@ -5189,7 +5192,7 @@ connect_options: ColId opt_opt_value mmerror(PARSE_ERROR, ET_ERROR, "incomplete statement"); if (strcmp($3, "&") != 0) - mmerror(PARSE_ERROR, ET_ERROR, "unrecognised token '%s'", $3); + mmerror(PARSE_ERROR, ET_ERROR, "unrecognized token \"%s\"", $3); $$ = cat_str(3, make2_str($1, $2), $3, $4); } @@ -5216,7 +5219,7 @@ ECPGCursorStmt: DECLARE name cursor_options CURSOR opt_hold FOR prepared_name { if (strcmp($2, ptr->name) == 0) /* re-definition is a bug */ - mmerror(PARSE_ERROR, ET_ERROR, "cursor %s already defined", $2); + mmerror(PARSE_ERROR, ET_ERROR, "cursor \"%s\" already defined", $2); } this = (struct cursor *) mm_alloc(sizeof(struct cursor)); @@ -5419,7 +5422,7 @@ var_type: simple_type } else { - mmerror(PARSE_ERROR, ET_ERROR, "Only numeric/decimal have precision/scale argument"); + mmerror(PARSE_ERROR, ET_ERROR, "only numeric/decimal have precision/scale argument"); $$.type_enum = ECPGt_numeric; $$.type_str = make_str("numeric"); } @@ -5431,7 +5434,7 @@ var_type: simple_type | ECPGColLabelCommon ecpg_interval { if (strlen($2) != 0 && strcmp ($1, "datetime") != 0 && strcmp ($1, "interval") != 0) - mmerror (PARSE_ERROR, ET_ERROR, "Interval specification not allowed here "); + mmerror (PARSE_ERROR, ET_ERROR, "interval specification not allowed here"); /* * Check for type names that the SQL grammar treats as @@ -5575,7 +5578,7 @@ struct_union_type_with_symbol: s_struct_union_symbol { struct_member_list[struct_level++] = NULL; if (struct_level >= STRUCT_DEPTH) - mmerror(PARSE_ERROR, ET_ERROR, "Too many levels in nested structure/union definition"); + mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition"); forward_name = mm_strdup($1.symbol); } '{' variable_declarations '}' @@ -5600,7 +5603,7 @@ struct_union_type_with_symbol: s_struct_union_symbol { if (strcmp(su_type.type_str, ptr->name) == 0) /* re-definition is a bug */ - mmerror(PARSE_ERROR, ET_ERROR, "Type %s already defined", su_type.type_str); + mmerror(PARSE_ERROR, ET_ERROR, "type \"%s\" already defined", su_type.type_str); } this = (struct typedefs *) mm_alloc(sizeof(struct typedefs)); @@ -5627,7 +5630,7 @@ struct_union_type: struct_union_type_with_symbol { $$ = $1; } { struct_member_list[struct_level++] = NULL; if (struct_level >= STRUCT_DEPTH) - mmerror(PARSE_ERROR, ET_ERROR, "Too many levels in nested structure/union definition"); + mmerror(PARSE_ERROR, ET_ERROR, "too many levels in nested structure/union definition"); } '{' variable_declarations '}' { @@ -5941,21 +5944,21 @@ UsingConst: AllConst ECPGDescribe: SQL_DESCRIBE INPUT_P name using_descriptor { const char *con = connection ? connection : "NULL"; - mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement.\n"); + mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement\n"); $$ = (char *) mm_alloc(sizeof("1, ECPGprepared_statement(, \"\", __LINE__)") + strlen(con) + strlen($3)); sprintf($$, "1, ECPGprepared_statement(%s, \"%s\", __LINE__)", con, $3); } | SQL_DESCRIBE opt_output name using_descriptor { const char *con = connection ? connection : "NULL"; - mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement.\n"); + mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement\n"); $$ = (char *) mm_alloc(sizeof("0, ECPGprepared_statement(, \"\", __LINE__)") + strlen(con) + strlen($3)); sprintf($$, "0, ECPGprepared_statement(%s, \"%s\", __LINE__)", con, $3); } | SQL_DESCRIBE opt_output name into_descriptor { const char *con = connection ? connection : "NULL"; - mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement.\n"); + mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement\n"); $$ = (char *) mm_alloc(sizeof("0, ECPGprepared_statement(, \"\", __LINE__)") + strlen(con) + strlen($3)); sprintf($$, "0, ECPGprepared_statement(%s, \"%s\", __LINE__)", con, $3); } @@ -6138,7 +6141,7 @@ ECPGVar: SQL_VAR if (($5.type_enum == ECPGt_struct || $5.type_enum == ECPGt_union) && initializer == 1) - mmerror(PARSE_ERROR, ET_ERROR, "Initializer not allowed in EXEC SQL VAR command"); + mmerror(PARSE_ERROR, ET_ERROR, "initializer not allowed in EXEC SQL VAR command"); else { adjust_array($5.type_enum, &dimension, &length, $5.type_dimension, $5.type_index, *$7?1:0, false); @@ -6170,7 +6173,7 @@ ECPGVar: SQL_VAR default: if (atoi(length) >= 0) - mmerror(PARSE_ERROR, ET_ERROR, "No multidimensional array support for simple data types"); + mmerror(PARSE_ERROR, ET_ERROR, "no multidimensional array support for simple data types"); if (atoi(dimension) < 0) type = ECPGmake_simple_type($5.type_enum, make_str("1"), 0); @@ -6893,7 +6896,7 @@ cvariable: CVARIABLE { case '[': if (brace) - mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support for simple data types"); + mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support for simple data types"); brace_open++; break; case ']': @@ -7018,7 +7021,7 @@ void base_yyerror(const char * error) { char buf[1024]; - snprintf(buf,sizeof buf,"%s at or near \"%s\"", error, token_start ? token_start : yytext); + snprintf(buf,sizeof buf, _("%s at or near \"%s\""), error, token_start ? token_start : yytext); buf[sizeof(buf)-1]=0; mmerror(PARSE_ERROR, ET_ERROR, buf); } diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index 2fd9cb1966..facf3a5100 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.78 2008/03/02 10:54:11 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.79 2008/05/16 15:20:04 petere Exp $ */ #include "postgres_fe.h" @@ -15,7 +15,7 @@ mm_alloc(size_t size) void *ptr = malloc(size); if (ptr == NULL) - mmerror(OUT_OF_MEMORY, ET_FATAL, "Out of memory\n"); + mmerror(OUT_OF_MEMORY, ET_FATAL, "out of memory\n"); return ptr; } @@ -27,7 +27,7 @@ mm_strdup(const char *string) char *new = strdup(string); if (new == NULL) - mmerror(OUT_OF_MEMORY, ET_FATAL, "Out of memory\n"); + mmerror(OUT_OF_MEMORY, ET_FATAL, "out of memory\n"); return new; } @@ -238,11 +238,11 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, { case ECPGt_array: if (indicator_set && ind_type->type != ECPGt_array) - mmerror(INDICATOR_NOT_ARRAY, ET_FATAL, "Indicator for array/pointer has to be array/pointer.\n"); + mmerror(INDICATOR_NOT_ARRAY, ET_FATAL, "indicator for array/pointer has to be array/pointer\n"); switch (type->u.element->type) { case ECPGt_array: - mmerror(PARSE_ERROR, ET_ERROR, "No nested arrays allowed (except strings)"); /* array of array */ + mmerror(PARSE_ERROR, ET_ERROR, "no nested arrays allowed (except strings)"); /* array of array */ break; case ECPGt_struct: case ECPGt_union: @@ -255,7 +255,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, break; default: if (!IS_SIMPLE_TYPE(type->u.element->type)) - base_yyerror("Internal error: unknown datatype, please inform pgsql-bugs@postgresql.org"); + base_yyerror("internal error: unknown datatype, please report this to <pgsql-bugs@postgresql.org>"); ECPGdump_a_simple(o, name, type->u.element->type, @@ -275,16 +275,16 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, break; case ECPGt_struct: if (indicator_set && ind_type->type != ECPGt_struct) - mmerror(INDICATOR_NOT_STRUCT, ET_FATAL, "Indicator for struct has to be struct.\n"); + mmerror(INDICATOR_NOT_STRUCT, ET_FATAL, "indicator for struct has to be struct\n"); ECPGdump_a_struct(o, name, ind_name, make_str("1"), type, ind_type, NULL, prefix, ind_prefix); break; case ECPGt_union: /* cannot dump a complete union */ - base_yyerror("Type of union has to be specified"); + base_yyerror("type of union has to be specified"); break; case ECPGt_char_variable: if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array)) - mmerror(INDICATOR_NOT_SIMPLE, ET_FATAL, "Indicator for simple datatype has to be simple.\n"); + mmerror(INDICATOR_NOT_SIMPLE, ET_FATAL, "indicator for simple datatype has to be simple\n"); ECPGdump_a_simple(o, name, type->type, make_str("1"), (arr_str_siz && strcmp(arr_str_siz, "0") != 0) ? arr_str_siz : make_str("1"), struct_sizeof, prefix, 0); if (ind_type != NULL) @@ -292,7 +292,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, break; case ECPGt_descriptor: if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array)) - mmerror(INDICATOR_NOT_SIMPLE, ET_FATAL, "Indicator for simple datatype has to be simple.\n"); + mmerror(INDICATOR_NOT_SIMPLE, ET_FATAL, "indicator for simple datatype has to be simple\n"); ECPGdump_a_simple(o, name, type->type, NULL, make_str("-1"), NULL, prefix, 0); if (ind_type != NULL) @@ -300,7 +300,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, break; default: if (indicator_set && (ind_type->type == ECPGt_struct || ind_type->type == ECPGt_array)) - mmerror(INDICATOR_NOT_SIMPLE, ET_FATAL, "Indicator for simple datatype has to be simple.\n"); + mmerror(INDICATOR_NOT_SIMPLE, ET_FATAL, "indicator for simple datatype has to be simple\n"); ECPGdump_a_simple(o, name, type->type, type->size, (arr_str_siz && strcmp(arr_str_siz, "0") != 0) ? arr_str_siz : make_str("-1"), struct_sizeof, prefix, type->lineno); if (ind_type != NULL) @@ -525,7 +525,7 @@ ECPGfree_type(struct ECPGtype * type) switch (type->u.element->type) { case ECPGt_array: - base_yyerror("internal error, found multidimensional array\n"); + base_yyerror("internal error: found multidimensional array\n"); break; case ECPGt_struct: case ECPGt_union: @@ -535,7 +535,7 @@ ECPGfree_type(struct ECPGtype * type) break; default: if (!IS_SIMPLE_TYPE(type->u.element->type)) - base_yyerror("Internal error: unknown datatype, please inform pgsql-bugs@postgresql.org"); + base_yyerror("internal error: unknown datatype, please report this to <pgsql-bugs@postgresql.org>"); free(type->u.element); } diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c index 7ff0e0db63..e16e82112d 100644 --- a/src/interfaces/ecpg/preproc/variable.c +++ b/src/interfaces/ecpg/preproc/variable.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.44 2008/02/07 11:09:13 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.45 2008/05/16 15:20:04 petere Exp $ */ #include "postgres_fe.h" @@ -226,7 +226,7 @@ find_variable(char *name) *next = '\0'; p = find_simple(name); if (p == NULL) - mmerror(PARSE_ERROR, ET_FATAL, "The variable %s is not declared", name); + mmerror(PARSE_ERROR, ET_FATAL, "variable %s is not declared", name); *next = c; switch (p->type->u.element->type) @@ -248,7 +248,7 @@ find_variable(char *name) p = find_simple(name); if (p == NULL) - mmerror(PARSE_ERROR, ET_FATAL, "The variable %s is not declared", name); + mmerror(PARSE_ERROR, ET_FATAL, "variable %s is not declared", name); return (p); } @@ -468,7 +468,7 @@ get_typedef(char *name) for (this = types; this && strcmp(this->name, name); this = this->next); if (!this) - mmerror(PARSE_ERROR, ET_FATAL, "invalid datatype '%s'", name); + mmerror(PARSE_ERROR, ET_FATAL, "invalid datatype \"%s\"", name); return (this); } @@ -479,7 +479,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty if (atoi(type_index) >= 0) { if (atoi(*length) >= 0) - mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support"); + mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support"); *length = type_index; } @@ -487,7 +487,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty if (atoi(type_dimension) >= 0) { if (atoi(*dimension) >= 0 && atoi(*length) >= 0) - mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support"); + mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support"); if (atoi(*dimension) >= 0) *length = *dimension; @@ -496,16 +496,16 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty } if (pointer_len > 2) - mmerror(PARSE_ERROR, ET_FATAL, "No multilevel (more than 2) pointer supported %d", pointer_len); + mmerror(PARSE_ERROR, ET_FATAL, "no multilevel (more than 2) pointer supported %d", pointer_len); if (pointer_len > 1 && type_enum != ECPGt_char && type_enum != ECPGt_unsigned_char) - mmerror(PARSE_ERROR, ET_FATAL, "No pointer to pointer supported for this type"); + mmerror(PARSE_ERROR, ET_FATAL, "no pointer to pointer supported for this type"); if (pointer_len > 1 && (atoi(*length) >= 0 || atoi(*dimension) >= 0)) - mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support"); + mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support"); if (atoi(*length) >= 0 && atoi(*dimension) >= 0 && pointer_len) - mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support"); + mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support"); switch (type_enum) { @@ -519,7 +519,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty } if (atoi(*length) >= 0) - mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support for structures"); + mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support for structures"); break; case ECPGt_varchar: @@ -579,7 +579,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty } if (atoi(*length) >= 0) - mmerror(PARSE_ERROR, ET_FATAL, "No multidimensional array support for simple data types"); + mmerror(PARSE_ERROR, ET_FATAL, "no multidimensional array support for simple data types"); break; } |
