diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-10-28 06:26:15 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-10-28 06:26:15 +0000 |
commit | 6783b2372ef13c141649840a836ff0a954ea1d4d (patch) | |
tree | 81c727b2b08930bcf3ab7107c84ef59f1f68a78d /src/interfaces/ecpg | |
parent | c29797deeb5dfca61b8959344b682b4c32fe53a1 (diff) | |
download | postgresql-6783b2372ef13c141649840a836ff0a954ea1d4d.tar.gz postgresql-6783b2372ef13c141649840a836ff0a954ea1d4d.zip |
Another pgindent run. Fixes enum indenting, and improves #endif
spacing. Also adds space for one-line comments.
Diffstat (limited to 'src/interfaces/ecpg')
-rw-r--r-- | src/interfaces/ecpg/include/ecpgerrno.h | 1 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/ecpglib.h | 1 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/ecpgtype.h | 1 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/sql3types.h | 46 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/sqlca.h | 3 | ||||
-rw-r--r-- | src/interfaces/ecpg/lib/execute.c | 10 | ||||
-rw-r--r-- | src/interfaces/ecpg/lib/misc.c | 8 | ||||
-rw-r--r-- | src/interfaces/ecpg/lib/pg_type.h | 3 | ||||
-rw-r--r-- | src/interfaces/ecpg/lib/prepare.c | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/lib/typename.c | 8 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.c | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/type.h | 16 |
12 files changed, 55 insertions, 50 deletions
diff --git a/src/interfaces/ecpg/include/ecpgerrno.h b/src/interfaces/ecpg/include/ecpgerrno.h index 81d67277fe4..49e6269d8af 100644 --- a/src/interfaces/ecpg/include/ecpgerrno.h +++ b/src/interfaces/ecpg/include/ecpgerrno.h @@ -61,4 +61,5 @@ #define ECPG_NOTICE_NO_TRANSACTION -604 /* NOTICE: BlankPortalAssignName: portal * already exists */ #define ECPG_NOTICE_PORTAL_EXISTS -605 + #endif /* !_ECPG_ERROR_H */ diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h index 732e70f3cee..acb022aa1b2 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -70,4 +70,5 @@ extern "C" #ifdef __cplusplus } + #endif diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h index c2e698b84fd..d8e2807bb1f 100644 --- a/src/interfaces/ecpg/include/ecpgtype.h +++ b/src/interfaces/ecpg/include/ecpgtype.h @@ -76,4 +76,5 @@ extern "C" #ifdef __cplusplus } + #endif diff --git a/src/interfaces/ecpg/include/sql3types.h b/src/interfaces/ecpg/include/sql3types.h index 02305dd54ab..74a6d2192ec 100644 --- a/src/interfaces/ecpg/include/sql3types.h +++ b/src/interfaces/ecpg/include/sql3types.h @@ -2,29 +2,29 @@ * * Copyright (c) 2000, Christof Petig <christof.petig@wtal.de> * - * $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.6 2001/10/25 05:50:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.7 2001/10/28 06:26:11 momjian Exp $ */ /* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */ enum { - SQL3_CHARACTER = 1, - SQL3_NUMERIC, - SQL3_DECIMAL, - SQL3_INTEGER, - SQL3_SMALLINT, - SQL3_FLOAT, - SQL3_REAL, - SQL3_DOUBLE_PRECISION, - SQL3_DATE_TIME_TIMESTAMP, - SQL3_INTERVAL, /* 10 */ - SQL3_CHARACTER_VARYING = 12, - SQL3_ENUMERATED, - SQL3_BIT, - SQL3_BIT_VARYING, - SQL3_BOOLEAN, - SQL3_abstract + SQL3_CHARACTER = 1, + SQL3_NUMERIC, + SQL3_DECIMAL, + SQL3_INTEGER, + SQL3_SMALLINT, + SQL3_FLOAT, + SQL3_REAL, + SQL3_DOUBLE_PRECISION, + SQL3_DATE_TIME_TIMESTAMP, + SQL3_INTERVAL, /* 10 */ + SQL3_CHARACTER_VARYING = 12, + SQL3_ENUMERATED, + SQL3_BIT, + SQL3_BIT_VARYING, + SQL3_BOOLEAN, + SQL3_abstract /* the rest is xLOB stuff */ }; @@ -32,12 +32,12 @@ enum enum { - SQL3_DDT_DATE = 1, - SQL3_DDT_TIME, - SQL3_DDT_TIMESTAMP, - SQL3_DDT_TIME_WITH_TIME_ZONE, - SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE, + SQL3_DDT_DATE = 1, + SQL3_DDT_TIME, + SQL3_DDT_TIMESTAMP, + SQL3_DDT_TIME_WITH_TIME_ZONE, + SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE, - SQL3_DDT_ILLEGAL/* not a datetime data type (not part of + SQL3_DDT_ILLEGAL /* not a datetime data type (not part of * standard) */ }; diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h index 28ab20533df..68e0f00839e 100644 --- a/src/interfaces/ecpg/include/sqlca.h +++ b/src/interfaces/ecpg/include/sqlca.h @@ -44,7 +44,7 @@ extern "C" /* * 2: if 'W' a (hopefully) non-fatal notice occured -*//* 3: empty */ + */ /* 3: empty */ /* 4: empty */ /* 5: empty */ /* 6: empty */ @@ -59,4 +59,5 @@ extern "C" #ifdef __cplusplus } #endif + #endif diff --git a/src/interfaces/ecpg/lib/execute.c b/src/interfaces/ecpg/lib/execute.c index e9454ec215e..a979b55447d 100644 --- a/src/interfaces/ecpg/lib/execute.c +++ b/src/interfaces/ecpg/lib/execute.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.29 2001/10/25 05:50:11 momjian Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.30 2001/10/28 06:26:11 momjian Exp $ */ /* * The aim is to get a simpler inteface to the database routines. @@ -32,9 +32,9 @@ struct sqlca sqlca = { { 'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' ' - } , - sizeof(struct sqlca), - 0, + }, + sizeof(struct sqlca), + 0, { 0, { @@ -76,7 +76,7 @@ static struct auto_mem { void *pointer; struct auto_mem *next; -} *auto_allocs = NULL; +} *auto_allocs = NULL; static void add_mem(void *ptr, int lineno) diff --git a/src/interfaces/ecpg/lib/misc.c b/src/interfaces/ecpg/lib/misc.c index a37cd7ceb67..47bb1824c25 100644 --- a/src/interfaces/ecpg/lib/misc.c +++ b/src/interfaces/ecpg/lib/misc.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/misc.c,v 1.7 2001/10/25 05:50:12 momjian Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/misc.c,v 1.8 2001/10/28 06:26:11 momjian Exp $ */ #include "postgres_fe.h" @@ -13,9 +13,9 @@ static struct sqlca sqlca_init = { { 'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' ' - } , - sizeof(struct sqlca), - 0, + }, + sizeof(struct sqlca), + 0, { 0, { diff --git a/src/interfaces/ecpg/lib/pg_type.h b/src/interfaces/ecpg/lib/pg_type.h index 5961dc23c6a..cd2c5273f42 100644 --- a/src/interfaces/ecpg/lib/pg_type.h +++ b/src/interfaces/ecpg/lib/pg_type.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_type.h,v 1.3 2001/10/25 05:50:12 momjian Exp $ + * $Id: pg_type.h,v 1.4 2001/10/28 06:26:11 momjian Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -68,4 +68,5 @@ #define ZPBITOID 1560 #define VARBITOID 1562 #define NUMERICOID 1700 + #endif /* PG_TYPE_H */ diff --git a/src/interfaces/ecpg/lib/prepare.c b/src/interfaces/ecpg/lib/prepare.c index 4efd31da093..e6898b0be06 100644 --- a/src/interfaces/ecpg/lib/prepare.c +++ b/src/interfaces/ecpg/lib/prepare.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/prepare.c,v 1.8 2001/10/05 17:37:07 meskes Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/prepare.c,v 1.9 2001/10/28 06:26:11 momjian Exp $ */ #include "postgres_fe.h" @@ -15,7 +15,7 @@ static struct prepared_statement char *name; struct statement *stmt; struct prepared_statement *next; -} *prep_stmts = NULL; +} *prep_stmts = NULL; static bool isvarchar(unsigned char c) diff --git a/src/interfaces/ecpg/lib/typename.c b/src/interfaces/ecpg/lib/typename.c index 48747e2c719..e4ffcc77d88 100644 --- a/src/interfaces/ecpg/lib/typename.c +++ b/src/interfaces/ecpg/lib/typename.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/typename.c,v 1.20 2001/10/25 05:50:12 momjian Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/typename.c,v 1.21 2001/10/28 06:26:11 momjian Exp $ */ #include "postgres_fe.h" @@ -59,11 +59,11 @@ ECPGDynamicType(Oid type) switch (type) { case BOOLOID: - return SQL3_BOOLEAN; /* bool */ + return SQL3_BOOLEAN; /* bool */ case INT2OID: return SQL3_SMALLINT; /* int2 */ case INT4OID: - return SQL3_INTEGER; /* int4 */ + return SQL3_INTEGER; /* int4 */ case TEXTOID: return SQL3_CHARACTER; /* text */ case FLOAT4OID: @@ -81,7 +81,7 @@ ECPGDynamicType(Oid type) case TIMESTAMPOID: return SQL3_DATE_TIME_TIMESTAMP; /* datetime */ case NUMERICOID: - return SQL3_NUMERIC; /* numeric */ + return SQL3_NUMERIC; /* numeric */ default: return -type; } diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 7b6f33e794f..5e809042155 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.50 2001/10/25 05:50:12 momjian Exp $ */ +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.51 2001/10/28 06:26:11 momjian Exp $ */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */ @@ -192,7 +192,7 @@ main(int argc, char *const argv[]) ptr2ext[4] = '\0'; } - if (out_option == 0)/* calculate the output name */ + if (out_option == 0) /* calculate the output name */ { output_filename = strdup(input_filename); diff --git a/src/interfaces/ecpg/preproc/type.h b/src/interfaces/ecpg/preproc/type.h index a44cbec1ca7..12e45ab43ac 100644 --- a/src/interfaces/ecpg/preproc/type.h +++ b/src/interfaces/ecpg/preproc/type.h @@ -60,13 +60,13 @@ extern const char *ECPGtype_name(enum ECPGttype typ); /* some stuff for whenever statements */ enum WHEN_TYPE { - W_NOTHING, - W_CONTINUE, - W_BREAK, - W_SQLPRINT, - W_GOTO, - W_DO, - W_STOP + W_NOTHING, + W_CONTINUE, + W_BREAK, + W_SQLPRINT, + W_GOTO, + W_DO, + W_STOP }; struct when @@ -155,7 +155,7 @@ struct assignment enum errortype { - ET_NOTICE, ET_ERROR, ET_FATAL + ET_NOTICE, ET_ERROR, ET_FATAL }; struct fetch_desc |