Commit 76924b5d authored by Michael Meskes's avatar Michael Meskes

Fixed two small bugs.

parent a4997254
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.114 2003/05/30 08:39:01 meskes Exp $ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.115 2003/06/16 16:58:10 meskes Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -618,7 +618,7 @@ cppline {space}*#(.*\\{space})+.* ...@@ -618,7 +618,7 @@ cppline {space}*#(.*\\{space})+.*
char* endptr; char* endptr;
errno = 0; errno = 0;
yylval.ival = strtol((char *)yytext,&endptr,16); yylval.ival = strtoul((char *)yytext,&endptr,16);
if (*endptr != '\0' || errno == ERANGE) if (*endptr != '\0' || errno == ERANGE)
{ {
errno = 0; errno = 0;
......
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.231 2003/06/13 10:50:57 meskes Exp $ */ /* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.232 2003/06/16 16:58:11 meskes Exp $ */
/* Copyright comment */ /* Copyright comment */
%{ %{
...@@ -630,15 +630,15 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); } ...@@ -630,15 +630,15 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
| ECPGDeallocate | ECPGDeallocate
{ {
if (connection) if (connection)
mmerror(PARSE_ERROR, ET_ERROR, "no at option for connect statement.\n"); mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement.\n");
fprintf(yyout, "{ ECPGdeallocate(__LINE__, \"%s\");", $1);
fputc('{', yyout);
fputs($1, yyout);
whenever_action(2); whenever_action(2);
free($1); free($1);
} }
| ECPGDeallocateDescr | ECPGDeallocateDescr
{ {
if (connection)
mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement.\n");
fprintf(yyout,"ECPGdeallocate_desc(__LINE__, %s);",$1); fprintf(yyout,"ECPGdeallocate_desc(__LINE__, %s);",$1);
whenever_action(0); whenever_action(0);
free($1); free($1);
...@@ -4294,9 +4294,9 @@ ECPGCursorStmt: DECLARE name cursor_options CURSOR opt_hold FOR ident ...@@ -4294,9 +4294,9 @@ ECPGCursorStmt: DECLARE name cursor_options CURSOR opt_hold FOR ident
* prepared statement * prepared statement
*/ */
ECPGDeallocate: DEALLOCATE PREPARE ident ECPGDeallocate: DEALLOCATE PREPARE ident
{ $$ = cat_str(3, make_str("ECPGdeallocate(__LINE__, \""), $3, make_str("\");")); } { $$ = $3; }
| DEALLOCATE ident | DEALLOCATE ident
{ $$ = cat_str(2, make_str("ECPGdeallocate(__LINE__, \""), $2, make_str("\");")); } { $$ = $2; }
; ;
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment