diff options
Diffstat (limited to 'src/interfaces')
68 files changed, 222 insertions, 227 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 499a4c17804..b80e1d4c5b1 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -187,7 +187,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = value_for_indicator; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_NO_INDICATOR: if (value_for_indicator == -1) { @@ -275,7 +275,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = size; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ default: break; } @@ -369,7 +369,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, pval = scan_length; break; -#endif /* HAVE_STRTOLL */ +#endif /* HAVE_STRTOLL */ #ifdef HAVE_STRTOULL case ECPGt_unsigned_long_long: *((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10); @@ -381,8 +381,8 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, pval = scan_length; break; -#endif /* HAVE_STRTOULL */ -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_STRTOULL */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: case ECPGt_double: @@ -496,7 +496,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = size; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ default: break; } @@ -541,7 +541,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, case ECPGt_unsigned_long_long: *((long long int *) (ind + ind_offset * act_tuple)) = variable->len; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ default: break; } diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c index 1baa3ed1757..1fa00b892f4 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -141,7 +141,7 @@ get_int_item(int lineno, void *var, enum ECPGttype vartype, int value) case ECPGt_unsigned_long_long: *(unsigned long long int *) var = (unsigned long long int) value; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: *(float *) var = (float) value; break; @@ -186,7 +186,7 @@ set_int_item(int lineno, int *target, const void *var, enum ECPGttype vartype) case ECPGt_unsigned_long_long: *target = *(const unsigned long long int *) var; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: *target = *(const float *) var; break; @@ -753,7 +753,7 @@ descriptor_deallocate_all(struct descriptor *list) list = next; } } -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ bool ECPGallocate_desc(int line, const char *name) @@ -855,7 +855,7 @@ ECPGdescribe(int line, int compat, bool input, const char *connection_name, cons /* rest of variable parameters */ ptr = va_arg(args, void *); - (void) va_arg(args, long); /* skip args */ + (void) va_arg(args, long); /* skip args */ (void) va_arg(args, long); (void) va_arg(args, long); diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 3c4cc74c311..92b74f432c4 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -364,7 +364,7 @@ ecpg_store_result(const PGresult *results, int act_field, /* special mode for handling char**foo=0 */ for (act_tuple = 0; act_tuple < ntuples; act_tuple++) len += strlen(PQgetvalue(results, act_tuple, act_field)) + 1; - len *= var->offset; /* should be 1, but YMNK */ + len *= var->offset; /* should be 1, but YMNK */ len += (ntuples + 1) * sizeof(char *); } else @@ -534,7 +534,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari if (*(long long int *) var->ind_value < (long long) 0) *tobeinserted_p = NULL; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_NO_INDICATOR: if (force_indicator == false) { @@ -704,7 +704,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari *tobeinserted_p = mallocedval; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: if (!(mallocedval = ecpg_alloc(asize * 25, lineno))) return false; @@ -1361,8 +1361,8 @@ ecpg_build_params(struct statement *stmt) if (stmt->command[position] == '?') { /* yes, replace with new style */ - int buffersize = sizeof(int) * CHAR_BIT * 10 / 3; /* a rough guess of the - * size we need */ + int buffersize = sizeof(int) * CHAR_BIT * 10 / 3; /* a rough guess of the + * size we need */ if (!(tobeinserted = (char *) ecpg_alloc(buffersize, stmt->lineno))) { diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h index 2040bc163e9..94810c07b7b 100644 --- a/src/interfaces/ecpg/ecpglib/extern.h +++ b/src/interfaces/ecpg/ecpglib/extern.h @@ -220,4 +220,4 @@ void ecpg_set_native_sqlda(int, struct sqlda_struct **, const PGresult *, int, #define ECPG_SQLSTATE_ECPG_INTERNAL_ERROR "YE000" #define ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY "YE001" -#endif /* _ECPG_LIB_EXTERN_H */ +#endif /* _ECPG_LIB_EXTERN_H */ diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index f8ad5d733c9..edd7302d546 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -23,9 +23,9 @@ #define LONG_LONG_MIN LLONG_MIN #else #define LONG_LONG_MIN LONGLONG_MIN -#endif /* LLONG_MIN */ -#endif /* LONG_LONG_MIN */ -#endif /* HAVE_LONG_LONG_INT */ +#endif /* LLONG_MIN */ +#endif /* LONG_LONG_MIN */ +#endif /* HAVE_LONG_LONG_INT */ bool ecpg_internal_regression_mode = false; @@ -344,7 +344,7 @@ ECPGset_noind_null(enum ECPGttype type, void *ptr) case ECPGt_unsigned_long_long: *((long long *) ptr) = LONG_LONG_MIN; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: memset((char *) ptr, 0xff, sizeof(float)); break; @@ -417,7 +417,7 @@ ECPGis_noind_null(enum ECPGttype type, void *ptr) if (*((long long *) ptr) == LONG_LONG_MIN) return true; break; -#endif /* HAVE_LONG_LONG_INT */ +#endif /* HAVE_LONG_LONG_INT */ case ECPGt_float: return (_check(ptr, sizeof(float))); break; @@ -481,8 +481,8 @@ win32_pthread_once(volatile pthread_once_t *once, void (*fn) (void)) pthread_mutex_unlock(&win32_pthread_once_lock); } } -#endif /* ENABLE_THREAD_SAFETY */ -#endif /* WIN32 */ +#endif /* ENABLE_THREAD_SAFETY */ +#endif /* WIN32 */ #ifdef ENABLE_NLS @@ -516,7 +516,7 @@ ecpg_gettext(const char *msgid) return dgettext(PG_TEXTDOMAIN("ecpglib"), msgid); } -#endif /* ENABLE_NLS */ +#endif /* ENABLE_NLS */ struct var_list *ivlist = NULL; diff --git a/src/interfaces/ecpg/ecpglib/pg_type.h b/src/interfaces/ecpg/ecpglib/pg_type.h index 48ae4801290..94d2d9287b4 100644 --- a/src/interfaces/ecpg/ecpglib/pg_type.h +++ b/src/interfaces/ecpg/ecpglib/pg_type.h @@ -76,4 +76,4 @@ #define JSONBOID 3802 #define INT4RANGEOID 3904 -#endif /* PG_TYPE_H */ +#endif /* PG_TYPE_H */ diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c index e26ab3532ff..f05d0c0dc4d 100644 --- a/src/interfaces/ecpg/ecpglib/prepare.c +++ b/src/interfaces/ecpg/ecpglib/prepare.c @@ -23,8 +23,8 @@ typedef struct } stmtCacheEntry; static int nextStmtID = 1; -static const int stmtCacheNBuckets = 2039; /* # buckets - a prime # */ -static const int stmtCacheEntPerBucket = 8; /* # entries/bucket */ +static const int stmtCacheNBuckets = 2039; /* # buckets - a prime # */ +static const int stmtCacheEntPerBucket = 8; /* # entries/bucket */ static stmtCacheEntry stmtCacheEntries[16384] = {{0, {0}, 0, 0, 0}}; static bool deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con, @@ -380,7 +380,7 @@ SearchStmtCache(const char *ecpgQuery) * OR negative error code */ static int -ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free */ +ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free */ { stmtCacheEntry *entry; struct connection *con; @@ -416,7 +416,7 @@ ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free * */ static int AddStmtToCache(int lineno, /* line # of statement */ - const char *stmtID, /* statement ID */ + const char *stmtID, /* statement ID */ const char *connection, /* connection */ int compat, /* compatibility level */ const char *ecpgQuery) /* query */ diff --git a/src/interfaces/ecpg/ecpglib/typename.c b/src/interfaces/ecpg/ecpglib/typename.c index f90279cf81a..48587e49c76 100644 --- a/src/interfaces/ecpg/ecpglib/typename.c +++ b/src/interfaces/ecpg/ecpglib/typename.c @@ -75,19 +75,19 @@ ecpg_dynamic_type(Oid type) case BOOLOID: return SQL3_BOOLEAN; /* bool */ case INT2OID: - return SQL3_SMALLINT; /* int2 */ + return SQL3_SMALLINT; /* int2 */ case INT4OID: return SQL3_INTEGER; /* int4 */ case TEXTOID: - return SQL3_CHARACTER; /* text */ + return SQL3_CHARACTER; /* text */ case FLOAT4OID: return SQL3_REAL; /* float4 */ case FLOAT8OID: - return SQL3_DOUBLE_PRECISION; /* float8 */ + return SQL3_DOUBLE_PRECISION; /* float8 */ case BPCHAROID: - return SQL3_CHARACTER; /* bpchar */ + return SQL3_CHARACTER; /* bpchar */ case VARCHAROID: - return SQL3_CHARACTER_VARYING; /* varchar */ + return SQL3_CHARACTER_VARYING; /* varchar */ case DATEOID: return SQL3_DATE_TIME_TIMESTAMP; /* date */ case TIMEOID: 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 */ diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c index 2a93eb68578..33c9011a71f 100644 --- a/src/interfaces/ecpg/pgtypeslib/datetime.c +++ b/src/interfaces/ecpg/pgtypeslib/datetime.c @@ -156,8 +156,8 @@ PGTYPESdate_today(date * d) return; } -#define PGTYPES_DATE_NUM_MAX_DIGITS 20 /* should suffice for most - * years... */ +#define PGTYPES_DATE_NUM_MAX_DIGITS 20 /* should suffice for most + * years... */ #define PGTYPES_FMTDATE_DAY_DIGITS_LZ 1 /* LZ means "leading zeroes" */ #define PGTYPES_FMTDATE_DOW_LITERAL_SHORT 2 diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h index f70181380b2..5a192ddc453 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt.h +++ b/src/interfaces/ecpg/pgtypeslib/dt.h @@ -338,4 +338,4 @@ extern char *months[]; extern char *days[]; extern int day_tab[2][13]; -#endif /* DT_H */ +#endif /* DT_H */ diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index a88e1b94ab1..9bbe5c501ba 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -30,7 +30,7 @@ static datetkn datetktbl[] = { {"ahst", TZ, -36000}, /* Alaska-Hawaii Std Time */ {"akdt", DTZ, -28800}, /* Alaska Daylight Time */ {"akst", DTZ, -32400}, /* Alaska Standard Time */ - {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */ + {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */ {"almst", TZ, 25200}, /* Almaty Savings Time */ {"almt", TZ, 21600}, /* Almaty Time */ {"am", AMPM, AM}, @@ -201,12 +201,12 @@ static datetkn datetktbl[] = { idt /* Israeli, Iran, Indian Daylight Time */ #endif {LATE, RESERV, DTK_LATE}, /* "infinity" reserved for "late time" */ - {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */ + {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */ {"iot", TZ, 18000}, /* Indian Chagos Time */ {"irkst", DTZ, 32400}, /* Irkutsk Summer Time */ {"irkt", TZ, 28800}, /* Irkutsk Time */ {"irt", TZ, 12600}, /* Iran Time */ - {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */ + {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */ #if 0 isst #endif @@ -425,33 +425,33 @@ static datetkn deltatktbl[] = { {"@", IGNORE_DTF, 0}, /* postgres relative prefix */ {DAGO, AGO, 0}, /* "ago" indicates negative time offset */ {"c", UNITS, DTK_CENTURY}, /* "century" relative */ - {"cent", UNITS, DTK_CENTURY}, /* "century" relative */ + {"cent", UNITS, DTK_CENTURY}, /* "century" relative */ {"centuries", UNITS, DTK_CENTURY}, /* "centuries" relative */ - {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */ + {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */ {"d", UNITS, DTK_DAY}, /* "day" relative */ {DDAY, UNITS, DTK_DAY}, /* "day" relative */ {"days", UNITS, DTK_DAY}, /* "days" relative */ {"dec", UNITS, DTK_DECADE}, /* "decade" relative */ - {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */ - {"decades", UNITS, DTK_DECADE}, /* "decades" relative */ + {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */ + {"decades", UNITS, DTK_DECADE}, /* "decades" relative */ {"decs", UNITS, DTK_DECADE}, /* "decades" relative */ {"h", UNITS, DTK_HOUR}, /* "hour" relative */ {DHOUR, UNITS, DTK_HOUR}, /* "hour" relative */ {"hours", UNITS, DTK_HOUR}, /* "hours" relative */ {"hr", UNITS, DTK_HOUR}, /* "hour" relative */ {"hrs", UNITS, DTK_HOUR}, /* "hours" relative */ - {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */ + {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */ {"m", UNITS, DTK_MINUTE}, /* "minute" relative */ - {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ - {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ - {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ - {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ - {"millisecon", UNITS, DTK_MILLISEC}, /* relative */ + {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ + {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ + {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ + {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ + {"millisecon", UNITS, DTK_MILLISEC}, /* relative */ {"mils", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */ {"min", UNITS, DTK_MINUTE}, /* "minute" relative */ {"mins", UNITS, DTK_MINUTE}, /* "minutes" relative */ - {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */ - {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */ + {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */ + {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */ {"mon", UNITS, DTK_MONTH}, /* "months" relative */ {"mons", UNITS, DTK_MONTH}, /* "months" relative */ {DMONTH, UNITS, DTK_MONTH}, /* "month" relative */ @@ -462,7 +462,7 @@ static datetkn deltatktbl[] = { {"mseconds", UNITS, DTK_MILLISEC}, {"msecs", UNITS, DTK_MILLISEC}, {"qtr", UNITS, DTK_QUARTER}, /* "quarter" relative */ - {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */ + {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */ {"s", UNITS, DTK_SECOND}, {"sec", UNITS, DTK_SECOND}, {DSECOND, UNITS, DTK_SECOND}, @@ -470,13 +470,13 @@ static datetkn deltatktbl[] = { {"secs", UNITS, DTK_SECOND}, {DTIMEZONE, UNITS, DTK_TZ}, /* "timezone" time offset */ {"timezone_h", UNITS, DTK_TZ_HOUR}, /* timezone hour units */ - {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */ + {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */ {"undefined", RESERV, DTK_INVALID}, /* pre-v6.1 invalid time */ {"us", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ - {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ + {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {DMICROSEC, UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {"useconds", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ - {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ + {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */ {"w", UNITS, DTK_WEEK}, /* "week" relative */ {DWEEK, UNITS, DTK_WEEK}, /* "week" relative */ {"weeks", UNITS, DTK_WEEK}, /* "weeks" relative */ diff --git a/src/interfaces/ecpg/pgtypeslib/extern.h b/src/interfaces/ecpg/pgtypeslib/extern.h index 88b2fb07759..9df800ea1d5 100644 --- a/src/interfaces/ecpg/pgtypeslib/extern.h +++ b/src/interfaces/ecpg/pgtypeslib/extern.h @@ -11,13 +11,12 @@ #define PGTYPES_TYPE_STRING_MALLOCED 1 #define PGTYPES_TYPE_STRING_CONSTANT 2 #define PGTYPES_TYPE_CHAR 3 -#define PGTYPES_TYPE_DOUBLE_NF 4 /* no fractional part */ +#define PGTYPES_TYPE_DOUBLE_NF 4 /* no fractional part */ #define PGTYPES_TYPE_INT64 5 #define PGTYPES_TYPE_UINT 6 -#define PGTYPES_TYPE_UINT_2_LZ 7 /* 2 digits, pad with leading - * zero */ -#define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading - * space */ +#define PGTYPES_TYPE_UINT_2_LZ 7 /* 2 digits, pad with leading zero */ +#define PGTYPES_TYPE_UINT_2_LS 8 /* 2 digits, pad with leading + * space */ #define PGTYPES_TYPE_UINT_3_LZ 9 #define PGTYPES_TYPE_UINT_4_LZ 10 #define PGTYPES_TYPE_UINT_LONG 11 @@ -41,14 +40,14 @@ char *pgtypes_strdup(const char *); #ifndef bool #define bool char -#endif /* ndef bool */ +#endif /* ndef bool */ #ifndef FALSE #define FALSE 0 -#endif /* FALSE */ +#endif /* FALSE */ #ifndef TRUE #define TRUE 1 -#endif /* TRUE */ +#endif /* TRUE */ -#endif /* __PGTYPES_COMMON_H__ */ +#endif /* __PGTYPES_COMMON_H__ */ diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index 4a740d159d8..30f2ccbcb77 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -335,7 +335,7 @@ DecodeISO8601Interval(char *str, * * Assert wasn't available so removed it. */ int -DecodeInterval(char **field, int *ftype, int nf, /* int range, */ +DecodeInterval(char **field, int *ftype, int nf, /* int range, */ int *dtype, struct /* pg_ */ tm *tm, fsec_t *fsec) { int IntervalStyle = INTSTYLE_POSTGRES_VERBOSE; diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c index 4b4df9dfc6b..78931399e69 100644 --- a/src/interfaces/ecpg/pgtypeslib/timestamp.c +++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c @@ -152,7 +152,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **t tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_zone = tx->tm_zone; - *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ + *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ if (tzn != NULL) *tzn = tm->tm_zone; #elif defined(HAVE_INT_TIMEZONE) diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h index 07d8311806d..2c35426b7fb 100644 --- a/src/interfaces/ecpg/preproc/extern.h +++ b/src/interfaces/ecpg/preproc/extern.h @@ -128,4 +128,4 @@ extern enum COMPAT_MODE compat; #define INFORMIX_MODE (compat == ECPG_COMPAT_INFORMIX || compat == ECPG_COMPAT_INFORMIX_SE) -#endif /* _ECPG_PREPROC_EXTERN_H */ +#endif /* _ECPG_PREPROC_EXTERN_H */ diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c index 7cdded53dbf..0479c93c991 100644 --- a/src/interfaces/ecpg/preproc/output.c +++ b/src/interfaces/ecpg/preproc/output.c @@ -228,8 +228,8 @@ output_escaped_str(char *str, bool quoted) j++; } while (str[j] == ' ' || str[j] == '\t'); - if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n')) /* not followed by a - * newline */ + if ((str[j] != '\n') && (str[j] != '\r' || str[j + 1] != '\n')) /* not followed by a + * newline */ fputs("\\\\", base_yyout); } else if (str[i] == '\r' && str[i + 1] == '\n') diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index 4ed822b8bbe..0d240d9df47 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -178,7 +178,7 @@ get_type(enum ECPGttype type) case ECPGt_NO_INDICATOR: /* no indicator */ return ("ECPGt_NO_INDICATOR"); break; - case ECPGt_char_variable: /* string that should not be quoted */ + case ECPGt_char_variable: /* string that should not be quoted */ return ("ECPGt_char_variable"); break; case ECPGt_const: /* constant string quoted */ diff --git a/src/interfaces/ecpg/preproc/type.h b/src/interfaces/ecpg/preproc/type.h index cd0d1da8c4a..4b933364807 100644 --- a/src/interfaces/ecpg/preproc/type.h +++ b/src/interfaces/ecpg/preproc/type.h @@ -25,10 +25,9 @@ struct ECPGtype * string */ union { - struct ECPGtype *element; /* For an array this is the type of - * the element */ - struct ECPGstruct_member *members; /* A pointer to a list of - * members. */ + struct ECPGtype *element; /* For an array this is the type of the + * element */ + struct ECPGstruct_member *members; /* A pointer to a list of members. */ } u; int counter; }; @@ -195,4 +194,4 @@ struct fetch_desc char *name; }; -#endif /* _ECPG_PREPROC_TYPE_H */ +#endif /* _ECPG_PREPROC_TYPE_H */ diff --git a/src/interfaces/ecpg/test/expected/compat_informix-describe.c b/src/interfaces/ecpg/test/expected/compat_informix-describe.c index d1632e280c1..1b5aae0df7a 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-describe.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-describe.c @@ -41,7 +41,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 5 "describe.pgc" diff --git a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c index 1f316fbd7c6..1df87f83ef0 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c @@ -43,7 +43,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 7 "sqlda.pgc" @@ -105,7 +105,7 @@ typedef struct sqlda_struct sqlda_t; #define SQLSERIAL8 ECPGt_long #endif -#endif /* ndef ECPG_SQLTYPES_H */ +#endif /* ndef ECPG_SQLTYPES_H */ #line 8 "sqlda.pgc" diff --git a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c index 98246f47345..4e372a57991 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c @@ -23,8 +23,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/test/expected/preproc-init.c b/src/interfaces/ecpg/test/expected/preproc-init.c index 6ca8d559014..ca23d348d6e 100644 --- a/src/interfaces/ecpg/test/expected/preproc-init.c +++ b/src/interfaces/ecpg/test/expected/preproc-init.c @@ -17,8 +17,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/test/expected/preproc-outofscope.c b/src/interfaces/ecpg/test/expected/preproc-outofscope.c index 70809c450d0..b3deb221d74 100644 --- a/src/interfaces/ecpg/test/expected/preproc-outofscope.c +++ b/src/interfaces/ecpg/test/expected/preproc-outofscope.c @@ -58,7 +58,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 @@ -91,7 +91,7 @@ int PGTYPESnumeric_from_decimal(decimal *, numeric *); } #endif -#endif /* PGTYPES_NUMERIC */ +#endif /* PGTYPES_NUMERIC */ #line 8 "outofscope.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c index 4b0a0418f73..781c4267718 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.c +++ b/src/interfaces/ecpg/test/expected/sql-array.c @@ -30,8 +30,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/test/expected/sql-code100.c b/src/interfaces/ecpg/test/expected/sql-code100.c index 4338f7ed2d3..4c85530a17a 100644 --- a/src/interfaces/ecpg/test/expected/sql-code100.c +++ b/src/interfaces/ecpg/test/expected/sql-code100.c @@ -17,8 +17,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/test/expected/sql-copystdout.c b/src/interfaces/ecpg/test/expected/sql-copystdout.c index a1e75958731..d2599fb0e93 100644 --- a/src/interfaces/ecpg/test/expected/sql-copystdout.c +++ b/src/interfaces/ecpg/test/expected/sql-copystdout.c @@ -19,8 +19,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/test/expected/sql-define.c b/src/interfaces/ecpg/test/expected/sql-define.c index 9c9931f4438..29583ecd741 100644 --- a/src/interfaces/ecpg/test/expected/sql-define.c +++ b/src/interfaces/ecpg/test/expected/sql-define.c @@ -17,8 +17,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/test/expected/sql-describe.c b/src/interfaces/ecpg/test/expected/sql-describe.c index b5e2d7427fc..155e206f29d 100644 --- a/src/interfaces/ecpg/test/expected/sql-describe.c +++ b/src/interfaces/ecpg/test/expected/sql-describe.c @@ -39,7 +39,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 5 "describe.pgc" diff --git a/src/interfaces/ecpg/test/expected/sql-dynalloc.c b/src/interfaces/ecpg/test/expected/sql-dynalloc.c index d2051e6996a..a95dddf15d6 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc.c @@ -18,8 +18,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/test/expected/sql-dynalloc2.c b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c index 2d25149cbbc..711857706ae 100644 --- a/src/interfaces/ecpg/test/expected/sql-dynalloc2.c +++ b/src/interfaces/ecpg/test/expected/sql-dynalloc2.c @@ -18,8 +18,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/test/expected/sql-dyntest.c b/src/interfaces/ecpg/test/expected/sql-dyntest.c index ea0d859bd7e..513d44c6304 100644 --- a/src/interfaces/ecpg/test/expected/sql-dyntest.c +++ b/src/interfaces/ecpg/test/expected/sql-dyntest.c @@ -57,7 +57,7 @@ enum * standard) */ }; -#endif /* !_ECPG_SQL3TYPES_H */ +#endif /* !_ECPG_SQL3TYPES_H */ #line 7 "dyntest.pgc" @@ -71,8 +71,8 @@ enum #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/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c index 454fba0dba8..7cf43ad6228 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.c +++ b/src/interfaces/ecpg/test/expected/sql-indicators.c @@ -19,8 +19,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/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c index b6c35ab1a3a..15c81c6b126 100644 --- a/src/interfaces/ecpg/test/expected/sql-sqlda.c +++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c @@ -41,7 +41,7 @@ typedef struct sqlda_struct sqlda_t; #endif -#endif /* ECPG_SQLDA_H */ +#endif /* ECPG_SQLDA_H */ #line 7 "sqlda.pgc" @@ -80,7 +80,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 @@ -113,7 +113,7 @@ int PGTYPESnumeric_from_decimal(decimal *, numeric *); } #endif -#endif /* PGTYPES_NUMERIC */ +#endif /* PGTYPES_NUMERIC */ #line 8 "sqlda.pgc" diff --git a/src/interfaces/ecpg/test/expected/thread-alloc.c b/src/interfaces/ecpg/test/expected/thread-alloc.c index 57ef2bcc63b..9f8ac594304 100644 --- a/src/interfaces/ecpg/test/expected/thread-alloc.c +++ b/src/interfaces/ecpg/test/expected/thread-alloc.c @@ -40,8 +40,8 @@ main(void) #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/test/expected/thread-descriptor.c b/src/interfaces/ecpg/test/expected/thread-descriptor.c index 50a7a31da43..607df7ce242 100644 --- a/src/interfaces/ecpg/test/expected/thread-descriptor.c +++ b/src/interfaces/ecpg/test/expected/thread-descriptor.c @@ -31,8 +31,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/test/expected/thread-prep.c b/src/interfaces/ecpg/test/expected/thread-prep.c index 382e2148799..72ca568151d 100644 --- a/src/interfaces/ecpg/test/expected/thread-prep.c +++ b/src/interfaces/ecpg/test/expected/thread-prep.c @@ -40,8 +40,8 @@ main(void) #define PGDLLIMPORT __declspec (dllimport) #else #define PGDLLIMPORT -#endif /* __CYGWIN__ */ -#endif /* PGDLLIMPORT */ +#endif /* __CYGWIN__ */ +#endif /* PGDLLIMPORT */ #define SQLERRMC_LEN 150 diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index 181eeea8351..92c289b9e82 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -251,7 +251,7 @@ pg_GSS_startup(PGconn *conn, int payloadlen) return pg_GSS_continue(conn, payloadlen); } -#endif /* ENABLE_GSS */ +#endif /* ENABLE_GSS */ #ifdef ENABLE_SSPI @@ -477,7 +477,7 @@ pg_SSPI_startup(PGconn *conn, int use_negotiate, int payloadlen) return pg_SSPI_continue(conn, payloadlen); } -#endif /* ENABLE_SSPI */ +#endif /* ENABLE_SSPI */ /* * Initialize SASL authentication exchange. @@ -901,7 +901,7 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn) printfPQExpBuffer(&conn->errorMessage, libpq_gettext("GSSAPI authentication not supported\n")); return STATUS_ERROR; -#endif /* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */ +#endif /* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */ #ifdef ENABLE_SSPI case AUTH_REQ_SSPI: @@ -933,8 +933,8 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn) printfPQExpBuffer(&conn->errorMessage, libpq_gettext("SSPI authentication not supported\n")); return STATUS_ERROR; -#endif /* !define(ENABLE_GSSAPI) */ -#endif /* ENABLE_SSPI */ +#endif /* !define(ENABLE_GSSAPI) */ +#endif /* ENABLE_SSPI */ case AUTH_REQ_CRYPT: diff --git a/src/interfaces/libpq/fe-auth.h b/src/interfaces/libpq/fe-auth.h index 9f4c2a50d8d..5dc6bb5341d 100644 --- a/src/interfaces/libpq/fe-auth.h +++ b/src/interfaces/libpq/fe-auth.h @@ -30,4 +30,4 @@ extern void pg_fe_scram_exchange(void *opaq, char *input, int inputlen, bool *done, bool *success, PQExpBuffer errorMessage); extern char *pg_fe_scram_build_verifier(const char *password); -#endif /* FE_AUTH_H */ +#endif /* FE_AUTH_H */ diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 3d5966586d3..c6d17ed9210 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -184,7 +184,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { offsetof(struct pg_conn, pgpassfile)}, {"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL, - "Connect-timeout", "", 10, /* strlen(INT32_MAX) == 10 */ + "Connect-timeout", "", 10, /* strlen(INT32_MAX) == 10 */ offsetof(struct pg_conn, connect_timeout)}, {"dbname", "PGDATABASE", NULL, NULL, @@ -236,7 +236,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { offsetof(struct pg_conn, keepalives_idle)}, {"keepalives_interval", NULL, NULL, NULL, - "TCP-Keepalives-Interval", "", 10, /* strlen(INT32_MAX) == 10 */ + "TCP-Keepalives-Interval", "", 10, /* strlen(INT32_MAX) == 10 */ offsetof(struct pg_conn, keepalives_interval)}, {"keepalives_count", NULL, NULL, NULL, @@ -1369,7 +1369,7 @@ connectFailureMessage(PGconn *conn, int errorno) service); } else -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ { char host_addr[NI_MAXHOST]; const char *displayed_host; @@ -1608,8 +1608,8 @@ setKeepalivesWin32(PGconn *conn) } return 1; } -#endif /* SIO_KEEPALIVE_VALS */ -#endif /* WIN32 */ +#endif /* SIO_KEEPALIVE_VALS */ +#endif /* WIN32 */ /* ---------- * connectDBStart - @@ -2086,7 +2086,7 @@ keep_going: /* We will come back to here until there is conn->addr_cur = addr_cur->ai_next; continue; } -#endif /* F_SETFD */ +#endif /* F_SETFD */ if (!IS_AF_UNIX(addr_cur->ai_family)) { @@ -2124,8 +2124,8 @@ keep_going: /* We will come back to here until there is #ifdef SIO_KEEPALIVE_VALS else if (!setKeepalivesWin32(conn)) err = 1; -#endif /* SIO_KEEPALIVE_VALS */ -#endif /* WIN32 */ +#endif /* SIO_KEEPALIVE_VALS */ +#endif /* WIN32 */ if (err) { @@ -2163,7 +2163,7 @@ keep_going: /* We will come back to here until there is conn->sigpipe_flag = true; #else conn->sigpipe_flag = false; -#endif /* MSG_NOSIGNAL */ +#endif /* MSG_NOSIGNAL */ #ifdef SO_NOSIGPIPE optval = 1; @@ -2173,7 +2173,7 @@ keep_going: /* We will come back to here until there is conn->sigpipe_so = true; conn->sigpipe_flag = false; } -#endif /* SO_NOSIGPIPE */ +#endif /* SO_NOSIGPIPE */ /* * Start/make connection. This should not block, since we @@ -2357,7 +2357,7 @@ keep_going: /* We will come back to here until there is goto error_return; } } -#endif /* HAVE_UNIX_SOCKETS */ +#endif /* HAVE_UNIX_SOCKETS */ #ifdef USE_SSL @@ -2394,7 +2394,7 @@ keep_going: /* We will come back to here until there is conn->status = CONNECTION_SSL_STARTUP; return PGRES_POLLING_READING; } -#endif /* USE_SSL */ +#endif /* USE_SSL */ /* * Build the startup packet. @@ -2559,7 +2559,7 @@ keep_going: /* We will come back to here until there is #else /* !USE_SSL */ /* can't get here */ goto error_return; -#endif /* USE_SSL */ +#endif /* USE_SSL */ } /* @@ -2962,11 +2962,11 @@ keep_going: /* We will come back to here until there is case PGRES_POLLING_OK: /* Success */ break; - case PGRES_POLLING_READING: /* Still going */ + case PGRES_POLLING_READING: /* Still going */ conn->status = CONNECTION_SETENV; return PGRES_POLLING_READING; - case PGRES_POLLING_WRITING: /* Still going */ + case PGRES_POLLING_WRITING: /* Still going */ conn->status = CONNECTION_SETENV; return PGRES_POLLING_WRITING; @@ -3510,8 +3510,7 @@ closePGconn(PGconn *conn) * Close the connection, reset all transient state, flush I/O buffers. */ pqDropConnection(conn, true); - conn->status = CONNECTION_BAD; /* Well, not really _bad_ - just - * absent */ + conn->status = CONNECTION_BAD; /* Well, not really _bad_ - just absent */ conn->asyncStatus = PGASYNC_IDLE; pqClearAsyncResult(conn); /* deallocate result */ resetPQExpBuffer(&conn->errorMessage); @@ -4158,7 +4157,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, ldap_unbind(ld); return 3; } -#endif /* WIN32 */ +#endif /* WIN32 */ /* search */ res = NULL; @@ -4383,7 +4382,7 @@ ldapServiceLookup(const char *purl, PQconninfoOption *options, return 0; } -#endif /* USE_LDAP */ +#endif /* USE_LDAP */ #define MAXBUFSIZE 256 @@ -5412,7 +5411,7 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri, if (prevchar == ':') { - const char *port = ++p; /* advance past host terminator */ + const char *port = ++p; /* advance past host terminator */ while (*p && *p != '/' && *p != '?' && *p != ',') ++p; @@ -5444,7 +5443,7 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri, if (prevchar && prevchar != '?') { - const char *dbname = ++p; /* advance past host terminator */ + const char *dbname = ++p; /* advance past host terminator */ /* Look for query parameters */ while (*p && *p != '?') diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 4391d8c05b7..e825e6b7577 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -125,7 +125,7 @@ static int check_field_number(const PGresult *res, int field_num); */ #define PGRESULT_DATA_BLOCKSIZE 2048 -#define PGRESULT_ALIGN_BOUNDARY MAXIMUM_ALIGNOF /* from configure */ +#define PGRESULT_ALIGN_BOUNDARY MAXIMUM_ALIGNOF /* from configure */ #define PGRESULT_BLOCK_OVERHEAD Max(sizeof(PGresult_data), PGRESULT_ALIGN_BOUNDARY) #define PGRESULT_SEP_ALLOC_THRESHOLD (PGRESULT_DATA_BLOCKSIZE / 2) @@ -3026,7 +3026,7 @@ PQcmdTuples(PGresult *res) while (*p && *p != ' ') p++; if (*p == 0) - goto interpret_error; /* no space? */ + goto interpret_error; /* no space? */ p++; } else if (strncmp(res->cmdStatus, "SELECT ", 7) == 0 || diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index 1d6ea93a0a9..c8fd1af750d 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -814,7 +814,7 @@ definitelyEOF: definitelyFailed: /* Do *not* drop any already-read data; caller still wants it */ pqDropConnection(conn, false); - conn->status = CONNECTION_BAD; /* No more connection to backend */ + conn->status = CONNECTION_BAD; /* No more connection to backend */ return -1; } @@ -1165,7 +1165,7 @@ pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time) return select(sock + 1, &input_mask, &output_mask, &except_mask, ptr_timeout); -#endif /* HAVE_POLL */ +#endif /* HAVE_POLL */ } @@ -1259,4 +1259,4 @@ libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n) return dngettext(PG_TEXTDOMAIN("libpq"), msgid, msgid_plural, n); } -#endif /* ENABLE_NLS */ +#endif /* ENABLE_NLS */ diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index d7a7414901f..7e319eabe0d 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -177,7 +177,7 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) (1 + (po->standard != 0)) >= screen_size.ws_row - (po->header != 0) * (total_line_length / screen_size.ws_col + 1) * 2 - - (po->header != 0) * 2 /* row count and newline */ + - (po->header != 0) * 2 /* row count and newline */ ))) { fout = popen(pagerenv, "w"); @@ -190,8 +190,8 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) sigpipe_masked = true; #else oldsigpipehandler = pqsignal(SIGPIPE, SIG_IGN); -#endif /* ENABLE_THREAD_SAFETY */ -#endif /* WIN32 */ +#endif /* ENABLE_THREAD_SAFETY */ +#endif /* WIN32 */ } else fout = stdout; @@ -313,8 +313,8 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) pq_reset_sigpipe(&osigset, sigpipe_pending, true); #else pqsignal(SIGPIPE, oldsigpipehandler); -#endif /* ENABLE_THREAD_SAFETY */ -#endif /* WIN32 */ +#endif /* ENABLE_THREAD_SAFETY */ +#endif /* WIN32 */ } if (po->html3 && !po->expanded) fputs("</table>\n", fout); diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 3b0500fa523..af4ae9f937a 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -1099,7 +1099,7 @@ checkXactStatus(PGconn *conn, const char *cmdTag) * However, if we see one of these tags then we know for sure the server * is in abort state ... */ - else if (strcmp(cmdTag, "*ABORT STATE*") == 0) /* pre-7.3 only */ + else if (strcmp(cmdTag, "*ABORT STATE*") == 0) /* pre-7.3 only */ conn->xactStatus = PQTRANS_INERROR; } @@ -1526,7 +1526,7 @@ pqFunctionCall2(PGconn *conn, Oid fnid, conn)) continue; } - if (pqGetc(&id, conn)) /* get the last '0' */ + if (pqGetc(&id, conn)) /* get the last '0' */ continue; } if (id == '0') diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 53776e27b52..92f1a00f3f3 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -458,7 +458,7 @@ handleSyncLoss(PGconn *conn, char id, int msgLength) conn->asyncStatus = PGASYNC_READY; /* drop out of GetResult wait loop */ /* flush input data since we're giving up on processing it */ pqDropConnection(conn, true); - conn->status = CONNECTION_BAD; /* No more connection to backend */ + conn->status = CONNECTION_BAD; /* No more connection to backend */ } /* @@ -1679,7 +1679,7 @@ pqGetCopyData3(PGconn *conn, char **buffer, int async) return -2; } memcpy(*buffer, &conn->inBuffer[conn->inCursor], msgLength); - (*buffer)[msgLength] = '\0'; /* Add terminating null */ + (*buffer)[msgLength] = '\0'; /* Add terminating null */ /* Mark message consumed */ conn->inStart = conn->inCursor + msgLength; @@ -1915,8 +1915,8 @@ pqFunctionCall3(PGconn *conn, Oid fnid, if (pqPutMsgStart('F', false, conn) < 0 || /* function call msg */ pqPutInt(fnid, 4, conn) < 0 || /* function id */ - pqPutInt(1, 2, conn) < 0 || /* # of format codes */ - pqPutInt(1, 2, conn) < 0 || /* format code: BINARY */ + pqPutInt(1, 2, conn) < 0 || /* # of format codes */ + pqPutInt(1, 2, conn) < 0 || /* format code: BINARY */ pqPutInt(nargs, 2, conn) < 0) /* # of args */ { pqHandleSendFailure(conn); @@ -1951,7 +1951,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid, } } - if (pqPutInt(1, 2, conn) < 0) /* result format code: BINARY */ + if (pqPutInt(1, 2, conn) < 0) /* result format code: BINARY */ { pqHandleSendFailure(conn); return NULL; diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index e21bb5ad7d5..7c078a9baef 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -91,7 +91,7 @@ static pthread_mutex_t ssl_config_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t ssl_config_mutex = NULL; static long win32_ssl_create_mutex = 0; #endif -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ /* ------------------------------------------------------------ */ @@ -730,7 +730,7 @@ pq_lockingcallback(int mode, int n, const char *file, int line) PGTHREAD_ERROR("failed to unlock mutex"); } } -#endif /* ENABLE_THREAD_SAFETY && HAVE_CRYPTO_LOCK */ +#endif /* ENABLE_THREAD_SAFETY && HAVE_CRYPTO_LOCK */ /* * Initialize SSL library. @@ -809,8 +809,8 @@ pgtls_init(PGconn *conn) CRYPTO_set_locking_callback(pq_lockingcallback); } } -#endif /* HAVE_CRYPTO_LOCK */ -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* HAVE_CRYPTO_LOCK */ +#endif /* ENABLE_THREAD_SAFETY */ if (!ssl_lib_initialized) { @@ -1142,7 +1142,7 @@ initialize_SSL(PGconn *conn) /* cannot return NULL because we already checked before strdup */ engine_colon = strchr(engine_str, ':'); - *engine_colon = '\0'; /* engine_str now has engine name */ + *engine_colon = '\0'; /* engine_str now has engine name */ engine_colon++; /* engine_colon now has key name */ conn->engine = ENGINE_by_id(engine_str); @@ -1209,7 +1209,7 @@ initialize_SSL(PGconn *conn) * file */ } else -#endif /* USE_SSL_ENGINE */ +#endif /* USE_SSL_ENGINE */ { /* PGSSLKEY is not an engine, treat it as a filename */ strlcpy(fnbuf, conn->sslkey, sizeof(fnbuf)); diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 8f0d892a340..24afaa60bcf 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -115,14 +115,14 @@ struct sigpipe_info if (!SIGPIPE_MASKED(conn)) \ pqsignal(SIGPIPE, spinfo); \ } while (0) -#endif /* ENABLE_THREAD_SAFETY */ +#endif /* ENABLE_THREAD_SAFETY */ #else /* WIN32 */ #define DECLARE_SIGPIPE_INFO(spinfo) #define DISABLE_SIGPIPE(conn, spinfo, failaction) #define REMEMBER_EPIPE(spinfo, cond) #define RESTORE_SIGPIPE(conn, spinfo) -#endif /* WIN32 */ +#endif /* WIN32 */ /* ------------------------------------------------------------ */ /* Procedures common to all secure sessions */ @@ -312,7 +312,7 @@ pqsecure_raw_write(PGconn *conn, const void *ptr, size_t len) flags |= MSG_NOSIGNAL; retry_masked: -#endif /* MSG_NOSIGNAL */ +#endif /* MSG_NOSIGNAL */ DISABLE_SIGPIPE(conn, spinfo, return -1); @@ -334,7 +334,7 @@ retry_masked: flags = 0; goto retry_masked; } -#endif /* MSG_NOSIGNAL */ +#endif /* MSG_NOSIGNAL */ /* Set error message if appropriate */ switch (result_errno) @@ -415,7 +415,7 @@ PQsslAttributeNames(PGconn *conn) return result; } -#endif /* USE_SSL */ +#endif /* USE_SSL */ #if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32) @@ -502,4 +502,4 @@ pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending, bool got_epipe) SOCK_ERRNO_SET(save_errno); } -#endif /* ENABLE_THREAD_SAFETY && !WIN32 */ +#endif /* ENABLE_THREAD_SAFETY && !WIN32 */ diff --git a/src/interfaces/libpq/libpq-events.h b/src/interfaces/libpq/libpq-events.h index b08419a0f6c..20af1ffe6da 100644 --- a/src/interfaces/libpq/libpq-events.h +++ b/src/interfaces/libpq/libpq-events.h @@ -91,4 +91,4 @@ extern int PQfireResultCreateEvents(PGconn *conn, PGresult *res); } #endif -#endif /* LIBPQ_EVENTS_H */ +#endif /* LIBPQ_EVENTS_H */ diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h index 3d55a3da291..1d915e79151 100644 --- a/src/interfaces/libpq/libpq-fe.h +++ b/src/interfaces/libpq/libpq-fe.h @@ -56,8 +56,8 @@ typedef enum */ CONNECTION_STARTED, /* Waiting for connection to be made. */ CONNECTION_MADE, /* Connection OK; waiting to send. */ - CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the - * postmaster. */ + CONNECTION_AWAITING_RESPONSE, /* Waiting for a response from the + * postmaster. */ CONNECTION_AUTH_OK, /* Received authentication; waiting for * backend startup. */ CONNECTION_SETENV, /* Negotiating environment. */ @@ -609,4 +609,4 @@ extern int pg_valid_server_encoding_id(int encoding); } #endif -#endif /* LIBPQ_FE_H */ +#endif /* LIBPQ_FE_H */ diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h index 335568b790a..ff5020fc0c5 100644 --- a/src/interfaces/libpq/libpq-int.h +++ b/src/interfaces/libpq/libpq-int.h @@ -69,7 +69,7 @@ typedef struct int length; } gss_buffer_desc; #endif -#endif /* ENABLE_SSPI */ +#endif /* ENABLE_SSPI */ #ifdef USE_OPENSSL #include <openssl/ssl.h> @@ -78,7 +78,7 @@ typedef struct #ifndef OPENSSL_NO_ENGINE #define USE_SSL_ENGINE #endif -#endif /* USE_OPENSSL */ +#endif /* USE_OPENSSL */ /* * POSTGRES backend dependent Constants. @@ -143,7 +143,7 @@ typedef struct pgMessageField { struct pgMessageField *next; /* list link */ char code; /* field code */ - char contents[FLEXIBLE_ARRAY_MEMBER]; /* value, nul-terminated */ + char contents[FLEXIBLE_ARRAY_MEMBER]; /* value, nul-terminated */ } PGMessageField; /* Fields needed for notice handling */ @@ -151,7 +151,7 @@ typedef struct { PQnoticeReceiver noticeRec; /* notice message receiver */ void *noticeRecArg; - PQnoticeProcessor noticeProc; /* notice message processor */ + PQnoticeProcessor noticeProc; /* notice message processor */ void *noticeProcArg; } PGNoticeHooks; @@ -161,7 +161,7 @@ typedef struct PGEvent char *name; /* used only for error messages */ void *passThrough; /* pointer supplied at registration time */ void *data; /* optional state (instance) data */ - bool resultInitialized; /* T if RESULTCREATE/COPY succeeded */ + bool resultInitialized; /* T if RESULTCREATE/COPY succeeded */ } PGEvent; struct pg_result @@ -175,7 +175,7 @@ struct pg_result int numParameters; PGresParamDesc *paramDescs; ExecStatusType resultStatus; - char cmdStatus[CMDSTATUS_LEN]; /* cmd status from the query */ + char cmdStatus[CMDSTATUS_LEN]; /* cmd status from the query */ int binary; /* binary tuple values if binary == 1, * otherwise text */ @@ -255,7 +255,7 @@ typedef struct PQEnvironmentOption /* Typedef for parameter-status list entries */ typedef struct pgParameterStatus { - struct pgParameterStatus *next; /* list link */ + struct pgParameterStatus *next; /* list link */ char *name; /* parameter name */ char *value; /* parameter value */ /* Note: name and value are stored in same malloc block as struct is */ @@ -274,7 +274,7 @@ typedef struct pgLobjfuncs Oid fn_lo_tell; /* OID of backend function lo_tell */ Oid fn_lo_tell64; /* OID of backend function lo_tell64 */ Oid fn_lo_truncate; /* OID of backend function lo_truncate */ - Oid fn_lo_truncate64; /* OID of function lo_truncate64 */ + Oid fn_lo_truncate64; /* OID of function lo_truncate64 */ Oid fn_lo_read; /* OID of backend function LOread */ Oid fn_lo_write; /* OID of backend function LOwrite */ } PGlobjfuncs; @@ -333,7 +333,7 @@ struct pg_conn char *pgtty; /* tty on which the backend messages is * displayed (OBSOLETE, NOT USED) */ char *connect_timeout; /* connection timeout (numeric string) */ - char *client_encoding_initial; /* encoding to use */ + char *client_encoding_initial; /* encoding to use */ char *pgoptions; /* options to start the backend with */ char *appname; /* application name */ char *fbappname; /* fallback application name */ @@ -346,8 +346,8 @@ struct pg_conn char *keepalives_idle; /* time between TCP keepalives */ char *keepalives_interval; /* time between TCP keepalive * retransmits */ - char *keepalives_count; /* maximum number of TCP keepalive - * retransmits */ + char *keepalives_count; /* maximum number of TCP keepalive + * retransmits */ char *sslmode; /* SSL mode (require,prefer,allow,disable) */ char *sslcompression; /* SSL compression (0 or 1) */ char *sslkey; /* client key filename */ @@ -380,14 +380,13 @@ struct pg_conn PGTransactionStatusType xactStatus; /* never changes to ACTIVE */ PGQueryClass queryclass; char *last_query; /* last SQL command, or NULL if unknown */ - char last_sqlstate[6]; /* last reported SQLSTATE */ + char last_sqlstate[6]; /* last reported SQLSTATE */ bool options_valid; /* true if OK to attempt connection */ bool nonblocking; /* whether this connection is using nonblock * sending semantics */ bool singleRowMode; /* return current query result row-by-row? */ char copy_is_binary; /* 1 = copy binary, 0 = copy text */ - int copy_already_done; /* # bytes already returned in COPY - * OUT */ + int copy_already_done; /* # bytes already returned in COPY OUT */ PGnotify *notifyHead; /* oldest unreported Notify msg */ PGnotify *notifyTail; /* newest unreported Notify msg */ @@ -403,8 +402,7 @@ struct pg_conn SockAddr raddr; /* Remote address */ ProtocolVersion pversion; /* FE/BE protocol version in use */ int sversion; /* server version, e.g. 70401 for 7.4.1 */ - bool auth_req_received; /* true if any type of auth req - * received */ + bool auth_req_received; /* true if any type of auth req received */ bool password_needed; /* true if server demanded a password */ bool pgpassfile_used; /* true if password is from pgpassfile */ bool sigpipe_so; /* have we masked SIGPIPE via SO_NOSIGPIPE? */ @@ -468,8 +466,8 @@ struct pg_conn void *engine; /* dummy field to keep struct the same if * OpenSSL version changes */ #endif -#endif /* USE_OPENSSL */ -#endif /* USE_SSL */ +#endif /* USE_OPENSSL */ +#endif /* USE_SSL */ #ifdef ENABLE_GSS gss_ctx_id_t gctx; /* GSS context */ @@ -489,7 +487,7 @@ struct pg_conn #endif /* Buffer for current error message */ - PQExpBufferData errorMessage; /* expansible string */ + PQExpBufferData errorMessage; /* expansible string */ /* Buffer for receiving various parts of messages */ PQExpBufferData workBuffer; /* expansible string */ @@ -528,7 +526,7 @@ extern char *const pgresStatus[]; #define ROOT_CRL_FILE "root.crl" #endif -#endif /* USE_SSL */ +#endif /* USE_SSL */ /* ---------------- * Internal functions of libpq @@ -698,4 +696,4 @@ extern char *libpq_ngettext(const char *msgid, const char *msgid_plural, unsigne #define SOCK_ERRNO_SET(e) (errno = (e)) #endif -#endif /* LIBPQ_INT_H */ +#endif /* LIBPQ_INT_H */ diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c index fd62cde99f1..f4aa7c9cef9 100644 --- a/src/interfaces/libpq/pqexpbuffer.c +++ b/src/interfaces/libpq/pqexpbuffer.c @@ -91,7 +91,7 @@ initPQExpBuffer(PQExpBuffer str) str->data = (char *) malloc(INITIAL_EXPBUFFER_SIZE); if (str->data == NULL) { - str->data = (char *) oom_buffer; /* see comment above */ + str->data = (char *) oom_buffer; /* see comment above */ str->maxlen = 0; str->len = 0; } diff --git a/src/interfaces/libpq/pqexpbuffer.h b/src/interfaces/libpq/pqexpbuffer.h index 239def42b7f..19633f9b795 100644 --- a/src/interfaces/libpq/pqexpbuffer.h +++ b/src/interfaces/libpq/pqexpbuffer.h @@ -179,4 +179,4 @@ extern void appendPQExpBufferChar(PQExpBuffer str, char ch); extern void appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen); -#endif /* PQEXPBUFFER_H */ +#endif /* PQEXPBUFFER_H */ |
