diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 14:39:04 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 14:39:04 -0400 |
commit | e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 (patch) | |
tree | 8dc7df95c340803546152724fbc17aee4b8527f9 /src/interfaces/ecpg/include | |
parent | 8ff6d4ec7840b0af56f1207073f44b7f2afae96d (diff) |
Initial pgindent run with pg_bsd_indent version 2.0.
The new indent version includes numerous fixes thanks to Piotr Stefaniak.
The main changes visible in this commit are:
* Nicer formatting of function-pointer declarations.
* No longer unexpectedly removes spaces in expressions using casts,
sizeof, or offsetof.
* No longer wants to add a space in "struct structname *varname", as
well as some similar cases for const- or volatile-qualified pointers.
* Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely.
* Fixes bug where comments following declarations were sometimes placed
with no space separating them from the code.
* Fixes some odd decisions for comments following case labels.
* Fixes some cases where comments following code were indented to less
than the expected column 33.
On the less good side, it now tends to put more whitespace around typedef
names that are not listed in typedefs.list. This might encourage us to
put more effort into typedef name collection; it's not really a bug in
indent itself.
There are more changes coming after this round, having to do with comment
indentation and alignment of lines appearing within parentheses. I wanted
to limit the size of the diffs to something that could be reviewed without
one's eyes completely glazing over, so it seemed better to split up the
changes as much as practical.
Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/interfaces/ecpg/include')
-rw-r--r-- | src/interfaces/ecpg/include/ecpg_informix.h | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/ecpglib.h | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/ecpgtype.h | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/pgtypes_date.h | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/pgtypes_interval.h | 8 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/pgtypes_numeric.h | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/pgtypes_timestamp.h | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/sqlca.h | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/src/interfaces/ecpg/include/ecpg_informix.h b/src/interfaces/ecpg/include/ecpg_informix.h index 3ffeb95b5a2..c3c847d854b 100644 --- a/src/interfaces/ecpg/include/ecpg_informix.h +++ b/src/interfaces/ecpg/include/ecpg_informix.h @@ -29,7 +29,7 @@ #define ECPG_INFORMIX_EXTRA_CHARS -1264 #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h index c32df6c5d58..755fdaaf0c1 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -40,7 +40,7 @@ extern char *ecpg_gettext(const char *msgid) pg_attribute_format_arg(1); #endif /* FALSE */ #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h index 7cc47e91e3f..236d028154d 100644 --- a/src/interfaces/ecpg/include/ecpgtype.h +++ b/src/interfaces/ecpg/include/ecpgtype.h @@ -34,7 +34,7 @@ #define _ECPGTYPE_H #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/src/interfaces/ecpg/include/pgtypes_date.h b/src/interfaces/ecpg/include/pgtypes_date.h index b8990bb0723..463cf769a7d 100644 --- a/src/interfaces/ecpg/include/pgtypes_date.h +++ b/src/interfaces/ecpg/include/pgtypes_date.h @@ -8,11 +8,11 @@ typedef long date; #ifdef __cplusplus -extern "C" +extern "C" { #endif -extern date *PGTYPESdate_new(void); +extern date * PGTYPESdate_new(void); extern void PGTYPESdate_free(date *); extern date PGTYPESdate_from_asc(char *, char **); extern char *PGTYPESdate_to_asc(date); diff --git a/src/interfaces/ecpg/include/pgtypes_interval.h b/src/interfaces/ecpg/include/pgtypes_interval.h index d5b085deb4e..e1b089d8628 100644 --- a/src/interfaces/ecpg/include/pgtypes_interval.h +++ b/src/interfaces/ecpg/include/pgtypes_interval.h @@ -27,16 +27,16 @@ typedef struct { int64 time; /* all time units other than months and years */ long month; /* months and years, after time for alignment */ -} interval; +} interval; #ifdef __cplusplus -extern "C" +extern "C" { #endif -extern interval *PGTYPESinterval_new(void); +extern interval * PGTYPESinterval_new(void); extern void PGTYPESinterval_free(interval *); -extern interval *PGTYPESinterval_from_asc(char *, char **); +extern interval * PGTYPESinterval_from_asc(char *, char **); extern char *PGTYPESinterval_to_asc(interval *); extern int PGTYPESinterval_copy(interval *, interval *); diff --git a/src/interfaces/ecpg/include/pgtypes_numeric.h b/src/interfaces/ecpg/include/pgtypes_numeric.h index 1b9e4c35e43..38b8fdcc4b3 100644 --- a/src/interfaces/ecpg/include/pgtypes_numeric.h +++ b/src/interfaces/ecpg/include/pgtypes_numeric.h @@ -35,7 +35,7 @@ typedef struct } decimal; #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/src/interfaces/ecpg/include/pgtypes_timestamp.h b/src/interfaces/ecpg/include/pgtypes_timestamp.h index 144e606f7f6..9d185f21fe0 100644 --- a/src/interfaces/ecpg/include/pgtypes_timestamp.h +++ b/src/interfaces/ecpg/include/pgtypes_timestamp.h @@ -10,7 +10,7 @@ typedef int64 timestamp; typedef int64 TimestampTz; #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h index 41e5b550af4..b4ab93fa3b4 100644 --- a/src/interfaces/ecpg/include/sqlca.h +++ b/src/interfaces/ecpg/include/sqlca.h @@ -12,7 +12,7 @@ #define SQLERRMC_LEN 150 #ifdef __cplusplus -extern "C" +extern "C" { #endif |