From 3faa9bab07ab781aa71ea1a3819a30a184e5bdab Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 17 Mar 2000 23:26:36 +0000 Subject: [PATCH] Patch possible portability problem: a few places had // style comments, which is not ANSI C, even though some compilers will take it... --- src/interfaces/ecpg/include/sql3types.h | 6 +++--- src/interfaces/ecpg/lib/data.c | 2 +- src/interfaces/ecpg/lib/execute.c | 4 ++-- src/interfaces/ecpg/preproc/ecpg_keywords.c | 2 +- src/interfaces/ecpg/test/dyntest.pgc | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/interfaces/ecpg/include/sql3types.h b/src/interfaces/ecpg/include/sql3types.h index 34224c7577..3aa86f50f0 100644 --- a/src/interfaces/ecpg/include/sql3types.h +++ b/src/interfaces/ecpg/include/sql3types.h @@ -2,7 +2,7 @@ * * Copyright (c) 2000, Christof Petig * - * $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 */ @@ -16,14 +16,14 @@ enum { SQL3_CHARACTER=1, SQL3_REAL, SQL3_DOUBLE_PRECISION, SQL3_DATE_TIME_TIMESTAMP, - SQL3_INTERVAL, //10 + SQL3_INTERVAL, /* 10 */ SQL3_CHARACTER_VARYING=12, SQL3_ENUMERATED, SQL3_BIT, SQL3_BIT_VARYING, SQL3_BOOLEAN, 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 */ diff --git a/src/interfaces/ecpg/lib/data.c b/src/interfaces/ecpg/lib/data.c index e9b01c385e..b7398caf6d 100644 --- a/src/interfaces/ecpg/lib/data.c +++ b/src/interfaces/ecpg/lib/data.c @@ -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)) { - // NULL is valid + /* NULL is valid */ break; } } diff --git a/src/interfaces/ecpg/lib/execute.c b/src/interfaces/ecpg/lib/execute.c index adc1351e4e..aca7fce993 100644 --- a/src/interfaces/ecpg/lib/execute.c +++ b/src/interfaces/ecpg/lib/execute.c @@ -814,7 +814,7 @@ ECPGdo(int lineno, const char *connection_name, char *query, ...) * * Copyright (c) 2000, Christof Petig * - * $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); @@ -826,7 +826,7 @@ extern struct descriptor struct descriptor *next; } *all_descriptors; -// like ECPGexecute +/* like ECPGexecute */ static bool execute_descriptor(int lineno,const char *query ,struct connection *con,PGresult **resultptr) { diff --git a/src/interfaces/ecpg/preproc/ecpg_keywords.c b/src/interfaces/ecpg/preproc/ecpg_keywords.c index e59dceafca..0a468c041e 100644 --- a/src/interfaces/ecpg/preproc/ecpg_keywords.c +++ b/src/interfaces/ecpg/preproc/ecpg_keywords.c @@ -61,7 +61,7 @@ static ScanKeyword ScanKeywords[] = { {"section", SQL_SECTION}, {"short", SQL_SHORT}, {"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}, {"sqlprint", SQL_SQLPRINT}, {"sqlwarning", SQL_SQLWARNING}, diff --git a/src/interfaces/ecpg/test/dyntest.pgc b/src/interfaces/ecpg/test/dyntest.pgc index 2988730975..3c53ffec7e 100644 --- a/src/interfaces/ecpg/test/dyntest.pgc +++ b/src/interfaces/ecpg/test/dyntest.pgc @@ -2,7 +2,7 @@ * * Copyright (c) 2000, Christof Petig * - * $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 @@ -139,7 +139,7 @@ int main(int argc,char **argv) break; case SQL3_NUMERIC: 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; printf("%*d",PRECISION,INTVAR); }