Patch possible portability problem: a few places had // style comments,

which is not ANSI C, even though some compilers will take it...
This commit is contained in:
Tom Lane 2000-03-17 23:26:36 +00:00
parent 64ef5c82de
commit 3faa9bab07
5 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@
* *
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de> * Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
* *
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.2 2000/03/01 12:49:41 meskes Exp $ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.3 2000/03/17 23:26:30 tgl Exp $
*/ */
/* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */ /* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */
@ -16,14 +16,14 @@ enum { SQL3_CHARACTER=1,
SQL3_REAL, SQL3_REAL,
SQL3_DOUBLE_PRECISION, SQL3_DOUBLE_PRECISION,
SQL3_DATE_TIME_TIMESTAMP, SQL3_DATE_TIME_TIMESTAMP,
SQL3_INTERVAL, //10 SQL3_INTERVAL, /* 10 */
SQL3_CHARACTER_VARYING=12, SQL3_CHARACTER_VARYING=12,
SQL3_ENUMERATED, SQL3_ENUMERATED,
SQL3_BIT, SQL3_BIT,
SQL3_BIT_VARYING, SQL3_BIT_VARYING,
SQL3_BOOLEAN, SQL3_BOOLEAN,
SQL3_abstract SQL3_abstract
// the rest is xLOB stuff /* the rest is xLOB stuff */
}; };
/* chapter 13.1 table 3: Codes associated with datetime data types in Dynamic SQL */ /* chapter 13.1 table 3: Codes associated with datetime data types in Dynamic SQL */

View File

@ -185,7 +185,7 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
} }
else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field)) else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field))
{ {
// NULL is valid /* NULL is valid */
break; break;
} }
} }

View File

@ -814,7 +814,7 @@ ECPGdo(int lineno, const char *connection_name, char *query, ...)
* *
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de> * Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
* *
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.1 2000/03/07 15:10:56 meskes Exp $ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.2 2000/03/17 23:26:31 tgl Exp $
*/ */
PGconn *ECPG_internal_get_connection(char *name); PGconn *ECPG_internal_get_connection(char *name);
@ -826,7 +826,7 @@ extern struct descriptor
struct descriptor *next; struct descriptor *next;
} *all_descriptors; } *all_descriptors;
// like ECPGexecute /* like ECPGexecute */
static bool execute_descriptor(int lineno,const char *query static bool execute_descriptor(int lineno,const char *query
,struct connection *con,PGresult **resultptr) ,struct connection *con,PGresult **resultptr)
{ {

View File

@ -61,7 +61,7 @@ static ScanKeyword ScanKeywords[] = {
{"section", SQL_SECTION}, {"section", SQL_SECTION},
{"short", SQL_SHORT}, {"short", SQL_SHORT},
{"signed", SQL_SIGNED}, {"signed", SQL_SIGNED},
{"sql",SQL_SQL}, // strange thing, used for into sql descriptor MYDESC; {"sql",SQL_SQL}, /* strange thing, used for into sql descriptor MYDESC; */
{"sqlerror", SQL_SQLERROR}, {"sqlerror", SQL_SQLERROR},
{"sqlprint", SQL_SQLPRINT}, {"sqlprint", SQL_SQLPRINT},
{"sqlwarning", SQL_SQLWARNING}, {"sqlwarning", SQL_SQLWARNING},

View File

@ -2,7 +2,7 @@
* *
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de> * Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
* *
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Attic/dyntest.pgc,v 1.5 2000/03/03 13:24:06 meskes Exp $ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Attic/dyntest.pgc,v 1.6 2000/03/17 23:26:36 tgl Exp $
*/ */
#include <stdio.h> #include <stdio.h>
@ -139,7 +139,7 @@ int main(int argc,char **argv)
break; break;
case SQL3_NUMERIC: case SQL3_NUMERIC:
case SQL3_DECIMAL: case SQL3_DECIMAL:
if (SCALE==0) // we might even print leading zeros "%0*d" if (SCALE==0) /* we might even print leading zeros "%0*d" */
{ exec sql get descriptor MYDESC value :INDEX :INTVAR=data; { exec sql get descriptor MYDESC value :INDEX :INTVAR=data;
printf("%*d",PRECISION,INTVAR); printf("%*d",PRECISION,INTVAR);
} }