summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/include
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:18:54 +0000
committerTom Lane2017-06-21 19:19:25 +0000
commitc7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch)
treee85979fb1213a731b7b557f8a830df541f26b135 /src/interfaces/ecpg/include
parentf669c09989bda894d6ba01634ccb229f0687c08a (diff)
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/interfaces/ecpg/include')
-rw-r--r--src/interfaces/ecpg/include/datetime.h4
-rw-r--r--src/interfaces/ecpg/include/decimal.h4
-rw-r--r--src/interfaces/ecpg/include/ecpg-pthread-win32.h6
-rw-r--r--src/interfaces/ecpg/include/ecpg_informix.h2
-rw-r--r--src/interfaces/ecpg/include/ecpgerrno.h2
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h14
-rw-r--r--src/interfaces/ecpg/include/ecpgtype.h2
-rw-r--r--src/interfaces/ecpg/include/pgtypes_date.h2
-rw-r--r--src/interfaces/ecpg/include/pgtypes_interval.h4
-rw-r--r--src/interfaces/ecpg/include/pgtypes_numeric.h4
-rw-r--r--src/interfaces/ecpg/include/pgtypes_timestamp.h2
-rw-r--r--src/interfaces/ecpg/include/sql3types.h2
-rw-r--r--src/interfaces/ecpg/include/sqlca.h4
-rw-r--r--src/interfaces/ecpg/include/sqlda-compat.h4
-rw-r--r--src/interfaces/ecpg/include/sqlda-native.h2
-rw-r--r--src/interfaces/ecpg/include/sqlda.h2
-rw-r--r--src/interfaces/ecpg/include/sqltypes.h2
17 files changed, 31 insertions, 31 deletions
diff --git a/src/interfaces/ecpg/include/datetime.h b/src/interfaces/ecpg/include/datetime.h
index 9394a129f1b..44b24227e55 100644
--- a/src/interfaces/ecpg/include/datetime.h
+++ b/src/interfaces/ecpg/include/datetime.h
@@ -9,6 +9,6 @@
#ifndef _ECPGLIB_H
typedef timestamp dtime_t;
typedef interval intrvl_t;
-#endif /* ndef _ECPGLIB_H */
+#endif /* ndef _ECPGLIB_H */
-#endif /* ndef _ECPG_DATETIME_H */
+#endif /* ndef _ECPG_DATETIME_H */
diff --git a/src/interfaces/ecpg/include/decimal.h b/src/interfaces/ecpg/include/decimal.h
index 11b02de8aef..6ac29625304 100644
--- a/src/interfaces/ecpg/include/decimal.h
+++ b/src/interfaces/ecpg/include/decimal.h
@@ -8,6 +8,6 @@
/* source created by ecpg which defines this */
#ifndef _ECPGLIB_H
typedef decimal dec_t;
-#endif /* ndef _ECPGLIB_H */
+#endif /* ndef _ECPGLIB_H */
-#endif /* ndef _ECPG_DECIMAL_H */
+#endif /* ndef _ECPG_DECIMAL_H */
diff --git a/src/interfaces/ecpg/include/ecpg-pthread-win32.h b/src/interfaces/ecpg/include/ecpg-pthread-win32.h
index 7e59357a38e..33c897b633c 100644
--- a/src/interfaces/ecpg/include/ecpg-pthread-win32.h
+++ b/src/interfaces/ecpg/include/ecpg-pthread-win32.h
@@ -52,7 +52,7 @@ void win32_pthread_once(volatile pthread_once_t *once, void (*fn) (void));
if (!*(once)) \
win32_pthread_once((once), (fn)); \
} while(0)
-#endif /* WIN32 */
-#endif /* ENABLE_THREAD_SAFETY */
+#endif /* WIN32 */
+#endif /* ENABLE_THREAD_SAFETY */
-#endif /* _ECPG_PTHREAD_WIN32_H */
+#endif /* _ECPG_PTHREAD_WIN32_H */
diff --git a/src/interfaces/ecpg/include/ecpg_informix.h b/src/interfaces/ecpg/include/ecpg_informix.h
index c3c847d854b..dd6258152ae 100644
--- a/src/interfaces/ecpg/include/ecpg_informix.h
+++ b/src/interfaces/ecpg/include/ecpg_informix.h
@@ -87,4 +87,4 @@ extern int dtcvfmtasc(char *, char *, timestamp *);
}
#endif
-#endif /* ndef _ECPG_INFORMIX_H */
+#endif /* ndef _ECPG_INFORMIX_H */
diff --git a/src/interfaces/ecpg/include/ecpgerrno.h b/src/interfaces/ecpg/include/ecpgerrno.h
index 36b15b7a616..c4bc526463d 100644
--- a/src/interfaces/ecpg/include/ecpgerrno.h
+++ b/src/interfaces/ecpg/include/ecpgerrno.h
@@ -76,4 +76,4 @@
/* WARNING: BlankPortalAssignName: portal * already exists */
#define ECPG_WARNING_PORTAL_EXISTS -605
-#endif /* !_ECPG_ERRNO_H */
+#endif /* !_ECPG_ERRNO_H */
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index 755fdaaf0c1..536b7506ffa 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -21,23 +21,23 @@ extern char *ecpg_gettext(const char *msgid) pg_attribute_format_arg(1);
#ifndef __cplusplus
#ifndef bool
#define bool char
-#endif /* ndef bool */
+#endif /* ndef bool */
#ifndef true
#define true ((bool) 1)
-#endif /* ndef true */
+#endif /* ndef true */
#ifndef false
#define false ((bool) 0)
-#endif /* ndef false */
-#endif /* not C++ */
+#endif /* ndef false */
+#endif /* not C++ */
#ifndef TRUE
#define TRUE 1
-#endif /* TRUE */
+#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
-#endif /* FALSE */
+#endif /* FALSE */
#ifdef __cplusplus
extern "C"
@@ -97,4 +97,4 @@ void ecpg_pthreads_init(void);
}
#endif
-#endif /* _ECPGLIB_H */
+#endif /* _ECPGLIB_H */
diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h
index 236d028154d..38fb3b6eaf5 100644
--- a/src/interfaces/ecpg/include/ecpgtype.h
+++ b/src/interfaces/ecpg/include/ecpgtype.h
@@ -103,4 +103,4 @@ enum ECPG_statement_type
}
#endif
-#endif /* _ECPGTYPE_H */
+#endif /* _ECPGTYPE_H */
diff --git a/src/interfaces/ecpg/include/pgtypes_date.h b/src/interfaces/ecpg/include/pgtypes_date.h
index 463cf769a7d..3d1a181b2b7 100644
--- a/src/interfaces/ecpg/include/pgtypes_date.h
+++ b/src/interfaces/ecpg/include/pgtypes_date.h
@@ -28,4 +28,4 @@ extern int PGTYPESdate_fmt_asc(date, const char *, char *);
}
#endif
-#endif /* PGTYPES_DATETIME */
+#endif /* PGTYPES_DATETIME */
diff --git a/src/interfaces/ecpg/include/pgtypes_interval.h b/src/interfaces/ecpg/include/pgtypes_interval.h
index e1b089d8628..5747736fe16 100644
--- a/src/interfaces/ecpg/include/pgtypes_interval.h
+++ b/src/interfaces/ecpg/include/pgtypes_interval.h
@@ -21,7 +21,7 @@ typedef long long int int64;
#endif
#define HAVE_INT64_TIMESTAMP
-#endif /* C_H */
+#endif /* C_H */
typedef struct
{
@@ -44,4 +44,4 @@ extern int PGTYPESinterval_copy(interval *, interval *);
}
#endif
-#endif /* PGTYPES_INTERVAL */
+#endif /* PGTYPES_INTERVAL */
diff --git a/src/interfaces/ecpg/include/pgtypes_numeric.h b/src/interfaces/ecpg/include/pgtypes_numeric.h
index 38b8fdcc4b3..56c46ea2729 100644
--- a/src/interfaces/ecpg/include/pgtypes_numeric.h
+++ b/src/interfaces/ecpg/include/pgtypes_numeric.h
@@ -31,7 +31,7 @@ typedef struct
int rscale; /* result scale */
int dscale; /* display scale */
int sign; /* NUMERIC_POS, NUMERIC_NEG, or NUMERIC_NAN */
- NumericDigit digits[DECSIZE]; /* decimal digits */
+ NumericDigit digits[DECSIZE]; /* decimal digits */
} decimal;
#ifdef __cplusplus
@@ -64,4 +64,4 @@ int PGTYPESnumeric_from_decimal(decimal *, numeric *);
}
#endif
-#endif /* PGTYPES_NUMERIC */
+#endif /* PGTYPES_NUMERIC */
diff --git a/src/interfaces/ecpg/include/pgtypes_timestamp.h b/src/interfaces/ecpg/include/pgtypes_timestamp.h
index 9d185f21fe0..283ecca25eb 100644
--- a/src/interfaces/ecpg/include/pgtypes_timestamp.h
+++ b/src/interfaces/ecpg/include/pgtypes_timestamp.h
@@ -27,4 +27,4 @@ extern int PGTYPEStimestamp_sub_interval(timestamp * tin, interval * span, times
}
#endif
-#endif /* PGTYPES_TIMESTAMP */
+#endif /* PGTYPES_TIMESTAMP */
diff --git a/src/interfaces/ecpg/include/sql3types.h b/src/interfaces/ecpg/include/sql3types.h
index b9db452dace..644b616cf87 100644
--- a/src/interfaces/ecpg/include/sql3types.h
+++ b/src/interfaces/ecpg/include/sql3types.h
@@ -40,4 +40,4 @@ enum
* standard) */
};
-#endif /* !_ECPG_SQL3TYPES_H */
+#endif /* !_ECPG_SQL3TYPES_H */
diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h
index b4ab93fa3b4..c5f107dd33c 100644
--- a/src/interfaces/ecpg/include/sqlca.h
+++ b/src/interfaces/ecpg/include/sqlca.h
@@ -6,8 +6,8 @@
#define PGDLLIMPORT __declspec (dllimport)
#else
#define PGDLLIMPORT
-#endif /* __CYGWIN__ */
-#endif /* PGDLLIMPORT */
+#endif /* __CYGWIN__ */
+#endif /* PGDLLIMPORT */
#define SQLERRMC_LEN 150
diff --git a/src/interfaces/ecpg/include/sqlda-compat.h b/src/interfaces/ecpg/include/sqlda-compat.h
index 2c4e07c5f1b..7393182aa95 100644
--- a/src/interfaces/ecpg/include/sqlda-compat.h
+++ b/src/interfaces/ecpg/include/sqlda-compat.h
@@ -40,8 +40,8 @@ struct sqlda_compat
struct sqlvar_compat *sqlvar;
char desc_name[19]; /* descriptor name */
short desc_occ; /* size of sqlda structure */
- struct sqlda_compat *desc_next; /* pointer to next sqlda struct */
+ struct sqlda_compat *desc_next; /* pointer to next sqlda struct */
void *reserved; /* reserved for future use */
};
-#endif /* ECPG_SQLDA_COMPAT_H */
+#endif /* ECPG_SQLDA_COMPAT_H */
diff --git a/src/interfaces/ecpg/include/sqlda-native.h b/src/interfaces/ecpg/include/sqlda-native.h
index acb314cd172..67d3c7b4e45 100644
--- a/src/interfaces/ecpg/include/sqlda-native.h
+++ b/src/interfaces/ecpg/include/sqlda-native.h
@@ -40,4 +40,4 @@ struct sqlda_struct
struct sqlvar_struct sqlvar[1];
};
-#endif /* ECPG_SQLDA_NATIVE_H */
+#endif /* ECPG_SQLDA_NATIVE_H */
diff --git a/src/interfaces/ecpg/include/sqlda.h b/src/interfaces/ecpg/include/sqlda.h
index c265beb66cc..d810e739e20 100644
--- a/src/interfaces/ecpg/include/sqlda.h
+++ b/src/interfaces/ecpg/include/sqlda.h
@@ -15,4 +15,4 @@ typedef struct sqlda_struct sqlda_t;
#endif
-#endif /* ECPG_SQLDA_H */
+#endif /* ECPG_SQLDA_H */
diff --git a/src/interfaces/ecpg/include/sqltypes.h b/src/interfaces/ecpg/include/sqltypes.h
index 797cb5b1be4..e7cbfa47956 100644
--- a/src/interfaces/ecpg/include/sqltypes.h
+++ b/src/interfaces/ecpg/include/sqltypes.h
@@ -54,4 +54,4 @@
#define SQLSERIAL8 ECPGt_long
#endif
-#endif /* ndef ECPG_SQLTYPES_H */
+#endif /* ndef ECPG_SQLTYPES_H */