1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

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
This commit is contained in:
Tom Lane
2017-06-21 14:39:04 -04:00
parent 8ff6d4ec78
commit e3860ffa4d
379 changed files with 1725 additions and 1707 deletions

View File

@ -205,8 +205,8 @@ deccvasc(char *cp, int len, decimal *np)
if (risnull(CSTRINGTYPE, cp))
return 0;
str = ecpg_strndup(cp, len);/* decimal_in always converts the complete
* string */
str = ecpg_strndup(cp, len); /* decimal_in always converts the complete
* string */
if (!str)
ret = ECPG_INFORMIX_NUM_UNDERFLOW;
else
@ -692,7 +692,7 @@ static struct
int remaining;
char sign;
char *val_string;
} value;
} value;
/**
* initialize the struct, which holds the different forms

View File

@ -110,7 +110,7 @@ ecpg_get_connection(const char *connection_name)
}
static void
ecpg_finish(struct connection * act)
ecpg_finish(struct connection *act)
{
if (act != NULL)
{

View File

@ -16,14 +16,14 @@
#include "sqlda.h"
#include "sql3types.h"
static void descriptor_free(struct descriptor * desc);
static void descriptor_free(struct descriptor *desc);
/* We manage descriptors separately for each thread. */
#ifdef ENABLE_THREAD_SAFETY
static pthread_key_t descriptor_key;
static pthread_once_t descriptor_once = PTHREAD_ONCE_INIT;
static void descriptor_deallocate_all(struct descriptor * list);
static void descriptor_deallocate_all(struct descriptor *list);
static void
descriptor_destructor(void *arg)
@ -45,7 +45,7 @@ get_descriptors(void)
}
static void
set_descriptors(struct descriptor * value)
set_descriptors(struct descriptor *value)
{
pthread_setspecific(descriptor_key, value);
}
@ -689,7 +689,7 @@ ECPGset_desc(int lineno, const char *desc_name, int index,...)
/* Free the descriptor and items in it. */
static void
descriptor_free(struct descriptor * desc)
descriptor_free(struct descriptor *desc)
{
struct descriptor_item *desc_item;
@ -743,7 +743,7 @@ ECPGdeallocate_desc(int line, const char *name)
/* Deallocate all descriptors in the list */
static void
descriptor_deallocate_all(struct descriptor * list)
descriptor_deallocate_all(struct descriptor *list)
{
while (list)
{

View File

@ -82,7 +82,7 @@ quote_postgres(char *arg, bool quote, int lineno)
}
static void
free_variable(struct variable * var)
free_variable(struct variable *var)
{
struct variable *var_next;
@ -95,7 +95,7 @@ free_variable(struct variable * var)
}
static void
free_statement(struct statement * stmt)
free_statement(struct statement *stmt)
{
if (stmt == NULL)
return;
@ -145,7 +145,7 @@ next_insert(char *text, int pos, bool questionmarks)
}
static bool
ecpg_type_infocache_push(struct ECPGtype_information_cache ** cache, int oid, enum ARRAY_TYPE isarray, int lineno)
ecpg_type_infocache_push(struct ECPGtype_information_cache **cache, int oid, enum ARRAY_TYPE isarray, int lineno)
{
struct ECPGtype_information_cache *new_entry
= (struct ECPGtype_information_cache *) ecpg_alloc(sizeof(struct ECPGtype_information_cache), lineno);
@ -161,7 +161,7 @@ ecpg_type_infocache_push(struct ECPGtype_information_cache ** cache, int oid, en
}
static enum ARRAY_TYPE
ecpg_is_type_an_array(int type, const struct statement * stmt, const struct variable * var)
ecpg_is_type_an_array(int type, const struct statement *stmt, const struct variable *var)
{
char *array_query;
enum ARRAY_TYPE isarray = ECPG_ARRAY_NOT_SET;
@ -307,7 +307,7 @@ ecpg_is_type_an_array(int type, const struct statement * stmt, const struct vari
bool
ecpg_store_result(const PGresult *results, int act_field,
const struct statement * stmt, struct variable * var)
const struct statement *stmt, struct variable *var)
{
enum ARRAY_TYPE isarray;
int act_tuple,
@ -491,7 +491,7 @@ sprintf_float_value(char *ptr, float value, const char *delim)
}
bool
ecpg_store_input(const int lineno, const bool force_indicator, const struct variable * var,
ecpg_store_input(const int lineno, const bool force_indicator, const struct variable *var,
char **tobeinserted_p, bool quote)
{
char *mallocedval = NULL;
@ -1049,7 +1049,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
}
void
ecpg_free_params(struct statement * stmt, bool print)
ecpg_free_params(struct statement *stmt, bool print)
{
int n;
@ -1065,7 +1065,7 @@ ecpg_free_params(struct statement * stmt, bool print)
}
static bool
insert_tobeinserted(int position, int ph_len, struct statement * stmt, char *tobeinserted)
insert_tobeinserted(int position, int ph_len, struct statement *stmt, char *tobeinserted)
{
char *newcopy;
@ -1104,7 +1104,7 @@ insert_tobeinserted(int position, int ph_len, struct statement * stmt, char *tob
* in arrays which can be used by PQexecParams().
*/
bool
ecpg_build_params(struct statement * stmt)
ecpg_build_params(struct statement *stmt)
{
struct variable *var;
int desc_counter = 0;
@ -1402,7 +1402,7 @@ ecpg_build_params(struct statement * stmt)
* If we are in non-autocommit mode, automatically start a transaction.
*/
bool
ecpg_autostart_transaction(struct statement * stmt)
ecpg_autostart_transaction(struct statement *stmt)
{
if (PQtransactionStatus(stmt->connection->connection) == PQTRANS_IDLE && !stmt->connection->autocommit)
{
@ -1423,7 +1423,7 @@ ecpg_autostart_transaction(struct statement * stmt)
* Execute the SQL statement.
*/
bool
ecpg_execute(struct statement * stmt)
ecpg_execute(struct statement *stmt)
{
ecpg_log("ecpg_execute on line %d: query: %s; with %d parameter(s) on connection %s\n", stmt->lineno, stmt->command, stmt->nparams, stmt->connection->name);
if (stmt->statement_type == ECPGst_execute)
@ -1471,7 +1471,7 @@ ecpg_execute(struct statement * stmt)
*-------
*/
bool
ecpg_process_output(struct statement * stmt, bool clear_result)
ecpg_process_output(struct statement *stmt, bool clear_result)
{
struct variable *var;
bool status = false;
@ -1747,7 +1747,7 @@ bool
ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
const char *connection_name, const bool questionmarks,
enum ECPG_statement_type statement_type, const char *query,
va_list args, struct statement ** stmt_out)
va_list args, struct statement **stmt_out)
{
struct statement *stmt;
struct connection *con;
@ -1976,7 +1976,7 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
* Restore the application locale and free the statement structure.
*/
void
ecpg_do_epilogue(struct statement * stmt)
ecpg_do_epilogue(struct statement *stmt)
{
if (stmt == NULL)
return;

View File

@ -166,15 +166,15 @@ struct prepared_statement *ecpg_find_prepared_statement(const char *,
struct connection *, struct prepared_statement **);
bool ecpg_store_result(const PGresult *results, int act_field,
const struct statement * stmt, struct variable * var);
const struct statement *stmt, struct variable *var);
bool ecpg_store_input(const int, const bool, const struct variable *, char **, bool);
void ecpg_free_params(struct statement * stmt, bool print);
void ecpg_free_params(struct statement *stmt, bool print);
bool ecpg_do_prologue(int, const int, const int, const char *, const bool,
enum ECPG_statement_type, const char *, va_list,
struct statement **);
bool ecpg_build_params(struct statement *);
bool ecpg_autostart_transaction(struct statement * stmt);
bool ecpg_execute(struct statement * stmt);
bool ecpg_autostart_transaction(struct statement *stmt);
bool ecpg_execute(struct statement *stmt);
bool ecpg_process_output(struct statement *, bool);
void ecpg_do_epilogue(struct statement *);
bool ecpg_do(const int, const int, const int, const char *, const bool,
@ -184,10 +184,10 @@ bool ecpg_check_PQresult(PGresult *, int, PGconn *, enum COMPAT_MODE);
void ecpg_raise(int line, int code, const char *sqlstate, const char *str);
void ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat);
char *ecpg_prepared(const char *, struct connection *);
bool ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection * conn);
bool ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *conn);
void ecpg_log(const char *format,...) pg_attribute_printf(1, 2);
bool ecpg_auto_prepare(int, const char *, const int, char **, const char *);
void ecpg_init_sqlca(struct sqlca_t * sqlca);
void ecpg_init_sqlca(struct sqlca_t *sqlca);
struct sqlda_compat *ecpg_build_compat_sqlda(int, PGresult *, int, enum COMPAT_MODE);
void ecpg_set_compat_sqlda(int, struct sqlda_compat **, const PGresult *, int, enum COMPAT_MODE);

View File

@ -93,7 +93,7 @@ get_auto_allocs(void)
}
static void
set_auto_allocs(struct auto_mem * am)
set_auto_allocs(struct auto_mem *am)
{
pthread_setspecific(auto_mem_key, am);
}

View File

@ -96,13 +96,13 @@ static int simple_debug = 0;
static FILE *debugstream = NULL;
void
ecpg_init_sqlca(struct sqlca_t * sqlca)
ecpg_init_sqlca(struct sqlca_t *sqlca)
{
memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t));
}
bool
ecpg_init(const struct connection * con, const char *connection_name, const int lineno)
ecpg_init(const struct connection *con, const char *connection_name, const int lineno)
{
struct sqlca_t *sqlca = ECPGget_sqlca();

View File

@ -27,8 +27,8 @@ 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,
struct prepared_statement * prev, struct prepared_statement * this);
static bool deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con,
struct prepared_statement *prev, struct prepared_statement *this);
static bool
isvarchar(unsigned char c)
@ -100,7 +100,7 @@ replace_variables(char **text, int lineno)
}
static bool
prepare_common(int lineno, struct connection * con, const char *name, const char *variable)
prepare_common(int lineno, struct connection *con, const char *name, const char *variable)
{
struct statement *stmt;
struct prepared_statement *this;
@ -180,7 +180,7 @@ ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, c
struct prepared_statement *
ecpg_find_prepared_statement(const char *name,
struct connection * con, struct prepared_statement ** prev_)
struct connection *con, struct prepared_statement **prev_)
{
struct prepared_statement *this,
*prev;
@ -198,7 +198,7 @@ ecpg_find_prepared_statement(const char *name,
}
static bool
deallocate_one(int lineno, enum COMPAT_MODE c, struct connection * con, struct prepared_statement * prev, struct prepared_statement * this)
deallocate_one(int lineno, enum COMPAT_MODE c, struct connection *con, struct prepared_statement *prev, struct prepared_statement *this)
{
bool r = false;
@ -273,7 +273,7 @@ ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
}
bool
ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection * con)
ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *con)
{
/* deallocate all prepared statements */
while (con->prep_stmts)
@ -292,7 +292,7 @@ ECPGdeallocate_all(int lineno, int compat, const char *connection_name)
}
char *
ecpg_prepared(const char *name, struct connection * con)
ecpg_prepared(const char *name, struct connection *con)
{
struct prepared_statement *this;

View File

@ -249,7 +249,7 @@ static int16 value_is_null = -1;
static int16 value_is_not_null = 0;
void
ecpg_set_compat_sqlda(int lineno, struct sqlda_compat ** _sqlda, const PGresult *res, int row, enum COMPAT_MODE compat)
ecpg_set_compat_sqlda(int lineno, struct sqlda_compat **_sqlda, const PGresult *res, int row, enum COMPAT_MODE compat)
{
struct sqlda_compat *sqlda = (*_sqlda);
int i;
@ -438,7 +438,7 @@ ecpg_build_native_sqlda(int line, PGresult *res, int row, enum COMPAT_MODE compa
}
void
ecpg_set_native_sqlda(int lineno, struct sqlda_struct ** _sqlda, const PGresult *res, int row, enum COMPAT_MODE compat)
ecpg_set_native_sqlda(int lineno, struct sqlda_struct **_sqlda, const PGresult *res, int row, enum COMPAT_MODE compat)
{
struct sqlda_struct *sqlda = (*_sqlda);
int i;

View File

@ -29,7 +29,7 @@
#define ECPG_INFORMIX_EXTRA_CHARS -1264
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -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

View File

@ -34,7 +34,7 @@
#define _ECPGTYPE_H
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -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);

View File

@ -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 *);

View File

@ -35,7 +35,7 @@ typedef struct
} decimal;
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -10,7 +10,7 @@ typedef int64 timestamp;
typedef int64 TimestampTz;
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -12,7 +12,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -313,12 +313,12 @@ do { \
int DecodeInterval(char **, int *, int, int *, struct tm *, fsec_t *);
int DecodeTime(char *, int *, struct tm *, fsec_t *);
int EncodeDateTime(struct tm * tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str, bool EuroDates);
int EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str);
int EncodeDateTime(struct tm *tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str, bool EuroDates);
int EncodeInterval(struct tm *tm, fsec_t fsec, int style, char *str);
int tm2timestamp(struct tm *, fsec_t, int *, timestamp *);
int DecodeUnits(int field, char *lowtoken, int *val);
bool CheckDateTokenTables(void);
int EncodeDateOnly(struct tm * tm, int style, char *str, bool EuroDates);
int EncodeDateOnly(struct tm *tm, int style, char *str, bool EuroDates);
int GetEpochTime(struct tm *);
int ParseDateTime(char *, char *, char **, int *, int *, char **);
int DecodeDateTime(char **, int *, int, int *, struct tm *, fsec_t *, bool);

View File

@ -561,7 +561,7 @@ DecodeUnits(int field, char *lowtoken, int *val)
}
return type;
} /* DecodeUnits() */
} /* DecodeUnits() */
/*
* Calendar time to Julian date conversions.
@ -604,7 +604,7 @@ date2j(int y, int m, int d)
julian += 7834 * m / 256 + d;
return julian;
} /* date2j() */
} /* date2j() */
void
j2date(int jd, int *year, int *month, int *day)
@ -630,7 +630,7 @@ j2date(int jd, int *year, int *month, int *day)
*month = (quad + 10) % 12 + 1;
return;
} /* j2date() */
} /* j2date() */
/* DecodeSpecial()
* Decode text string using lookup table.
@ -666,13 +666,13 @@ DecodeSpecial(int field, char *lowtoken, int *val)
}
return type;
} /* DecodeSpecial() */
} /* DecodeSpecial() */
/* EncodeDateOnly()
* Encode date as local time.
*/
int
EncodeDateOnly(struct tm * tm, int style, char *str, bool EuroDates)
EncodeDateOnly(struct tm *tm, int style, char *str, bool EuroDates)
{
if (tm->tm_mon < 1 || tm->tm_mon > MONTHS_PER_YEAR)
return -1;
@ -725,7 +725,7 @@ EncodeDateOnly(struct tm * tm, int style, char *str, bool EuroDates)
}
return TRUE;
} /* EncodeDateOnly() */
} /* EncodeDateOnly() */
void
TrimTrailingZeros(char *str)
@ -759,7 +759,7 @@ TrimTrailingZeros(char *str)
* European - dd/mm/yyyy
*/
int
EncodeDateTime(struct tm * tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str, bool EuroDates)
EncodeDateTime(struct tm *tm, fsec_t fsec, bool print_tz, int tz, const char *tzn, int style, char *str, bool EuroDates)
{
int day,
hour,
@ -953,10 +953,10 @@ EncodeDateTime(struct tm * tm, fsec_t fsec, bool print_tz, int tz, const char *t
}
return TRUE;
} /* EncodeDateTime() */
} /* EncodeDateTime() */
int
GetEpochTime(struct tm * tm)
GetEpochTime(struct tm *tm)
{
struct tm *t0;
time_t epoch = 0;
@ -976,10 +976,10 @@ GetEpochTime(struct tm * tm)
}
return -1;
} /* GetEpochTime() */
} /* GetEpochTime() */
static void
abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
abstime2tm(AbsoluteTime _time, int *tzp, struct tm *tm, char **tzn)
{
time_t time = (time_t) _time;
struct tm *tx;
@ -1064,7 +1064,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
}
void
GetCurrentDateTime(struct tm * tm)
GetCurrentDateTime(struct tm *tm)
{
int tz;
@ -1083,7 +1083,7 @@ dt2time(double jd, int *hour, int *min, int *sec, fsec_t *fsec)
time -= (*min) * USECS_PER_MINUTE;
*sec = time / USECS_PER_SEC;
*fsec = time - (*sec * USECS_PER_SEC);
} /* dt2time() */
} /* dt2time() */
@ -1094,7 +1094,7 @@ dt2time(double jd, int *hour, int *min, int *sec, fsec_t *fsec)
*/
static int
DecodeNumberField(int len, char *str, int fmask,
int *tmask, struct tm * tm, fsec_t *fsec, int *is2digits)
int *tmask, struct tm *tm, fsec_t *fsec, int *is2digits)
{
char *cp;
@ -1196,7 +1196,7 @@ DecodeNumberField(int len, char *str, int fmask,
}
return -1;
} /* DecodeNumberField() */
} /* DecodeNumberField() */
/* DecodeNumber()
@ -1204,7 +1204,7 @@ DecodeNumberField(int len, char *str, int fmask,
*/
static int
DecodeNumber(int flen, char *str, int fmask,
int *tmask, struct tm * tm, fsec_t *fsec, int *is2digits, bool EuroDates)
int *tmask, struct tm *tm, fsec_t *fsec, int *is2digits, bool EuroDates)
{
int val;
char *cp;
@ -1305,14 +1305,14 @@ DecodeNumber(int flen, char *str, int fmask,
return -1;
return 0;
} /* DecodeNumber() */
} /* DecodeNumber() */
/* DecodeDate()
* Decode date string which includes delimiters.
* Insist on a complete set of fields.
*/
static int
DecodeDate(char *str, int fmask, int *tmask, struct tm * tm, bool EuroDates)
DecodeDate(char *str, int fmask, int *tmask, struct tm *tm, bool EuroDates)
{
fsec_t fsec;
@ -1432,7 +1432,7 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm, bool EuroDates)
}
return 0;
} /* DecodeDate() */
} /* DecodeDate() */
/* DecodeTime()
@ -1441,7 +1441,7 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm, bool EuroDates)
* can be used to represent time spans.
*/
int
DecodeTime(char *str, int *tmask, struct tm * tm, fsec_t *fsec)
DecodeTime(char *str, int *tmask, struct tm *tm, fsec_t *fsec)
{
char *cp;
@ -1497,7 +1497,7 @@ DecodeTime(char *str, int *tmask, struct tm * tm, fsec_t *fsec)
return -1;
return 0;
} /* DecodeTime() */
} /* DecodeTime() */
/* DecodeTimezone()
* Interpret string as a numeric timezone.
@ -1541,7 +1541,7 @@ DecodeTimezone(char *str, int *tzp)
*tzp = -tz;
return *cp != '\0';
} /* DecodeTimezone() */
} /* DecodeTimezone() */
/* DecodePosixTimezone()
@ -1583,7 +1583,7 @@ DecodePosixTimezone(char *str, int *tzp)
}
return 0;
} /* DecodePosixTimezone() */
} /* DecodePosixTimezone() */
/* ParseDateTime()
* Break string into tokens based on a date/time context.
@ -1763,7 +1763,7 @@ ParseDateTime(char *timestr, char *lowstr,
*numfields = nf;
return 0;
} /* ParseDateTime() */
} /* ParseDateTime() */
/* DecodeDateTime()
@ -1788,7 +1788,7 @@ ParseDateTime(char *timestr, char *lowstr,
*/
int
DecodeDateTime(char **field, int *ftype, int nf,
int *dtype, struct tm * tm, fsec_t *fsec, bool EuroDates)
int *dtype, struct tm *tm, fsec_t *fsec, bool EuroDates)
{
int fmask = 0,
tmask,
@ -2351,7 +2351,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
}
return 0;
} /* DecodeDateTime() */
} /* DecodeDateTime() */
/* Function works as follows:
*
@ -2464,7 +2464,7 @@ find_end_token(char *str, char *fmt)
}
static int
pgtypes_defmt_scan(union un_fmt_comb * scan_val, int scan_type, char **pstr, char *pfmt)
pgtypes_defmt_scan(union un_fmt_comb *scan_val, int scan_type, char **pstr, char *pfmt)
{
/*
* scan everything between pstr and pstr_end. This is not including the

View File

@ -32,7 +32,7 @@ strtoint(const char *nptr, char **endptr, int base)
* and changesd struct pg_tm to struct tm
*/
static void
AdjustFractSeconds(double frac, struct /* pg_ */ tm * tm, fsec_t *fsec, int scale)
AdjustFractSeconds(double frac, struct /* pg_ */ tm *tm, fsec_t *fsec, int scale)
{
int sec;
@ -50,7 +50,7 @@ AdjustFractSeconds(double frac, struct /* pg_ */ tm * tm, fsec_t *fsec, int scal
* and changesd struct pg_tm to struct tm
*/
static void
AdjustFractDays(double frac, struct /* pg_ */ tm * tm, fsec_t *fsec, int scale)
AdjustFractDays(double frac, struct /* pg_ */ tm *tm, fsec_t *fsec, int scale)
{
int extra_days;
@ -103,7 +103,7 @@ ISO8601IntegerWidth(char *fieldstart)
* and changesd struct pg_tm to struct tm
*/
static inline void
ClearPgTm(struct /* pg_ */ tm * tm, fsec_t *fsec)
ClearPgTm(struct /* pg_ */ tm *tm, fsec_t *fsec)
{
tm->tm_year = 0;
tm->tm_mon = 0;
@ -122,7 +122,7 @@ ClearPgTm(struct /* pg_ */ tm * tm, fsec_t *fsec)
*/
static int
DecodeISO8601Interval(char *str,
int *dtype, struct /* pg_ */ tm * tm, fsec_t *fsec)
int *dtype, struct /* pg_ */ tm *tm, fsec_t *fsec)
{
bool datepart = true;
bool havefield = false;
@ -336,7 +336,7 @@ DecodeISO8601Interval(char *str,
*/
int
DecodeInterval(char **field, int *ftype, int nf, /* int range, */
int *dtype, struct /* pg_ */ tm * tm, fsec_t *fsec)
int *dtype, struct /* pg_ */ tm *tm, fsec_t *fsec)
{
int IntervalStyle = INTSTYLE_POSTGRES_VERBOSE;
int range = INTERVAL_FULL_RANGE;
@ -772,7 +772,7 @@ AppendSeconds(char *cp, int sec, fsec_t fsec, int precision, bool fillzeros)
*/
int
EncodeInterval(struct /* pg_ */ tm * tm, fsec_t fsec, int style, char *str)
EncodeInterval(struct /* pg_ */ tm *tm, fsec_t fsec, int style, char *str)
{
char *cp = str;
int year = tm->tm_year;
@ -949,14 +949,14 @@ EncodeInterval(struct /* pg_ */ tm * tm, fsec_t fsec, int style, char *str)
}
return 0;
} /* EncodeInterval() */
} /* EncodeInterval() */
/* interval2tm()
* Convert an interval data type to a tm structure.
*/
static int
interval2tm(interval span, struct tm * tm, fsec_t *fsec)
interval2tm(interval span, struct tm *tm, fsec_t *fsec)
{
int64 time;
@ -984,10 +984,10 @@ interval2tm(interval span, struct tm * tm, fsec_t *fsec)
*fsec = time - (tm->tm_sec * USECS_PER_SEC);
return 0;
} /* interval2tm() */
} /* interval2tm() */
static int
tm2interval(struct tm * tm, fsec_t fsec, interval * span)
tm2interval(struct tm *tm, fsec_t fsec, interval * span)
{
if ((double) tm->tm_year * MONTHS_PER_YEAR + tm->tm_mon > INT_MAX ||
(double) tm->tm_year * MONTHS_PER_YEAR + tm->tm_mon < INT_MIN)
@ -999,7 +999,7 @@ tm2interval(struct tm * tm, fsec_t fsec, interval * span)
tm->tm_sec) * USECS_PER_SEC) + fsec;
return 0;
} /* tm2interval() */
} /* tm2interval() */
interval *
PGTYPESinterval_new(void)

