summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes2003-06-16 16:58:11 +0000
committerMichael Meskes2003-06-16 16:58:11 +0000
commit76924b5d94dce15cd3169a57f43b2468897f4329 (patch)
treec82c6e081f59bed27b46624eab9358436bc27527
parenta4997254693057d4587d74222881b8e03580da2c (diff)
Fixed two small bugs.
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l4
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y14
2 files changed, 9 insertions, 9 deletions
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index ce390f7461b..fc3c9440321 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -12,7 +12,7 @@
*
*
* 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})+.*
char* endptr;
errno = 0;
- yylval.ival = strtol((char *)yytext,&endptr,16);
+ yylval.ival = strtoul((char *)yytext,&endptr,16);
if (*endptr != '\0' || errno == ERANGE)
{
errno = 0;
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index fa622f314bd..0bb41459031 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -1,4 +1,4 @@
-/* $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 */
%{
@@ -630,15 +630,15 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
| ECPGDeallocate
{
if (connection)
- mmerror(PARSE_ERROR, ET_ERROR, "no at option for connect statement.\n");
-
- fputc('{', yyout);
- fputs($1, yyout);
+ mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement.\n");
+ fprintf(yyout, "{ ECPGdeallocate(__LINE__, \"%s\");", $1);
whenever_action(2);
free($1);
}
| ECPGDeallocateDescr
{
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "no at option for deallocate statement.\n");
fprintf(yyout,"ECPGdeallocate_desc(__LINE__, %s);",$1);
whenever_action(0);
free($1);
@@ -4294,9 +4294,9 @@ ECPGCursorStmt: DECLARE name cursor_options CURSOR opt_hold FOR ident
* prepared statement
*/
ECPGDeallocate: DEALLOCATE PREPARE ident
- { $$ = cat_str(3, make_str("ECPGdeallocate(__LINE__, \""), $3, make_str("\");")); }
+ { $$ = $3; }
| DEALLOCATE ident
- { $$ = cat_str(2, make_str("ECPGdeallocate(__LINE__, \""), $2, make_str("\");")); }
+ { $$ = $2; }
;
/*