]> granicus.if.org Git - postgresql/commitdiff
Patch possible portability problem: a few places had // style comments,
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Mar 2000 23:26:36 +0000 (23:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Mar 2000 23:26:36 +0000 (23:26 +0000)
which is not ANSI C, even though some compilers will take it...

src/interfaces/ecpg/include/sql3types.h
src/interfaces/ecpg/lib/data.c
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/preproc/ecpg_keywords.c
src/interfaces/ecpg/test/dyntest.pgc

index 34224c7577e18fed033b045d5a467a8cf8ef6636..3aa86f50f0998eaa371d66459667ff5a5cc4a66f 100644 (file)
@@ -2,7 +2,7 @@
  *
  * 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 */
@@ -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 */
index e9b01c385e940a0c335c32c0ad2c90ab902be8a2..b7398caf6d750d5c60b40f2497e8b7b9a95b1601 100644 (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))
                                {
-                                       // NULL is valid
+                                       /* NULL is valid */
                                        break;
                                }
                        }
index adc1351e4e7aa145f3e5e1fc37cf4400cadcbb05..aca7fce993496a6f1a50a0da73d6174468f23c9d 100644 (file)
@@ -814,7 +814,7 @@ ECPGdo(int lineno, const char *connection_name, char *query, ...)
  *
  * 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);
@@ -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)
 {
index e59dceafca38d13543e041a9744e69ee3c2eef75..0a468c041eadd598f5bd183d51009140e76ee1c1 100644 (file)
@@ -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},
index 2988730975b9090a5c279badcd5b29a96dd61353..3c53ffec7e53651b456880edf729d787bab33c04 100644 (file)
@@ -2,7 +2,7 @@
  *
  * 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>
@@ -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);
                }