View File

@ -22,14 +22,14 @@ static int64
time2t(const int hour, const int min, const int sec, const fsec_t fsec)
{
return (((((hour * MINS_PER_HOUR) + min) * SECS_PER_MINUTE) + sec) * USECS_PER_SEC) + fsec;
} /* time2t() */
} /* time2t() */
static timestamp
dt2local(timestamp dt, int tz)
{
dt -= (tz * USECS_PER_SEC);
return dt;
} /* dt2local() */
} /* dt2local() */
/* tm2timestamp()
* Convert a tm structure to a timestamp data type.
@ -39,7 +39,7 @@ dt2local(timestamp dt, int tz)
* Returns -1 on failure (overflow).
*/
int
tm2timestamp(struct tm * tm, fsec_t fsec, int *tzp, timestamp * result)
tm2timestamp(struct tm *tm, fsec_t fsec, int *tzp, timestamp * result)
{
int dDate;
int64 time;
@ -67,7 +67,7 @@ tm2timestamp(struct tm * tm, fsec_t fsec, int *tzp, timestamp * result)
return -1;
return 0;
} /* tm2timestamp() */
} /* tm2timestamp() */
static timestamp
SetEpochTimestamp(void)
@ -82,7 +82,7 @@ SetEpochTimestamp(void)
tm2timestamp(tm, 0, NULL, &dt);
return dt;
} /* SetEpochTimestamp() */
} /* SetEpochTimestamp() */
/* timestamp2tm()
* Convert timestamp data type to POSIX time structure.
@ -96,7 +96,7 @@ SetEpochTimestamp(void)
* local time zone. If out of this range, leave as GMT. - tgl 97/05/27
*/
static int
timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, const char **tzn)
timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, const char **tzn)
{
int64 dDate,
date0;
@ -187,7 +187,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, const char **
tm->tm_yday = dDate - date2j(tm->tm_year, 1, 1) + 1;
return 0;
} /* timestamp2tm() */
} /* timestamp2tm() */
/* EncodeSpecialTimestamp()
* * Convert reserved timestamp data type to string.
@ -203,7 +203,7 @@ EncodeSpecialTimestamp(timestamp dt, char *str)
return FALSE;
return TRUE;
} /* EncodeSpecialTimestamp() */
} /* EncodeSpecialTimestamp() */
timestamp
PGTYPEStimestamp_from_asc(char *str, char **endptr)
@ -309,7 +309,7 @@ PGTYPEStimestamp_current(timestamp * ts)
}
static int
dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm *tm,
char *output, int *pstr_len, const char *fmtstr)
{
union un_fmt_comb replace_val;

View File

@ -94,7 +94,7 @@ extern struct variable *descriptor_variable(const char *name, int input);
extern struct variable *sqlda_variable(const char *name);
extern void add_variable_to_head(struct arguments **, struct variable *, struct variable *);
extern void add_variable_to_tail(struct arguments **, struct variable *, struct variable *);
extern void remove_variable_from_list(struct arguments ** list, struct variable * var);
extern void remove_variable_from_list(struct arguments **list, struct variable *var);
extern void dump_variables(struct arguments *, int);
extern struct typedefs *get_typedef(char *);
extern void adjust_array(enum ECPGttype, char **, char **, char *, char *, int, bool);

View File

@ -32,7 +32,7 @@ struct when when_error,
when_warn;
static void
print_action(struct when * w)
print_action(struct when *w)
{
switch (w->code)
{
@ -96,7 +96,7 @@ hashline_number(void)
)
{
/* "* 2" here is for escaping '\' and '"' below */
char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) *2);
char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) * 2);
char *src,
*dest;

View File

@ -34,7 +34,7 @@ mm_strdup(const char *string)
/* duplicate memberlist */
struct ECPGstruct_member *
ECPGstruct_member_dup(struct ECPGstruct_member * rm)
ECPGstruct_member_dup(struct ECPGstruct_member *rm)
{
struct ECPGstruct_member *new = NULL;
@ -74,7 +74,7 @@ ECPGstruct_member_dup(struct ECPGstruct_member * rm)
/* The NAME argument is copied. The type argument is preserved as a pointer. */
void
ECPGmake_struct_member(char *name, struct ECPGtype * type, struct ECPGstruct_member ** start)
ECPGmake_struct_member(char *name, struct ECPGtype *type, struct ECPGstruct_member **start)
{
struct ECPGstruct_member *ptr,
*ne =
@ -108,7 +108,7 @@ ECPGmake_simple_type(enum ECPGttype type, char *size, int counter)
}
struct ECPGtype *
ECPGmake_array_type(struct ECPGtype * type, char *size)
ECPGmake_array_type(struct ECPGtype *type, char *size)
{
struct ECPGtype *ne = ECPGmake_simple_type(ECPGt_array, size, 0);
@ -118,7 +118,7 @@ ECPGmake_array_type(struct ECPGtype * type, char *size)
}
struct ECPGtype *
ECPGmake_struct_type(struct ECPGstruct_member * rm, enum ECPGttype type, char *type_name, char *struct_sizeof)
ECPGmake_struct_type(struct ECPGstruct_member *rm, enum ECPGttype type, char *type_name, char *struct_sizeof)
{
struct ECPGtype *ne = ECPGmake_simple_type(type, mm_strdup("1"), 0);
@ -175,7 +175,7 @@ get_type(enum ECPGttype type)
break;
case ECPGt_varchar:
return ("ECPGt_varchar");
case ECPGt_NO_INDICATOR: /* no indicator */
case ECPGt_NO_INDICATOR: /* no indicator */
return ("ECPGt_NO_INDICATOR");
break;
case ECPGt_char_variable: /* string that should not be quoted */
@ -233,11 +233,11 @@ static void ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
char *varcharsize,
char *arrsize, const char *size, const char *prefix, int);
static void ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize,
struct ECPGtype * type, struct ECPGtype * ind_type, const char *prefix, const char *ind_prefix);
struct ECPGtype *type, struct ECPGtype *ind_type, const char *prefix, const char *ind_prefix);
void
ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, const int brace_level,
const char *ind_name, struct ECPGtype * ind_type, const int ind_brace_level,
ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype *type, const int brace_level,
const char *ind_name, struct ECPGtype *ind_type, const int ind_brace_level,
const char *prefix, const char *ind_prefix,
char *arr_str_size, const char *struct_sizeof,
const char *ind_struct_sizeof)
@ -569,7 +569,7 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
/* Penetrate a struct and dump the contents. */
static void
ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize, struct ECPGtype * type, struct ECPGtype * ind_type, const char *prefix, const char *ind_prefix)
ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize, struct ECPGtype *type, struct ECPGtype *ind_type, const char *prefix, const char *ind_prefix)
{
/*
* If offset is NULL, then this is the first recursive level. If not then
@ -617,7 +617,7 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize
}
void
ECPGfree_struct_member(struct ECPGstruct_member * rm)
ECPGfree_struct_member(struct ECPGstruct_member *rm)
{
while (rm)
{
@ -631,7 +631,7 @@ ECPGfree_struct_member(struct ECPGstruct_member * rm)
}
void
ECPGfree_type(struct ECPGtype * type)
ECPGfree_type(struct ECPGtype *type)
{
if (!IS_SIMPLE_TYPE(type->type))
{

View File

@ -7,7 +7,7 @@
static struct variable *allvariables = NULL;
struct variable *
new_variable(const char *name, struct ECPGtype * type, int brace_level)
new_variable(const char *name, struct ECPGtype *type, int brace_level)
{
struct variable *p = (struct variable *) mm_alloc(sizeof(struct variable));
@ -22,7 +22,7 @@ new_variable(const char *name, struct ECPGtype * type, int brace_level)
}
static struct variable *
find_struct_member(char *name, char *str, struct ECPGstruct_member * members, int brace_level)
find_struct_member(char *name, char *str, struct ECPGstruct_member *members, int brace_level)
{
char *next = strpbrk(++str, ".-["),
*end,
@ -376,7 +376,7 @@ reset_variables(void)
* Note: The list is dumped from the end,
* so we have to add new entries at the beginning */
void
add_variable_to_head(struct arguments ** list, struct variable * var, struct variable * ind)
add_variable_to_head(struct arguments **list, struct variable *var, struct variable *ind)
{
struct arguments *p = (struct arguments *) mm_alloc(sizeof(struct arguments));
@ -388,7 +388,7 @@ add_variable_to_head(struct arguments ** list, struct variable * var, struct var
/* Append a new variable to our request list. */
void
add_variable_to_tail(struct arguments ** list, struct variable * var, struct variable * ind)
add_variable_to_tail(struct arguments **list, struct variable *var, struct variable *ind)
{
struct arguments *p,
*new = (struct arguments *) mm_alloc(sizeof(struct arguments));
@ -406,7 +406,7 @@ add_variable_to_tail(struct arguments ** list, struct variable * var, struct var
}
void
remove_variable_from_list(struct arguments ** list, struct variable * var)
remove_variable_from_list(struct arguments **list, struct variable *var)
{
struct arguments *p,
*prev = NULL;
@ -435,7 +435,7 @@ remove_variable_from_list(struct arguments ** list, struct variable * var)
deletes the list as we go on.
*/
void
dump_variables(struct arguments * list, int mode)
dump_variables(struct arguments *list, int mode)
{
char *str_zero;
@ -464,7 +464,7 @@ dump_variables(struct arguments * list, int mode)
}
void
check_indicator(struct ECPGtype * var)
check_indicator(struct ECPGtype *var)
{
/* make sure this is a valid indicator variable */
switch (var->type)

View File

@ -29,7 +29,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -23,7 +23,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -62,7 +62,7 @@ typedef struct
} decimal;
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -36,7 +36,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -23,7 +23,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -25,7 +25,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -23,7 +23,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -24,7 +24,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -24,7 +24,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -77,7 +77,7 @@ enum
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -25,7 +25,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -84,7 +84,7 @@ typedef struct
} decimal;
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -46,7 +46,7 @@ main(void)
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -37,7 +37,7 @@
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -46,7 +46,7 @@ main(void)
#define SQLERRMC_LEN 150
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -1,5 +1,5 @@
exec sql define REGRESSDB1 ecpg1_regression;
exec sql define REGRESSDB2 ecpg2_regression;
exec sql define REGRESSDB1 ecpg1_regression;
exec sql define REGRESSDB2 ecpg2_regression;
exec sql define REGRESSUSER1 regress_ecpg_user1;
exec sql define REGRESSUSER2 regress_ecpg_user2;
exec sql define REGRESSUSER1 regress_ecpg_user1;
exec sql define REGRESSUSER2 regress_ecpg_user2;

View File

@ -349,8 +349,8 @@ static int uri_prefix_length(const char *connstr);
static bool recognized_connection_string(const char *connstr);
static PQconninfoOption *conninfo_parse(const char *conninfo,
PQExpBuffer errorMessage, bool use_defaults);
static PQconninfoOption *conninfo_array_parse(const char *const * keywords,
const char *const * values, PQExpBuffer errorMessage,
static PQconninfoOption *conninfo_array_parse(const char *const *keywords,
const char *const *values, PQExpBuffer errorMessage,
bool use_defaults, int expand_dbname);
static bool conninfo_add_defaults(PQconninfoOption *options,
PQExpBuffer errorMessage);
@ -507,8 +507,8 @@ pqDropConnection(PGconn *conn, bool flushInput)
* call succeeded.
*/
PGconn *
PQconnectdbParams(const char *const * keywords,
const char *const * values,
PQconnectdbParams(const char *const *keywords,
const char *const *values,
int expand_dbname)
{
PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
@ -526,8 +526,8 @@ PQconnectdbParams(const char *const * keywords,
* check server status, accepting parameters identical to PQconnectdbParams
*/
PGPing
PQpingParams(const char *const * keywords,
const char *const * values,
PQpingParams(const char *const *keywords,
const char *const *values,
int expand_dbname)
{
PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
@ -610,8 +610,8 @@ PQping(const char *conninfo)
* See PQconnectPoll for more info.
*/
PGconn *
PQconnectStartParams(const char *const * keywords,
const char *const * values,
PQconnectStartParams(const char *const *keywords,
const char *const *values,
int expand_dbname)
{
PGconn *conn;
@ -2280,7 +2280,7 @@ keep_going: /* We will come back to here until there is
/* Fill in the client address */
conn->laddr.salen = sizeof(conn->laddr.addr);
if (getsockname(conn->sock,
(struct sockaddr *) & conn->laddr.addr,
(struct sockaddr *) &conn->laddr.addr,
&conn->laddr.salen) < 0)
{
appendPQExpBuffer(&conn->errorMessage,
@ -3740,7 +3740,7 @@ internal_cancel(SockAddr *raddr, int be_pid, int be_key,
goto cancel_errReturn;
}
retry3:
if (connect(tmpsock, (struct sockaddr *) & raddr->addr,
if (connect(tmpsock, (struct sockaddr *) &raddr->addr,
raddr->salen) < 0)
{
if (SOCK_ERRNO == EINTR)
@ -4926,7 +4926,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage,
* a database, in-tree code first wraps the name in a connection string.
*/
static PQconninfoOption *
conninfo_array_parse(const char *const * keywords, const char *const * values,
conninfo_array_parse(const char *const *keywords, const char *const *values,
PQExpBuffer errorMessage, bool use_defaults,
int expand_dbname)
{

View File

@ -58,7 +58,7 @@ static int PQsendQueryGuts(PGconn *conn,
const char *stmtName,
int nParams,
const Oid *paramTypes,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat);
@ -940,7 +940,7 @@ pqSaveParameterStatus(PGconn *conn, const char *name, const char *value)
* Store new info as a single malloc block
*/
pstatus = (pgParameterStatus *) malloc(sizeof(pgParameterStatus) +
strlen(name) +strlen(value) + 2);
strlen(name) + strlen(value) + 2);
if (pstatus)
{
char *ptr;
@ -1184,7 +1184,7 @@ PQsendQueryParams(PGconn *conn,
const char *command,
int nParams,
const Oid *paramTypes,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat)
@ -1325,7 +1325,7 @@ int
PQsendQueryPrepared(PGconn *conn,
const char *stmtName,
int nParams,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat)
@ -1408,7 +1408,7 @@ PQsendQueryGuts(PGconn *conn,
const char *stmtName,
int nParams,
const Oid *paramTypes,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat)
@ -1861,7 +1861,7 @@ PQexecParams(PGconn *conn,
const char *command,
int nParams,
const Oid *paramTypes,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat)
@ -1907,7 +1907,7 @@ PGresult *
PQexecPrepared(PGconn *conn,
const char *stmtName,
int nParams,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat)

View File

@ -326,7 +326,7 @@ static void
do_field(const PQprintOpt *po, const PGresult *res,
const int i, const int j, const int fs_len,
char **fields,
const int nFields, char const ** fieldNames,
const int nFields, char const **fieldNames,
unsigned char *fieldNotNum, int *fieldMax,
const int fieldMaxLen, FILE *fout)
{

View File

@ -909,7 +909,7 @@ initialize_SSL(PGconn *conn)
!(conn->sslrootcert && strlen(conn->sslrootcert) > 0) ||
!(conn->sslcrl && strlen(conn->sslcrl) > 0))
have_homedir = pqGetHomeDirectory(homedir, sizeof(homedir));
else /* won't need it */
else /* won't need it */
have_homedir = false;
/*

View File

@ -19,7 +19,7 @@
#include "libpq-fe.h"
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif

View File

@ -16,7 +16,7 @@
#define LIBPQ_FE_H
#ifdef __cplusplus
extern "C"
extern "C"
{
#endif
@ -253,14 +253,14 @@ typedef struct pgresAttDesc
/* make a new client connection to the backend */
/* Asynchronous (non-blocking) */
extern PGconn *PQconnectStart(const char *conninfo);
extern PGconn *PQconnectStartParams(const char *const * keywords,
const char *const * values, int expand_dbname);
extern PGconn *PQconnectStartParams(const char *const *keywords,
const char *const *values, int expand_dbname);
extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
/* Synchronous (blocking) */
extern PGconn *PQconnectdb(const char *conninfo);
extern PGconn *PQconnectdbParams(const char *const * keywords,
const char *const * values, int expand_dbname);
extern PGconn *PQconnectdbParams(const char *const *keywords,
const char *const *values, int expand_dbname);
extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
const char *pgoptions, const char *pgtty,
const char *dbName,
@ -333,7 +333,7 @@ extern int PQsetClientEncoding(PGconn *conn, const char *encoding);
extern int PQsslInUse(PGconn *conn);
extern void *PQsslStruct(PGconn *conn, const char *struct_name);
extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name);
extern const char *const * PQsslAttributeNames(PGconn *conn);
extern const char *const *PQsslAttributeNames(PGconn *conn);
/* Get the OpenSSL structure associated with a connection. Returns NULL for
* unencrypted connections or if any other TLS library is in use. */
@ -383,7 +383,7 @@ extern PGresult *PQexecParams(PGconn *conn,
const char *command,
int nParams,
const Oid *paramTypes,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat);
@ -393,7 +393,7 @@ extern PGresult *PQprepare(PGconn *conn, const char *stmtName,
extern PGresult *PQexecPrepared(PGconn *conn,
const char *stmtName,
int nParams,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat);
@ -404,7 +404,7 @@ extern int PQsendQueryParams(PGconn *conn,
const char *command,
int nParams,
const Oid *paramTypes,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat);
@ -414,7 +414,7 @@ extern int PQsendPrepare(PGconn *conn, const char *stmtName,
extern int PQsendQueryPrepared(PGconn *conn,
const char *stmtName,
int nParams,
const char *const * paramValues,
const char *const *paramValues,
const int *paramLengths,
const int *paramFormats,
int resultFormat);
@ -445,8 +445,8 @@ extern int PQsetnonblocking(PGconn *conn, int arg);
extern int PQisnonblocking(const PGconn *conn);
extern int PQisthreadsafe(void);
extern PGPing PQping(const char *conninfo);
extern PGPing PQpingParams(const char *const * keywords,
const char *const * values, int expand_dbname);
extern PGPing PQpingParams(const char *const *keywords,
const char *const *values, int expand_dbname);
/* Force the write buffer to be written (or at least try) */
extern int PQflush(PGconn *conn);

View File

@ -44,7 +44,7 @@ static struct WSErrorEntry
{
DWORD error;
const char *description;
} WSErrors[] =
} WSErrors[] =
{
{
@ -236,7 +236,7 @@ struct MessageDLL
const char *dll_name;
void *handle;
int loaded; /* BOOL */
} dlls[] =
} dlls[] =
{
{