bl_relopt_tab[i + 1].optname = MemoryContextStrdup(TopMemoryContext,
buf);
bl_relopt_tab[i + 1].opttype = RELOPT_TYPE_INT;
- bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) +sizeof(int) * i;
+ bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) + sizeof(int) * i;
}
}
* Create a leaf-entry to store in the index, from a single Datum.
*/
static GBT_VARKEY *
-gbt_var_key_from_datum(const struct varlena * u)
+gbt_var_key_from_datum(const struct varlena *u)
{
int32 lowersize = VARSIZE(u);
GBT_VARKEY *r;
static void
dblink_get_conn(char *conname_or_str,
- PGconn *volatile * conn_p, char **conname_p, volatile bool *freeconn_p)
+ PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p)
{
remoteConn *rconn = getConnectionByName(conname_or_str);
PGconn *conn;
/* shouldn't happen */
elog(ERROR, "wrong number of arguments");
}
- else /* is_async */
+ else /* is_async */
{
/* get async result */
conname = text_to_cstring(PG_GETARG_TEXT_PP(0));
/*-- Allocate memory for our phoned_phrase --*/
if (max_phonemes == 0)
{ /* Assume largest possible */
- *phoned_word = palloc(sizeof(char) * strlen(word) +1);
+ *phoned_word = palloc(sizeof(char) * strlen(word) + 1);
}
else
{
End_Phoned_Word;
return (META_SUCCESS);
-} /* END metaphone */
+} /* END metaphone */
/*
case RTOldContainsStrategyNumber:
if (*nentries > 0)
*searchMode = GIN_SEARCH_MODE_DEFAULT;
- else /* everything contains the empty set */
+ else /* everything contains the empty set */
*searchMode = GIN_SEARCH_MODE_ALL;
break;
default:
{
bool muse;
uint32 high_pos;
-} SomeStack =
+} SomeStack =
{
false, 0,
/* function to parse command line options and check for some usage errors. */
void
-get_opts(int argc, char **argv, struct options * my_opts)
+get_opts(int argc, char **argv, struct options *my_opts)
{
int c;
const char *progname;
/* establish connection with database. */
PGconn *
-sql_conn(struct options * my_opts)
+sql_conn(struct options *my_opts)
{
PGconn *conn;
bool have_password = false;
* Dump all databases. There are no system objects to worry about.
*/
void
-sql_exec_dumpalldbs(PGconn *conn, struct options * opts)
+sql_exec_dumpalldbs(PGconn *conn, struct options *opts)
{
char todo[1024];
* Dump all tables, indexes and sequences in the current database.
*/
void
-sql_exec_dumpalltables(PGconn *conn, struct options * opts)
+sql_exec_dumpalltables(PGconn *conn, struct options *opts)
{
char todo[1024];
char *addfields = ",c.oid AS \"Oid\", nspname AS \"Schema\", spcname as \"Tablespace\" ";
* given objects in the current database.
*/
void
-sql_exec_searchtables(PGconn *conn, struct options * opts)
+sql_exec_searchtables(PGconn *conn, struct options *opts)
{
char *todo;
char *qualifiers,
CppAsString2(RELKIND_SEQUENCE) ","
CppAsString2(RELKIND_TOASTVALUE) ") AND\n"
" t.oid = CASE\n"
- " WHEN reltablespace <> 0 THEN reltablespace\n"
+ " WHEN reltablespace <> 0 THEN reltablespace\n"
" ELSE dattablespace\n"
" END AND\n"
" (%s)\n"
}
void
-sql_exec_dumpalltbspc(PGconn *conn, struct options * opts)
+sql_exec_dumpalltbspc(PGconn *conn, struct options *opts)
{
char todo[1024];
PGSS_TRACK_NONE, /* track no statements */
PGSS_TRACK_TOP, /* only top level statements */
PGSS_TRACK_ALL /* all statements, including nested ones */
-} PGSSTrackLevel;
+} PGSSTrackLevel;
static const struct config_enum_entry track_options[] =
{
protect_out_of_mem(slen);
- trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) *3);
+ trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) * 3);
trg->flag = ARRKEY;
len = generate_trgm_only(GETARR(trg), str, slen);
protect_out_of_mem(slen1 + slen2);
/* Make positional trigrams */
- trg1 = (trgm *) palloc(sizeof(trgm) * (slen1 / 2 + 1) *3);
- trg2 = (trgm *) palloc(sizeof(trgm) * (slen2 / 2 + 1) *3);
+ trg1 = (trgm *) palloc(sizeof(trgm) * (slen1 / 2 + 1) * 3);
+ trg2 = (trgm *) palloc(sizeof(trgm) * (slen2 / 2 + 1) * 3);
len1 = generate_trgm_only(trg1, str1, slen1);
len2 = generate_trgm_only(trg2, str2, slen2);
protect_out_of_mem(slen);
- trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) *3);
+ trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) * 3);
trg->flag = ARRKEY;
SET_VARSIZE(trg, TRGMHDRSIZE);
check_relation_relkind(rel);
nblocks = RelationGetNumberOfBlocks(rel);
- info = palloc0(offsetof(vbits, bits) +nblocks);
+ info = palloc0(offsetof(vbits, bits) + nblocks);
info->next = 0;
info->count = nblocks;
CHECK(a != NULL && c != NULL);
/* Get a temporary buffer big enough to hold the result */
- osize = (mp_size) 4 *((MP_USED(a) + 1) / 2);
+ osize = (mp_size) 4 * ((MP_USED(a) + 1) / 2);
if (a == c)
{
CLEANUP:
mp_int_clear(&v);
-V: mp_int_clear(&u);
-U: mp_int_clear(&t);
+V: mp_int_clear(&u);
+U: mp_int_clear(&t);
return res;
}
double raw;
bits = mp_int_count_bits(z);
- raw = (double) bits *s_log2[r];
+ raw = (double) bits * s_log2[r];
return (int) (raw + 0.999999);
}
mp_size used;
mp_sign sign;
} mpz_t ,
+
*mp_int;
#define MP_DIGITS(Z) ((Z)->digits)
mp_result mp_int_mul_pow2(mp_int a, int p2, mp_int c);
mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */
-mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */
+mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */
mp_int q, mp_int r); /* r = a % b */
-mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */
+mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */
mp_int q, int *r); /* r = a % value */
mp_result mp_int_div_pow2(mp_int a, int p2, /* q = a / 2^p2 */
mp_int q, mp_int r); /* r = q % 2^p2 */
}
static int
-rj_real_init(struct int_ctx * cx, int dir)
+rj_real_init(struct int_ctx *cx, int dir)
{
aes_set_key(&cx->ctx.rj, cx->keybuf, cx->keylen * 8, dir);
return 0;
* copied (in-place) returns 0 on error
*/
int (*push) (PushFilter *next, void *priv,
- const uint8 *src, int len);
+ const uint8 *src, int len);
int (*flush) (PushFilter *next, void *priv);
void (*free) (void *priv);
};
* use buf as work area if NULL in-place copy
*/
int (*pull) (void *priv, PullFilter *src, int len,
- uint8 **data_p, uint8 *buf, int buflen);
+ uint8 **data_p, uint8 *buf, int buflen);
void (*free) (void *priv);
};
}
static int
-mdcbuf_finish(struct MDCBufData * st)
+mdcbuf_finish(struct MDCBufData *st)
{
uint8 hash[20];
int res;
}
static void
-mdcbuf_load_data(struct MDCBufData * st, uint8 *src, int len)
+mdcbuf_load_data(struct MDCBufData *st, uint8 *src, int len)
{
uint8 *dst = st->pos + st->avail;
}
static void
-mdcbuf_load_mdc(struct MDCBufData * st, uint8 *src, int len)
+mdcbuf_load_mdc(struct MDCBufData *st, uint8 *src, int len)
{
memmove(st->mdc_buf + st->mdc_avail, src, len);
st->mdc_avail += len;
}
static int
-mdcbuf_refill(struct MDCBufData * st, PullFilter *src)
+mdcbuf_refill(struct MDCBufData *st, PullFilter *src)
{
uint8 *data;
int res;
};
static void
-fill_expect(struct debug_expect * ex, int text_mode)
+fill_expect(struct debug_expect *ex, int text_mode)
{
ex->debug = 0;
ex->expect = 0;
} while (0)
static void
-check_expect(PGP_Context *ctx, struct debug_expect * ex)
+check_expect(PGP_Context *ctx, struct debug_expect *ex)
{
EX_CHECK(cipher_algo);
EX_CHECK(s2k_mode);
static int
set_arg(PGP_Context *ctx, char *key, char *val,
- struct debug_expect * ex)
+ struct debug_expect *ex)
{
int res = 0;
static int
parse_args(PGP_Context *ctx, uint8 *args, int arg_len,
- struct debug_expect * ex)
+ struct debug_expect *ex)
{
char *str = downcase_convert(args, arg_len);
char *key,
static void
init_work(PGP_Context **ctx_p, int is_text,
- text *args, struct debug_expect * ex)
+ text *args, struct debug_expect *ex)
{
int err = pgp_init(ctx_p);
char *id;
unsigned id_len;
char *(*crypt) (const char *psw, const char *salt,
- char *buf, unsigned len);
+ char *buf, unsigned len);
};
static const struct px_crypt_algo
{
char *name;
char *(*gen) (unsigned long count, const char *input, int size,
- char *output, int output_size);
+ char *output, int output_size);
int input_len;
int def_rounds;
int min_rounds;
struct px_combo
{
int (*init) (PX_Combo *cx, const uint8 *key, unsigned klen,
- const uint8 *iv, unsigned ivlen);
+ const uint8 *iv, unsigned ivlen);
int (*encrypt) (PX_Combo *cx, const uint8 *data, unsigned dlen,
- uint8 *res, unsigned *rlen);
+ uint8 *res, unsigned *rlen);
int (*decrypt) (PX_Combo *cx, const uint8 *data, unsigned dlen,
- uint8 *res, unsigned *rlen);
+ uint8 *res, unsigned *rlen);
unsigned (*encrypt_len) (PX_Combo *cx, unsigned dlen);
unsigned (*decrypt_len) (PX_Combo *cx, unsigned dlen);
void (*free) (PX_Combo *cx);
/* These are all based on 32 bit unsigned values and will therefore */
/* require endian conversions for big-endian architectures */
-rijndael_ctx *
- rijndael_set_key(rijndael_ctx *, const u4byte *, const u4byte, int);
+rijndael_ctx *rijndael_set_key(rijndael_ctx *, const u4byte *, const u4byte, int);
void rijndael_encrypt(rijndael_ctx *, const u4byte *, u4byte *);
void rijndael_decrypt(rijndael_ctx *, const u4byte *, u4byte *);
static void sha1_step(struct sha1_ctxt *);
static void
-sha1_step(struct sha1_ctxt * ctxt)
+sha1_step(struct sha1_ctxt *ctxt)
{
uint32 a,
b,
/*------------------------------------------------------------*/
void
-sha1_init(struct sha1_ctxt * ctxt)
+sha1_init(struct sha1_ctxt *ctxt)
{
memset(ctxt, 0, sizeof(struct sha1_ctxt));
H(0) = 0x67452301;
}
void
-sha1_pad(struct sha1_ctxt * ctxt)
+sha1_pad(struct sha1_ctxt *ctxt)
{
size_t padlen; /* pad length in bytes */
size_t padstart;
}
void
-sha1_loop(struct sha1_ctxt * ctxt, const uint8 *input0, size_t len)
+sha1_loop(struct sha1_ctxt *ctxt, const uint8 *input0, size_t len)
{
const uint8 *input;
size_t gaplen;
}
void
-sha1_result(struct sha1_ctxt * ctxt, uint8 *digest0)
+sha1_result(struct sha1_ctxt *ctxt, uint8 *digest0)
{
uint8 *digest;
UnlockReleaseBuffer(buf);
}
- stat->table_len = (uint64) nblocks *BLCKSZ;
+ stat->table_len = (uint64) nblocks * BLCKSZ;
stat->tuple_count = vac_estimate_reltuples(rel, false, nblocks, scanned,
stat->tuple_count + misc_count);
} pgstattuple_type;
typedef void (*pgstat_page) (pgstattuple_type *, Relation, BlockNumber,
- BufferAccessStrategy);
+ BufferAccessStrategy);
static Datum build_pgstattuple_type(pgstattuple_type *stat,
FunctionCallInfo fcinfo);
heap_endscan(scan);
relation_close(rel, AccessShareLock);
- stat.table_len = (uint64) nblocks *BLCKSZ;
+ stat.table_len = (uint64) nblocks * BLCKSZ;
return build_pgstattuple_type(&stat, fcinfo);
}
/* Quit if we've scanned the whole relation */
if (blkno >= nblocks)
{
- stat.table_len = (uint64) nblocks *BLCKSZ;
+ stat.table_len = (uint64) nblocks * BLCKSZ;
break;
}
* command. Elsewhere (including the case of default) NULL.
*/
const char *createdb_dtemplate;
-} sepgsql_context_info_t;
+} sepgsql_context_info_t;
static sepgsql_context_info_t sepgsql_context_info;
{
SubTransactionId subid;
char *label;
-} pending_label;
+} pending_label;
/*
* sepgsql_get_client_label
* catalog OID.
*/
static void
-exec_object_restorecon(struct selabel_handle * sehnd, Oid catalogId)
+exec_object_restorecon(struct selabel_handle *sehnd, Oid catalogId)
{
Relation rel;
SysScanDesc sscan;
const char *av_name;
uint32 av_code;
} av[32];
-} selinux_catalog[] =
+} selinux_catalog[] =
{
{
sepgsql_compute_avd(const char *scontext,
const char *tcontext,
uint16 tclass,
- struct av_decision * avd)
+ struct av_decision *avd)
{
const char *tclass_name;
security_class_t tclass_ex;
extern void sepgsql_compute_avd(const char *scontext,
const char *tcontext,
uint16 tclass,
- struct av_decision * avd);
+ struct av_decision *avd);
extern char *sepgsql_compute_create(const char *scontext,
const char *tcontext,
/* true, if tcontext is valid */
char *ncontext; /* temporary scontext on execution of trusted
* procedure, or NULL elsewhere */
-} avc_cache;
+} avc_cache;
/*
* Declaration of static variables
s = rname = DatumGetCString(DirectFunctionCall1(nameout, NameGetDatum(relname)));
if (s)
{
- pp = malloc(offsetof(TTOffList, name) +strlen(rname) + 1);
+ pp = malloc(offsetof(TTOffList, name) + strlen(rname) + 1);
if (pp)
{
pp->next = NULL;
switch (v)
{
- case 0: /* constant-value uuids */
+ case 0: /* constant-value uuids */
strlcpy(strbuf, ptr, 37);
break;
- case 1: /* time/node-based uuids */
+ case 1: /* time/node-based uuids */
{
#ifdef HAVE_UUID_E2FS
uuid_t uu;
break;
}
- case 3: /* namespace-based MD5 uuids */
- case 5: /* namespace-based SHA1 uuids */
+ case 3: /* namespace-based MD5 uuids */
+ case 5: /* namespace-based SHA1 uuids */
{
dce_uuid_t uu;
#ifdef HAVE_UUID_BSD
break;
}
- case 4: /* random uuid */
+ case 4: /* random uuid */
default:
{
#ifdef HAVE_UUID_E2FS
long transaction_limit;
};
-static int vacuumlo(const char *database, const struct _param * param);
+static int vacuumlo(const char *database, const struct _param *param);
static void usage(const char *progname);
* This vacuums LOs of one database. It returns 0 on success, -1 on failure.
*/
static int
-vacuumlo(const char *database, const struct _param * param)
+vacuumlo(const char *database, const struct _param *param)
{
PGconn *conn;
PGresult *res,
/* Parse the document */
if (xmldoc)
doctree = xmlParseMemory(xmldoc, strlen(xmldoc));
- else /* treat NULL as not well-formed */
+ else /* treat NULL as not well-formed */
doctree = NULL;
if (doctree == NULL)
static const relopt_parse_elt tab[] = {
{"fillfactor", RELOPT_TYPE_INT, offsetof(StdRdOptions, fillfactor)},
{"autovacuum_enabled", RELOPT_TYPE_BOOL,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, enabled)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, enabled)},
{"autovacuum_vacuum_threshold", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, vacuum_threshold)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_threshold)},
{"autovacuum_analyze_threshold", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, analyze_threshold)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, analyze_threshold)},
{"autovacuum_vacuum_cost_delay", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, vacuum_cost_delay)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_cost_delay)},
{"autovacuum_vacuum_cost_limit", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, vacuum_cost_limit)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_cost_limit)},
{"autovacuum_freeze_min_age", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, freeze_min_age)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, freeze_min_age)},
{"autovacuum_freeze_max_age", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, freeze_max_age)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, freeze_max_age)},
{"autovacuum_freeze_table_age", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, freeze_table_age)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, freeze_table_age)},
{"autovacuum_multixact_freeze_min_age", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, multixact_freeze_min_age)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, multixact_freeze_min_age)},
{"autovacuum_multixact_freeze_max_age", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, multixact_freeze_max_age)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, multixact_freeze_max_age)},
{"autovacuum_multixact_freeze_table_age", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, multixact_freeze_table_age)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, multixact_freeze_table_age)},
{"log_autovacuum_min_duration", RELOPT_TYPE_INT,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, log_min_duration)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, log_min_duration)},
{"autovacuum_vacuum_scale_factor", RELOPT_TYPE_REAL,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, vacuum_scale_factor)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, vacuum_scale_factor)},
{"autovacuum_analyze_scale_factor", RELOPT_TYPE_REAL,
- offsetof(StdRdOptions, autovacuum) +offsetof(AutoVacOpts, analyze_scale_factor)},
+ offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, analyze_scale_factor)},
{"user_catalog_table", RELOPT_TYPE_BOOL,
offsetof(StdRdOptions, user_catalog_table)},
{"parallel_workers", RELOPT_TYPE_INT,
case GinContainsStrategy:
if (nelems > 0)
*searchMode = GIN_SEARCH_MODE_DEFAULT;
- else /* everything contains the empty set */
+ else /* everything contains the empty set */
*searchMode = GIN_SEARCH_MODE_ALL;
break;
case GinContainedStrategy:
if (offset != maxoff + 1)
memmove(ptr + sizeof(PostingItem),
ptr,
- (maxoff - offset + 1) *sizeof(PostingItem));
+ (maxoff - offset + 1) * sizeof(PostingItem));
}
memcpy(ptr, data, sizeof(PostingItem));
{
BlockNumber blkno;
Buffer buf;
- Bucket new_bucket PG_USED_FOR_ASSERTS_ONLY = InvalidBucket;
+ Bucket new_bucket PG_USED_FOR_ASSERTS_ONLY = InvalidBucket;
bool bucket_dirty = false;
blkno = bucket_blkno;
HashPageOpaque ovflopaque;
uint32 *num_bucket;
char *data;
- Size datalen PG_USED_FOR_ASSERTS_ONLY;
+ Size datalen PG_USED_FOR_ASSERTS_ONLY;
bool new_bmpage = false;
XLogRecGetBlockTag(record, 0, NULL, NULL, &rightblk);
Buffer oldbuf;
Buffer newbuf;
Buffer metabuf;
- Size datalen PG_USED_FOR_ASSERTS_ONLY;
+ Size datalen PG_USED_FOR_ASSERTS_ONLY;
char *data;
XLogRedoAction action;
uint32 ovflbitno;
int32 bitmappage,
bitmapbit;
- Bucket bucket PG_USED_FOR_ASSERTS_ONLY;
+ Bucket bucket PG_USED_FOR_ASSERTS_ONLY;
Buffer prevbuf = InvalidBuffer;
Buffer nextbuf = InvalidBuffer;
bool update_metap = false;
bool rs_logical_rewrite; /* do we need to do logical rewriting */
TransactionId rs_oldest_xmin; /* oldest xmin used by caller to
* determine tuple visibility */
- TransactionId rs_freeze_xid;/* Xid that will be used as freeze cutoff
- * point */
+ TransactionId rs_freeze_xid; /* Xid that will be used as freeze cutoff
+ * point */
TransactionId rs_logical_xmin; /* Xid that will be used as cutoff
* point for logical rewrites */
- MultiXactId rs_cutoff_multi;/* MultiXactId that will be used as cutoff
- * point for multixacts */
+ MultiXactId rs_cutoff_multi; /* MultiXactId that will be used as cutoff
+ * point for multixacts */
MemoryContext rs_cxt; /* for hash tables and entries and tuples in
* them */
XLogRecPtr rs_begin_lsn; /* XLogInsertLsn when starting the rewrite */
HTAB *rs_old_new_tid_map; /* unmatched B tuples */
HTAB *rs_logical_mappings; /* logical remapping files */
uint32 rs_num_rewrite_mappings; /* # in memory mappings */
-} RewriteStateData;
+} RewriteStateData;
/*
* The lookup keys for the hash tables are tuple TID and xmin (we must check
static void toast_delete_datum(Relation rel, Datum value, bool is_speculative);
static Datum toast_save_datum(Relation rel, Datum value,
- struct varlena * oldexternal, int options);
+ struct varlena *oldexternal, int options);
static bool toastrel_valueid_exists(Relation toastrel, Oid valueid);
static bool toastid_valueid_exists(Oid toastrelid, Oid valueid);
-static struct varlena *toast_fetch_datum(struct varlena * attr);
-static struct varlena *toast_fetch_datum_slice(struct varlena * attr,
+static struct varlena *toast_fetch_datum(struct varlena *attr);
+static struct varlena *toast_fetch_datum_slice(struct varlena *attr,
int32 sliceoffset, int32 length);
-static struct varlena *toast_decompress_datum(struct varlena * attr);
+static struct varlena *toast_decompress_datum(struct varlena *attr);
static int toast_open_indexes(Relation toastrel,
LOCKMODE lock,
Relation **toastidxs,
* ----------
*/
struct varlena *
-heap_tuple_fetch_attr(struct varlena * attr)
+heap_tuple_fetch_attr(struct varlena *attr)
{
struct varlena *result;
* ----------
*/
struct varlena *
-heap_tuple_untoast_attr(struct varlena * attr)
+heap_tuple_untoast_attr(struct varlena *attr)
{
if (VARATT_IS_EXTERNAL_ONDISK(attr))
{
* ----------
*/
struct varlena *
-heap_tuple_untoast_attr_slice(struct varlena * attr,
+heap_tuple_untoast_attr_slice(struct varlena *attr,
int32 sliceoffset, int32 slicelength)
{
struct varlena *preslice;
*/
static Datum
toast_save_datum(Relation rel, Datum value,
- struct varlena * oldexternal, int options)
+ struct varlena *oldexternal, int options)
{
Relation toastrel;
Relation *toastidxs;
* ----------
*/
static struct varlena *
-toast_fetch_datum(struct varlena * attr)
+toast_fetch_datum(struct varlena *attr)
{
Relation toastrel;
Relation *toastidxs;
* ----------
*/
static struct varlena *
-toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length)
+toast_fetch_datum_slice(struct varlena *attr, int32 sliceoffset, int32 length)
{
Relation toastrel;
Relation *toastidxs;
* Decompress a compressed version of a varlena datum
*/
static struct varlena *
-toast_decompress_datum(struct varlena * attr)
+toast_decompress_datum(struct varlena *attr)
{
struct varlena *result;
typedef struct BTParallelScanDescData
{
BlockNumber btps_scanPage; /* latest or next page to be scanned */
- BTPS_State btps_pageStatus;/* indicates whether next page is available
- * for scan. see above for possible states of
- * parallel scan. */
+ BTPS_State btps_pageStatus; /* indicates whether next page is
+ * available for scan. see above for
+ * possible states of parallel scan. */
int btps_arrayKeyCount; /* count indicating number of array
* scan keys processed by parallel
* scan */
slock_t btps_mutex; /* protects above variables */
ConditionVariable btps_cv; /* used to synchronize parallel scan */
-} BTParallelScanDescData;
+} BTParallelScanDescData;
typedef struct BTParallelScanDescData *BTParallelScanDesc;
/* we will delete the tuple altogether, so count full space */
spaceToDelete += it->size + sizeof(ItemIdData);
}
- else /* tuples on root should be live */
+ else /* tuples on root should be live */
elog(ERROR, "unexpected SPGiST tuple state: %d", it->tupstate);
}
}
goto process_inner_tuple;
}
}
- else /* non-leaf page */
+ else /* non-leaf page */
{
/*
* Apply the opclass choose function to figure out how to insert
typedef void (*storeRes_func) (SpGistScanOpaque so, ItemPointer heapPtr,
- Datum leafValue, bool isnull, bool recheck);
+ Datum leafValue, bool isnull, bool recheck);
typedef struct ScanStackEntry
{
}
}
}
- else /* page is inner */
+ else /* page is inner */
{
SpGistInnerTuple innerTuple;
spgInnerConsistentIn in;
{
const char *fn_name;
parallel_worker_main_type fn_addr;
-} InternalParallelWorkers[] =
+} InternalParallelWorkers[] =
{
{
/* indeed, the I/O must have failed */
if (shared->page_status[slotno] == SLRU_PAGE_READ_IN_PROGRESS)
shared->page_status[slotno] = SLRU_PAGE_EMPTY;
- else /* write_in_progress */
+ else /* write_in_progress */
{
shared->page_status[slotno] = SLRU_PAGE_VALID;
shared->page_dirty[slotno] = true;
bool ondisk; /* TRUE if prepare state file is on disk */
bool inredo; /* TRUE if entry was added via xlog_redo */
char gid[GIDSIZE]; /* The GID assigned to the prepared xact */
-} GlobalTransactionData;
+} GlobalTransactionData;
/*
* Two Phase Commit shared state. Access to this struct is protected
uint32 num_chunks;
uint32 bytes_free; /* free bytes left in tail block */
uint32 total_len; /* total data bytes in chain */
-} records;
+} records;
/*
/* WAL insertion locks. Ensure they're aligned to the full padded size */
allocptr += sizeof(WALInsertLockPadded) -
- ((uintptr_t) allocptr) %sizeof(WALInsertLockPadded);
+ ((uintptr_t) allocptr) % sizeof(WALInsertLockPadded);
WALInsertLocks = XLogCtl->Insert.WALInsertLocks =
(WALInsertLockPadded *) allocptr;
allocptr += sizeof(WALInsertLockPadded) * NUM_XLOGINSERT_LOCKS;
*/
longest_secs = (long) (CheckpointStats.ckpt_longest_sync / 1000000);
longest_usecs = CheckpointStats.ckpt_longest_sync -
- (uint64) longest_secs *1000000;
+ (uint64) longest_secs * 1000000;
average_sync_time = 0;
if (CheckpointStats.ckpt_sync_rels > 0)
average_sync_time = CheckpointStats.ckpt_agg_sync_time /
CheckpointStats.ckpt_sync_rels;
average_secs = (long) (average_sync_time / 1000000);
- average_usecs = average_sync_time - (uint64) average_secs *1000000;
+ average_usecs = average_sync_time - (uint64) average_secs * 1000000;
elog(LOG, "%s complete: wrote %d buffers (%.1f%%); "
"%d WAL file(s) added, %d removed, %d recycled; "
(XLogPageReadPrivate *) xlogreader->private_data;
int emode = private->emode;
uint32 targetPageOff;
- XLogSegNo targetSegNo PG_USED_FOR_ASSERTS_ONLY;
+ XLogSegNo targetSegNo PG_USED_FOR_ASSERTS_ONLY;
XLByteToSeg(targetPagePtr, targetSegNo);
targetPageOff = targetPagePtr % XLogSegSize;
if (rd_rel->relkind != RELKIND_INDEX)
visibilitymap_count(rel, &relallvisible, NULL);
- else /* don't bother for indexes */
+ else /* don't bother for indexes */
relallvisible = 0;
if (rd_rel->relpages != (int32) relpages)
int ndatums; /* Length of the datums following array */
Datum **datums; /* Array of datum-tuples with key->partnatts
* datums each */
- RangeDatumContent **content;/* what's contained in each range bound datum?
- * (see the above enum); NULL for list
- * partitioned tables */
+ RangeDatumContent **content; /* what's contained in each range bound
+ * datum? (see the above enum); NULL for
+ * list partitioned tables */
int *indexes; /* Partition indexes; one entry per member of
* the datums array (plus one if range
* partitioned table) */
if (slot == NULL) /* "do nothing" */
skip_tuple = true;
- else /* trigger might have changed tuple */
+ else /* trigger might have changed tuple */
tuple = ExecMaterializeSlot(slot);
}
char *name; /* name of the extension */
char *directory; /* directory for script files */
char *default_version; /* default install target version, if any */
- char *module_pathname; /* string to substitute for MODULE_PATHNAME */
+ char *module_pathname; /* string to substitute for
+ * MODULE_PATHNAME */
char *comment; /* comment, if any */
char *schema; /* target schema (allowed if !relocatable) */
bool relocatable; /* is ALTER EXTENSION SET SCHEMA supported? */
if (valuestr)
a = GUCArrayAdd(a, sstmt->name, valuestr);
- else /* RESET */
+ else /* RESET */
a = GUCArrayDelete(a, sstmt->name);
}
}
PublicationAddTables(pubid, rels, false, stmt);
else if (stmt->tableAction == DEFELEM_DROP)
PublicationDropTables(pubid, rels, false);
- else /* DEFELEM_SET */
+ else /* DEFELEM_SET */
{
List *oldrelids = GetPublicationRelations(pubid);
List *delrels = NIL;
* might miss data added to the new toast table by concurrent
* insert transactions.
*/
- case AT_SetStorage:/* may add toast tables, see
+ case AT_SetStorage: /* may add toast tables, see
* ATRewriteCatalogs() */
cmd_lockmode = AccessExclusiveLock;
break;
* optimised assuming the constraint holds true.
*/
case AT_DropConstraint: /* as DROP INDEX */
- case AT_DropNotNull: /* may change some SQL plans */
+ case AT_DropNotNull: /* may change some SQL plans */
cmd_lockmode = AccessExclusiveLock;
break;
/*
* Subcommands that may be visible to concurrent SELECTs
*/
- case AT_DropColumn: /* change visible to SELECT */
+ case AT_DropColumn: /* change visible to SELECT */
case AT_AddColumnToView: /* CREATE VIEW */
case AT_DropOids: /* calls AT_DropColumn */
case AT_EnableAlwaysRule: /* may change SELECT rules */
case AT_EnableReplicaRule: /* may change SELECT rules */
- case AT_EnableRule: /* may change SELECT rules */
- case AT_DisableRule: /* may change SELECT rules */
+ case AT_EnableRule: /* may change SELECT rules */
+ case AT_DisableRule: /* may change SELECT rules */
cmd_lockmode = AccessExclusiveLock;
break;
/*
* Changing owner may remove implicit SELECT privileges
*/
- case AT_ChangeOwner: /* change visible to SELECT */
+ case AT_ChangeOwner: /* change visible to SELECT */
cmd_lockmode = AccessExclusiveLock;
break;
*/
case AT_SetStatistics: /* Uses MVCC in getTableAttrs() */
case AT_ClusterOn: /* Uses MVCC in getIndexes() */
- case AT_DropCluster: /* Uses MVCC in getIndexes() */
- case AT_SetOptions: /* Uses MVCC in getTableAttrs() */
+ case AT_DropCluster: /* Uses MVCC in getIndexes() */
+ case AT_SetOptions: /* Uses MVCC in getTableAttrs() */
case AT_ResetOptions: /* Uses MVCC in getTableAttrs() */
cmd_lockmode = ShareUpdateExclusiveLock;
break;
cmd_lockmode = AccessExclusiveLock;
break;
- case AT_ValidateConstraint: /* Uses MVCC in
- * getConstraints() */
+ case AT_ValidateConstraint: /* Uses MVCC in getConstraints() */
cmd_lockmode = ShareUpdateExclusiveLock;
break;
/* Recursion occurs during execution phase */
pass = AT_PASS_ADD_COL;
break;
- case AT_AddColumnToView: /* add column via CREATE OR REPLACE
- * VIEW */
+ case AT_AddColumnToView: /* add column via CREATE OR REPLACE VIEW */
ATSimplePermissions(rel, ATT_VIEW);
ATPrepAddColumn(wqueue, rel, recurse, recursing, true, cmd,
lockmode);
/* No command-specific prep needed */
pass = AT_PASS_ADD_CONSTR;
break;
- case AT_DropConstraint: /* DROP CONSTRAINT */
+ case AT_DropConstraint: /* DROP CONSTRAINT */
ATSimplePermissions(rel, ATT_TABLE | ATT_FOREIGN_TABLE);
/* Recursion occurs during execution phase */
/* No command-specific prep needed except saving recurse flag */
cmd->subtype = AT_DropConstraintRecurse;
pass = AT_PASS_DROP;
break;
- case AT_AlterColumnType: /* ALTER COLUMN TYPE */
+ case AT_AlterColumnType: /* ALTER COLUMN TYPE */
ATSimplePermissions(rel,
ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE);
/* Performs own recursion */
pass = AT_PASS_MISC; /* doesn't actually matter */
break;
case AT_SetRelOptions: /* SET (...) */
- case AT_ResetRelOptions: /* RESET (...) */
+ case AT_ResetRelOptions: /* RESET (...) */
case AT_ReplaceRelOptions: /* reset them all, then set just these */
ATSimplePermissions(rel, ATT_TABLE | ATT_VIEW | ATT_MATVIEW | ATT_INDEX);
/* This command never recurses */
/* No command-specific prep needed */
pass = AT_PASS_MISC;
break;
- case AT_AlterConstraint: /* ALTER CONSTRAINT */
+ case AT_AlterConstraint: /* ALTER CONSTRAINT */
ATSimplePermissions(rel, ATT_TABLE);
pass = AT_PASS_MISC;
break;
cmd->subtype = AT_ValidateConstraintRecurse;
pass = AT_PASS_MISC;
break;
- case AT_ReplicaIdentity: /* REPLICA IDENTITY ... */
+ case AT_ReplicaIdentity: /* REPLICA IDENTITY ... */
ATSimplePermissions(rel, ATT_TABLE | ATT_MATVIEW);
pass = AT_PASS_MISC;
/* This command never recurses */
case AT_EnableReplicaRule:
case AT_DisableRule:
case AT_AddOf: /* OF */
- case AT_DropOf: /* NOT OF */
+ case AT_DropOf: /* NOT OF */
case AT_EnableRowSecurity:
case AT_DisableRowSecurity:
case AT_ForceRowSecurity:
switch (cmd->subtype)
{
case AT_AddColumn: /* ADD COLUMN */
- case AT_AddColumnToView: /* add column via CREATE OR REPLACE
- * VIEW */
+ case AT_AddColumnToView: /* add column via CREATE OR REPLACE VIEW */
address = ATExecAddColumn(wqueue, tab, rel, (ColumnDef *) cmd->def,
false, false, false,
false, lockmode);
ATExecAddConstraint(wqueue, tab, rel, (Constraint *) cmd->def,
true, false, lockmode);
break;
- case AT_ReAddConstraint: /* Re-add pre-existing check
- * constraint */
+ case AT_ReAddConstraint: /* Re-add pre-existing check constraint */
address =
ATExecAddConstraint(wqueue, tab, rel, (Constraint *) cmd->def,
true, true, lockmode);
address = ATExecAddIndexConstraint(tab, rel, (IndexStmt *) cmd->def,
lockmode);
break;
- case AT_AlterConstraint: /* ALTER CONSTRAINT */
+ case AT_AlterConstraint: /* ALTER CONSTRAINT */
address = ATExecAlterConstraint(rel, cmd, false, false, lockmode);
break;
case AT_ValidateConstraint: /* VALIDATE CONSTRAINT */
address = ATExecValidateConstraint(rel, cmd->name, true, false,
lockmode);
break;
- case AT_DropConstraint: /* DROP CONSTRAINT */
+ case AT_DropConstraint: /* DROP CONSTRAINT */
ATExecDropConstraint(rel, cmd->name, cmd->behavior,
false, false,
cmd->missing_ok, lockmode);
true, false,
cmd->missing_ok, lockmode);
break;
- case AT_AlterColumnType: /* ALTER COLUMN TYPE */
+ case AT_AlterColumnType: /* ALTER COLUMN TYPE */
address = ATExecAlterColumnType(tab, rel, cmd, lockmode);
break;
case AT_AlterColumnGenericOptions: /* ALTER COLUMN OPTIONS */
true, false, false,
cmd->missing_ok, lockmode);
break;
- case AT_AddOidsRecurse: /* SET WITH OIDS */
+ case AT_AddOidsRecurse: /* SET WITH OIDS */
/* Use the ADD COLUMN code, unless prep decided to do nothing */
if (cmd->def != NULL)
address =
*/
break;
case AT_SetRelOptions: /* SET (...) */
- case AT_ResetRelOptions: /* RESET (...) */
+ case AT_ResetRelOptions: /* RESET (...) */
case AT_ReplaceRelOptions: /* replace entire option list */
ATExecSetRelOptions(rel, (List *) cmd->def, cmd->subtype, lockmode);
break;
ATExecEnableDisableTrigger(rel, NULL,
TRIGGER_FIRES_ON_ORIGIN, false, lockmode);
break;
- case AT_DisableTrigAll: /* DISABLE TRIGGER ALL */
+ case AT_DisableTrigAll: /* DISABLE TRIGGER ALL */
ATExecEnableDisableTrigger(rel, NULL,
TRIGGER_DISABLED, false, lockmode);
break;
- case AT_EnableTrigUser: /* ENABLE TRIGGER USER */
+ case AT_EnableTrigUser: /* ENABLE TRIGGER USER */
ATExecEnableDisableTrigger(rel, NULL,
TRIGGER_FIRES_ON_ORIGIN, true, lockmode);
break;
- case AT_DisableTrigUser: /* DISABLE TRIGGER USER */
+ case AT_DisableTrigUser: /* DISABLE TRIGGER USER */
ATExecEnableDisableTrigger(rel, NULL,
TRIGGER_DISABLED, true, lockmode);
break;
trigger->tgenabled == TRIGGER_DISABLED)
return false;
}
- else /* ORIGIN or LOCAL role */
+ else /* ORIGIN or LOCAL role */
{
if (trigger->tgenabled == TRIGGER_FIRES_ON_REPLICA ||
trigger->tgenabled == TRIGGER_DISABLED)
{
TriggerFlags ate_flags; /* status bits and offset to shared data */
ItemPointerData ate_ctid1; /* inserted, deleted, or old updated tuple */
-} AfterTriggerEventDataOneCtid;
+} AfterTriggerEventDataOneCtid;
/* AfterTriggerEventData, minus ate_ctid1 and ate_ctid2 */
typedef struct AfterTriggerEventDataZeroCtids
{
TriggerFlags ate_flags; /* status bits and offset to shared data */
-} AfterTriggerEventDataZeroCtids;
+} AfterTriggerEventDataZeroCtids;
#define SizeofTriggerEvent(evt) \
(((evt)->ate_flags & AFTER_TRIGGER_TUP_BITS) == AFTER_TRIGGER_2CTID ? \
write_rate = 0;
if ((secs > 0) || (usecs > 0))
{
- read_rate = (double) BLCKSZ *VacuumPageMiss / (1024 * 1024) /
- (secs + usecs / 1000000.0);
- write_rate = (double) BLCKSZ *VacuumPageDirty / (1024 * 1024) /
- (secs + usecs / 1000000.0);
+ read_rate = (double) BLCKSZ * VacuumPageMiss / (1024 * 1024) /
+ (secs + usecs / 1000000.0);
+ write_rate = (double) BLCKSZ * VacuumPageDirty / (1024 * 1024) /
+ (secs + usecs / 1000000.0);
}
/*
{
ScanState *scanstate;
bool lisnull;
- Oid tuple_tableoid PG_USED_FOR_ASSERTS_ONLY;
+ Oid tuple_tableoid PG_USED_FOR_ASSERTS_ONLY;
ItemPointer tuple_tid;
/*
char **argnames; /* names of input arguments; NULL if none */
/* Note that argnames[i] can be NULL, if some args are unnamed */
Oid collation; /* function's input collation, if known */
-} SQLFunctionParseInfo;
+} SQLFunctionParseInfo;
/* non-export function prototypes */
FunctionCallInfoData serialfn_fcinfo;
FunctionCallInfoData deserialfn_fcinfo;
-} AggStatePerTransData;
+} AggStatePerTransData;
/*
* AggStatePerAggData - per-aggregate information
int16 resulttypeLen;
bool resulttypeByVal;
-} AggStatePerAggData;
+} AggStatePerAggData;
/*
* AggStatePerGroupData - per-aggregate-per-group working state
* NULL and not auto-replace it with a later input value. Only the first
* non-NULL input will be auto-substituted.
*/
-} AggStatePerGroupData;
+} AggStatePerGroupData;
/*
* AggStatePerPhaseData - per-grouping-set-phase state
FmgrInfo *eqfunctions; /* per-grouping-field equality fns */
Agg *aggnode; /* Agg node for phase data */
Sort *sortnode; /* Sort node for input ordering for phase */
-} AggStatePerPhaseData;
+} AggStatePerPhaseData;
/*
* AggStatePerHashData - per-hashtable state
AttrNumber *hashGrpColIdxInput; /* hash col indices in input slot */
AttrNumber *hashGrpColIdxHash; /* indices in hashtbl tuples */
Agg *aggnode; /* original Agg node, for numGroups etc. */
-} AggStatePerHashData;
+} AggStatePerHashData;
static void select_current_set(AggState *aggstate, int setno, bool is_hash);
BufFileClose(hashtable->outerBatchFile[curbatch]);
hashtable->outerBatchFile[curbatch] = NULL;
}
- else /* we just finished the first batch */
+ else /* we just finished the first batch */
{
/*
* Reset some of the skew optimization state variables, since we no
* Allocate a second read pointer to serve as the mark. We know it
* must have index 1, so needn't store that.
*/
- int ptrno PG_USED_FOR_ASSERTS_ONLY;
+ int ptrno PG_USED_FOR_ASSERTS_ONLY;
ptrno = tuplestore_alloc_read_pointer(tuplestorestate,
node->eflags);
* stored here.
*/
SortSupportData ssup;
-} MergeJoinClauseData;
+} MergeJoinClauseData;
/* Result type for MJEvalOuterValues and MJEvalInnerValues */
typedef enum
clause->ssup.ssup_reverse = false;
else if (opstrategy == BTGreaterStrategyNumber)
clause->ssup.ssup_reverse = true;
- else /* planner screwed up */
+ else /* planner screwed up */
elog(ERROR, "unsupported mergejoin strategy %d", opstrategy);
clause->ssup.ssup_nulls_first = nulls_first;
{
TupleTableSlot *resultSlot = node->ps.ps_ResultTupleSlot;
ExprContext *econtext = node->ps.ps_ExprContext;
- bool hassrf PG_USED_FOR_ASSERTS_ONLY;
+ bool hassrf PG_USED_FOR_ASSERTS_ONLY;
bool hasresult;
int argno;
{
long numLeft; /* number of left-input dups in group */
long numRight; /* number of right-input dups in group */
-} SetOpStatePerGroupData;
+} SetOpStatePerGroupData;
static TupleTableSlot *setop_retrieve_direct(SetOpState *setopstate);
SetOp *node = (SetOp *) setopstate->ps.plan;
PlanState *outerPlan;
int firstFlag;
- bool in_first_rel PG_USED_FOR_ASSERTS_ONLY;
+ bool in_first_rel PG_USED_FOR_ASSERTS_ONLY;
/*
* get state info from node
int aggno; /* if so, index of its PerAggData */
WindowObject winobj; /* object used in window function API */
-} WindowStatePerFuncData;
+} WindowStatePerFuncData;
/*
* For plain aggregate window functions, we also have one of these.
int sz;
binaryheap *heap;
- sz = offsetof(binaryheap, bh_nodes) +sizeof(Datum) * capacity;
+ sz = offsetof(binaryheap, bh_nodes) + sizeof(Datum) * capacity;
heap = (binaryheap *) palloc(sz);
heap->bh_space = capacity;
heap->bh_compare = compare;
{
slist_node *last = &head->head;
slist_node *cur;
- bool found PG_USED_FOR_ASSERTS_ONLY = false;
+ bool found PG_USED_FOR_ASSERTS_ONLY = false;
while ((cur = last->next) != NULL)
{
*/
*isNew = true;
- x = rb->allocfunc (rb->arg);
+ x = rb->allocfunc(rb->arg);
x->color = RBRED;
/* Now we can recycle the y node */
if (rb->freefunc)
- rb->freefunc (y, rb->arg);
+ rb->freefunc(y, rb->arg);
}
/*
iter->next_step = NextStepLeft;
goto loop;
}
- else /* not moved - return current, then go up */
+ else /* not moved - return current, then go up */
iter->next_step = NextStepUp;
break;
#define PGSQL_PAM_SERVICE "postgresql" /* Service name passed to PAM */
static int CheckPAMAuth(Port *port, char *user, char *password);
-static int pam_passwd_conv_proc(int num_msg, const struct pam_message ** msg,
- struct pam_response ** resp, void *appdata_ptr);
+static int pam_passwd_conv_proc(int num_msg, const struct pam_message **msg,
+ struct pam_response **resp, void *appdata_ptr);
static struct pam_conv pam_passw_conv = {
&pam_passwd_conv_proc,
/* Correct header from the Platform SDK */
typedef
ULONG (*__ldap_start_tls_sA) (
- IN PLDAP ExternalHandle,
- OUT PULONG ServerReturnValue,
- OUT LDAPMessage **result,
- IN PLDAPControlA * ServerControls,
- IN PLDAPControlA * ClientControls
+ IN PLDAP ExternalHandle,
+ OUT PULONG ServerReturnValue,
+ OUT LDAPMessage **result,
+ IN PLDAPControlA * ServerControls,
+ IN PLDAPControlA * ClientControls
);
#endif
#ifdef ENABLE_SSPI
typedef SECURITY_STATUS
(WINAPI * QUERY_SECURITY_CONTEXT_TOKEN_FN) (
- PCtxtHandle, void **);
+ PCtxtHandle, void **);
static int pg_SSPI_recvauth(Port *port);
static int pg_SSPI_make_upn(char *accountname,
size_t accountnamesize,
DWORD domainnamesize = sizeof(domainname);
SID_NAME_USE accountnameuse;
HMODULE secur32;
+
QUERY_SECURITY_CONTEXT_TOKEN_FN _QuerySecurityContextToken;
/*
*/
static int
-pam_passwd_conv_proc(int num_msg, const struct pam_message ** msg,
- struct pam_response ** resp, void *appdata_ptr)
+pam_passwd_conv_proc(int num_msg, const struct pam_message **msg,
+ struct pam_response **resp, void *appdata_ptr)
{
char *passwd;
struct pam_response *reply;
addrsize = sizeof(struct sockaddr_in);
#endif
- if (bind(sock, (struct sockaddr *) & localaddr, addrsize))
+ if (bind(sock, (struct sockaddr *) &localaddr, addrsize))
{
ereport(LOG,
(errmsg("could not bind local RADIUS socket: %m")));
addrsize = sizeof(remoteaddr);
packetlength = recvfrom(sock, receive_buffer, RADIUS_BUFFER_SIZE, 0,
- (struct sockaddr *) & remoteaddr, &addrsize);
+ (struct sockaddr *) &remoteaddr, &addrsize);
if (packetlength < 0)
{
ereport(LOG,
LargeObjectDesc *loDesc;
int64 loSize;
int64 result_length;
- int total_read PG_USED_FOR_ASSERTS_ONLY;
+ int total_read PG_USED_FOR_ASSERTS_ONLY;
bytea *result = NULL;
/*
Oid loOid = PG_GETARG_OID(0);
bytea *str = PG_GETARG_BYTEA_PP(1);
LargeObjectDesc *loDesc;
- int written PG_USED_FOR_ASSERTS_ONLY;
+ int written PG_USED_FOR_ASSERTS_ONLY;
CreateFSContext();
int64 offset = PG_GETARG_INT64(1);
bytea *str = PG_GETARG_BYTEA_PP(2);
LargeObjectDesc *loDesc;
- int written PG_USED_FOR_ASSERTS_ONLY;
+ int written PG_USED_FOR_ASSERTS_ONLY;
CreateFSContext();
}
static bool
-ipv4eq(struct sockaddr_in * a, struct sockaddr_in * b)
+ipv4eq(struct sockaddr_in *a, struct sockaddr_in *b)
{
return (a->sin_addr.s_addr == b->sin_addr.s_addr);
}
#ifdef HAVE_IPV6
static bool
-ipv6eq(struct sockaddr_in6 * a, struct sockaddr_in6 * b)
+ipv6eq(struct sockaddr_in6 *a, struct sockaddr_in6 *b)
{
int i;
if (gai->ai_addr->sa_family == AF_INET)
{
if (ipv4eq((struct sockaddr_in *) gai->ai_addr,
- (struct sockaddr_in *) & port->raddr.addr))
+ (struct sockaddr_in *) &port->raddr.addr))
{
found = true;
break;
else if (gai->ai_addr->sa_family == AF_INET6)
{
if (ipv6eq((struct sockaddr_in6 *) gai->ai_addr,
- (struct sockaddr_in6 *) & port->raddr.addr))
+ (struct sockaddr_in6 *) &port->raddr.addr))
{
found = true;
break;
* Check to see if a connecting IP matches the given address and netmask.
*/
static bool
-check_ip(SockAddr *raddr, struct sockaddr * addr, struct sockaddr * mask)
+check_ip(SockAddr *raddr, struct sockaddr *addr, struct sockaddr *mask)
{
if (raddr->addr.ss_family == addr->sa_family &&
pg_range_sockaddr(&raddr->addr,
* pg_foreach_ifaddr callback: does client addr match this machine interface?
*/
static void
-check_network_callback(struct sockaddr * addr, struct sockaddr * netmask,
+check_network_callback(struct sockaddr *addr, struct sockaddr *netmask,
void *cb_data)
{
check_network_data *cn = (check_network_data *) cb_data;
{
/* Make an all-ones netmask of appropriate length for family */
pg_sockaddr_cidr_mask(&mask, NULL, addr->sa_family);
- cn->result = check_ip(cn->raddr, addr, (struct sockaddr *) & mask);
+ cn->result = check_ip(cn->raddr, addr, (struct sockaddr *) &mask);
}
else
{
else
{
if (!check_ip(&port->raddr,
- (struct sockaddr *) & hba->addr,
- (struct sockaddr *) & hba->mask))
+ (struct sockaddr *) &hba->addr,
+ (struct sockaddr *) &hba->mask))
continue;
}
break;
#include "libpq/ifaddr.h"
-static int range_sockaddr_AF_INET(const struct sockaddr_in * addr,
- const struct sockaddr_in * netaddr,
- const struct sockaddr_in * netmask);
+static int range_sockaddr_AF_INET(const struct sockaddr_in *addr,
+ const struct sockaddr_in *netaddr,
+ const struct sockaddr_in *netmask);
#ifdef HAVE_IPV6
-static int range_sockaddr_AF_INET6(const struct sockaddr_in6 * addr,
- const struct sockaddr_in6 * netaddr,
- const struct sockaddr_in6 * netmask);
+static int range_sockaddr_AF_INET6(const struct sockaddr_in6 *addr,
+ const struct sockaddr_in6 *netaddr,
+ const struct sockaddr_in6 *netmask);
#endif
* in the same address family; and AF_UNIX addresses are not supported.
*/
int
-pg_range_sockaddr(const struct sockaddr_storage * addr,
- const struct sockaddr_storage * netaddr,
- const struct sockaddr_storage * netmask)
+pg_range_sockaddr(const struct sockaddr_storage *addr,
+ const struct sockaddr_storage *netaddr,
+ const struct sockaddr_storage *netmask)
{
if (addr->ss_family == AF_INET)
return range_sockaddr_AF_INET((const struct sockaddr_in *) addr,
}
static int
-range_sockaddr_AF_INET(const struct sockaddr_in * addr,
- const struct sockaddr_in * netaddr,
- const struct sockaddr_in * netmask)
+range_sockaddr_AF_INET(const struct sockaddr_in *addr,
+ const struct sockaddr_in *netaddr,
+ const struct sockaddr_in *netmask)
{
if (((addr->sin_addr.s_addr ^ netaddr->sin_addr.s_addr) &
netmask->sin_addr.s_addr) == 0)
#ifdef HAVE_IPV6
static int
-range_sockaddr_AF_INET6(const struct sockaddr_in6 * addr,
- const struct sockaddr_in6 * netaddr,
- const struct sockaddr_in6 * netmask)
+range_sockaddr_AF_INET6(const struct sockaddr_in6 *addr,
+ const struct sockaddr_in6 *netaddr,
+ const struct sockaddr_in6 *netmask)
{
int i;
* Return value is 0 if okay, -1 if not.
*/
int
-pg_sockaddr_cidr_mask(struct sockaddr_storage * mask, char *numbits, int family)
+pg_sockaddr_cidr_mask(struct sockaddr_storage *mask, char *numbits, int family)
{
long bits;
char *endptr;
*/
static void
run_ifaddr_callback(PgIfAddrCallback callback, void *cb_data,
- struct sockaddr * addr, struct sockaddr * mask)
+ struct sockaddr *addr, struct sockaddr *mask)
{
struct sockaddr_storage fullmask;
if (!mask)
{
pg_sockaddr_cidr_mask(&fullmask, NULL, addr->sa_family);
- mask = (struct sockaddr *) & fullmask;
+ mask = (struct sockaddr *) &fullmask;
}
(*callback) (addr, mask, cb_data);
for (i = 0; i < length / sizeof(INTERFACE_INFO); ++i)
run_ifaddr_callback(callback, cb_data,
- (struct sockaddr *) & ii[i].iiAddress,
- (struct sockaddr *) & ii[i].iiNetmask);
+ (struct sockaddr *) &ii[i].iiAddress,
+ (struct sockaddr *) &ii[i].iiNetmask);
closesocket(sock);
free(ii);
lifr = lifc.lifc_req;
for (i = 0; i < total; ++i)
{
- addr = (struct sockaddr *) & lifr[i].lifr_addr;
+ addr = (struct sockaddr *) &lifr[i].lifr_addr;
memcpy(&lmask, &lifr[i], sizeof(struct lifreq));
#ifdef HAVE_IPV6
fd = (addr->sa_family == AF_INET6) ? sock6 : sock;
if (ioctl(fd, SIOCGLIFNETMASK, &lmask) < 0)
mask = NULL;
else
- mask = (struct sockaddr *) & lmask.lifr_addr;
+ mask = (struct sockaddr *) &lmask.lifr_addr;
run_ifaddr_callback(callback, cb_data, addr, mask);
}
memset(&mask, 0, sizeof(mask));
pg_sockaddr_cidr_mask(&mask, "8", AF_INET);
run_ifaddr_callback(callback, cb_data,
- (struct sockaddr *) & addr,
- (struct sockaddr *) & mask);
+ (struct sockaddr *) &addr,
+ (struct sockaddr *) &mask);
#ifdef HAVE_IPV6
/* addr ::1/128 */
memset(&mask, 0, sizeof(mask));
pg_sockaddr_cidr_mask(&mask, "128", AF_INET6);
run_ifaddr_callback(callback, cb_data,
- (struct sockaddr *) & addr6,
- (struct sockaddr *) & mask);
+ (struct sockaddr *) &addr6,
+ (struct sockaddr *) &mask);
#endif
return 0;
/* accept connection and fill in the client (remote) address */
port->raddr.salen = sizeof(port->raddr.addr);
if ((port->sock = accept(server_fd,
- (struct sockaddr *) & port->raddr.addr,
+ (struct sockaddr *) &port->raddr.addr,
&port->raddr.salen)) == PGINVALID_SOCKET)
{
ereport(LOG,
/* fill in the server (local) address */
port->laddr.salen = sizeof(port->laddr.addr);
if (getsockname(port->sock,
- (struct sockaddr *) & port->laddr.addr,
+ (struct sockaddr *) &port->laddr.addr,
&port->laddr.salen) < 0)
{
elog(LOG, "getsockname() failed: %m");
static void
socket_putmessage_noblock(char msgtype, const char *s, size_t len)
{
- int res PG_USED_FOR_ASSERTS_ONLY;
+ int res PG_USED_FOR_ASSERTS_ONLY;
int required;
/*
static int leftmostLoc(int loc1, int loc2);
static bool fix_opfuncids_walker(Node *node, void *context);
static bool planstate_walk_subplans(List *plans, bool (*walker) (),
- void *context);
+ void *context);
static bool planstate_walk_members(List *plans, PlanState **planstates,
bool (*walker) (), void *context);
MUTATE(query->limitCount, query->limitCount, Node *);
if (!(flags & QTW_IGNORE_CTE_SUBQUERIES))
MUTATE(query->cteList, query->cteList, List *);
- else /* else copy CTE list as-is */
+ else /* else copy CTE list as-is */
query->cteList = copyObject(query->cteList);
query->rtable = range_table_mutator(query->rtable,
mutator, context, flags);
Assert(T <= total_pages);
/* b is pro-rated share of effective_cache_size */
- b = (double) effective_cache_size *T / total_pages;
+ b = (double) effective_cache_size * T / total_pages;
/* force it positive and integral */
if (b <= 1.0)
path->num_batches = numbatches;
/* and compute the number of "virtual" buckets in the whole join */
- virtualbuckets = (double) numbuckets *(double) numbatches;
+ virtualbuckets = (double) numbuckets * (double) numbatches;
/*
* Determine bucketsize fraction for inner relation. We use the smallest
if (level == 2) /* consider remaining initial rels */
other_rels = lnext(r);
- else /* consider all initial rels */
+ else /* consider all initial rels */
other_rels = list_head(joinrels[1]);
make_rels_by_clause_joins(root,
if (rte->lateral)
rvcontext.relids = get_relids_in_jointree((Node *) subquery->jointree,
true);
- else /* won't need relids */
+ else /* won't need relids */
rvcontext.relids = NULL;
rvcontext.outer_hasSubLinks = &parse->hasSubLinks;
rvcontext.varno = varno;
clause_op_infos = get_op_btree_interpretation(clause_op);
if (clause_op_infos)
pred_op_infos = get_op_btree_interpretation(pred_op);
- else /* no point in looking */
+ else /* no point in looking */
pred_op_infos = NIL;
foreach(lcp, pred_op_infos)
}
if (OidIsValid(opfamily))
opfamilies = lappend_oid(opfamilies, opfamily);
- else /* should not happen */
+ else /* should not happen */
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("could not determine interpretation of row comparison operator %s",
}
return ncandidates;
-} /* func_match_argtypes() */
+} /* func_match_argtypes() */
/* func_select_candidate()
}
return NULL; /* failed to select a best candidate */
-} /* func_select_candidate() */
+} /* func_select_candidate() */
/* func_get_detail()
* any PostgreSQL functions.
*/
static LONG WINAPI
-crashDumpHandler(struct _EXCEPTION_POINTERS * pExceptionInfo)
+crashDumpHandler(struct _EXCEPTION_POINTERS *pExceptionInfo)
{
/*
* We only write crash dumps if the "crashdumps" directory within the
}
int
-pgwin32_bind(SOCKET s, struct sockaddr * addr, int addrlen)
+pgwin32_bind(SOCKET s, struct sockaddr *addr, int addrlen)
{
int res;
}
SOCKET
-pgwin32_accept(SOCKET s, struct sockaddr * addr, int *addrlen)
+pgwin32_accept(SOCKET s, struct sockaddr *addr, int *addrlen)
{
SOCKET rs;
/* No signal delivery during connect. */
int
-pgwin32_connect(SOCKET s, const struct sockaddr * addr, int addrlen)
+pgwin32_connect(SOCKET s, const struct sockaddr *addr, int addrlen)
{
int r;
* since it is not used in postgresql!
*/
int
-pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval * timeout)
+pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout)
{
WSAEVENT events[FD_SETSIZE * 2]; /* worst case is readfds totally
* different from writefds, so
* to handle the timer setting and notification upon timeout.
*/
int
-setitimer(int which, const struct itimerval * value, struct itimerval * ovalue)
+setitimer(int which, const struct itimerval *value, struct itimerval *ovalue)
{
Assert(value != NULL);
Assert(value->it_interval.tv_sec == 0 && value->it_interval.tv_usec == 0);
AutoVacForkFailed, /* failed trying to start a worker */
AutoVacRebalance, /* rebalance the cost limits */
AutoVacNumSignals /* must be last */
-} AutoVacuumSignal;
+} AutoVacuumSignal;
/*-------------
* The main autovacuum shmem struct. On shared memory we store this main
static Oid do_start_worker(void);
static void launcher_determine_sleep(bool canlaunch, bool recursing,
- struct timeval * nap);
+ struct timeval *nap);
static void launch_worker(TimestampTz now);
static List *get_database_list(void);
static void rebuild_database_list(Oid newdb);
* cause a long sleep, which will be interrupted when a worker exits.
*/
static void
-launcher_determine_sleep(bool canlaunch, bool recursing, struct timeval * nap)
+launcher_determine_sleep(bool canlaunch, bool recursing, struct timeval *nap)
{
/*
* We sleep until the next scheduled vacuum. We trust that when the
{
const char *fn_name;
bgworker_main_type fn_addr;
-} InternalBGWorkers[] =
+} InternalBGWorkers[] =
{
{
}
alen = sizeof(pgStatAddr);
- if (getsockname(pgStatSock, (struct sockaddr *) & pgStatAddr, &alen) < 0)
+ if (getsockname(pgStatSock, (struct sockaddr *) &pgStatAddr, &alen) < 0)
{
ereport(LOG,
(errcode_for_socket_access(),
* provides a kernel-level check that only packets from this same
* address will be received.
*/
- if (connect(pgStatSock, (struct sockaddr *) & pgStatAddr, alen) < 0)
+ if (connect(pgStatSock, (struct sockaddr *) &pgStatAddr, alen) < 0)
{
ereport(LOG,
(errcode_for_socket_access(),
if (msg.m_nentries >= PGSTAT_NUM_TABPURGE)
{
len = offsetof(PgStat_MsgTabpurge, m_tableid[0])
- +msg.m_nentries * sizeof(Oid);
+ + msg.m_nentries * sizeof(Oid);
pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_TABPURGE);
msg.m_databaseid = MyDatabaseId;
if (msg.m_nentries > 0)
{
len = offsetof(PgStat_MsgTabpurge, m_tableid[0])
- +msg.m_nentries * sizeof(Oid);
+ + msg.m_nentries * sizeof(Oid);
pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_TABPURGE);
msg.m_databaseid = MyDatabaseId;
if (f_msg.m_nentries >= PGSTAT_NUM_FUNCPURGE)
{
len = offsetof(PgStat_MsgFuncpurge, m_functionid[0])
- +f_msg.m_nentries * sizeof(Oid);
+ + f_msg.m_nentries * sizeof(Oid);
pgstat_send(&f_msg, len);
if (f_msg.m_nentries > 0)
{
len = offsetof(PgStat_MsgFuncpurge, m_functionid[0])
- +f_msg.m_nentries * sizeof(Oid);
+ + f_msg.m_nentries * sizeof(Oid);
pgstat_send(&f_msg, len);
}
msg.m_tableid[0] = relid;
msg.m_nentries = 1;
- len = offsetof(PgStat_MsgTabpurge, m_tableid[0]) +sizeof(Oid);
+ len = offsetof(PgStat_MsgTabpurge, m_tableid[0]) + sizeof(Oid);
pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_TABPURGE);
msg.m_databaseid = MyDatabaseId;
/* Start time of SIGKILL timeout during immediate shutdown or child crash */
/* Zero means timeout is not running */
static time_t AbortStartTime = 0;
+
/* Length of said timeout */
#define SIGKILL_CHILDREN_AFTER_SECS 5
* cases are as shown in the code.
*/
static void
-DetermineSleepTime(struct timeval * timeout)
+DetermineSleepTime(struct timeval *timeout)
{
TimestampTz next_wakeup = 0;
errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."),
activity ? errdetail("Failed process was running: %s", activity) : 0));
#elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST
- ereport(lev,
-
- /*------
- translator: %s is a noun phrase describing a child process, such as
- "server process" */
- (errmsg("%s (PID %d) was terminated by signal %d: %s",
- procname, pid, WTERMSIG(exitstatus),
- WTERMSIG(exitstatus) < NSIG ?
- sys_siglist[WTERMSIG(exitstatus)] : "(unknown)"),
- activity ? errdetail("Failed process was running: %s", activity) : 0));
+ ereport(lev,
+
+ /*------
+ translator: %s is a noun phrase describing a child process, such as
+ "server process" */
+ (errmsg("%s (PID %d) was terminated by signal %d: %s",
+ procname, pid, WTERMSIG(exitstatus),
+ WTERMSIG(exitstatus) < NSIG ?
+ sys_siglist[WTERMSIG(exitstatus)] : "(unknown)"),
+ activity ? errdetail("Failed process was running: %s", activity) : 0));
#else
ereport(lev,
int dest = LOG_DESTINATION_STDERR;
/* While we have enough for a header, process data... */
- while (count >= (int) (offsetof(PipeProtoHeader, data) +1))
+ while (count >= (int) (offsetof(PipeProtoHeader, data) + 1))
{
PipeProtoHeader p;
int chunklen;
* initcm - set up new colormap
*/
static void
-initcm(struct vars * v,
- struct colormap * cm)
+initcm(struct vars *v,
+ struct colormap *cm)
{
struct colordesc *cd;
* freecm - free dynamically-allocated things in a colormap
*/
static void
-freecm(struct colormap * cm)
+freecm(struct colormap *cm)
{
cm->magic = 0;
if (cm->cd != cm->cdspace)
* pg_reg_getcolor - slow case of GETCOLOR()
*/
color
-pg_reg_getcolor(struct colormap * cm, chr c)
+pg_reg_getcolor(struct colormap *cm, chr c)
{
int rownum,
colnum,
* maxcolor - report largest color number in use
*/
static color
-maxcolor(struct colormap * cm)
+maxcolor(struct colormap *cm)
{
if (CISERR())
return COLORLESS;
* Beware: may relocate the colordescs.
*/
static color /* COLORLESS for error */
-newcolor(struct colormap * cm)
+newcolor(struct colormap *cm)
{
struct colordesc *cd;
size_t n;
* freecolor - free a color (must have no arcs or subcolor)
*/
static void
-freecolor(struct colormap * cm,
+freecolor(struct colormap *cm,
color co)
{
struct colordesc *cd = &cm->cd[co];
* pseudocolor - allocate a false color, to be managed by other means
*/
static color
-pseudocolor(struct colormap * cm)
+pseudocolor(struct colormap *cm)
{
color co;
struct colordesc *cd;
* This works only for chrs that map into the low color map.
*/
static color
-subcolor(struct colormap * cm, chr c)
+subcolor(struct colormap *cm, chr c)
{
color co; /* current color of c */
color sco; /* new subcolor */
* colormap, which do not necessarily correspond to exactly one chr code.
*/
static color
-subcolorhi(struct colormap * cm, color *pco)
+subcolorhi(struct colormap *cm, color *pco)
{
color co; /* current color of entry */
color sco; /* new subcolor */
* newsub - allocate a new subcolor (if necessary) for a color
*/
static color
-newsub(struct colormap * cm,
+newsub(struct colormap *cm,
color co)
{
color sco; /* new subcolor */
* Returns array index of new row. Note the array might move.
*/
static int
-newhicolorrow(struct colormap * cm,
+newhicolorrow(struct colormap *cm,
int oldrow)
{
int newrow = cm->hiarrayrows;
* Essentially, extends the 2-D array to the right with a copy of itself.
*/
static void
-newhicolorcols(struct colormap * cm)
+newhicolorcols(struct colormap *cm)
{
color *newarray;
int r,
* mechanized with the "lastsubcolor" state variable.
*/
static void
-subcolorcvec(struct vars * v,
- struct cvec * cv,
- struct state * lp,
- struct state * rp)
+subcolorcvec(struct vars *v,
+ struct cvec *cv,
+ struct state *lp,
+ struct state *rp)
{
struct colormap *cm = v->cm;
color lastsubcolor = COLORLESS;
* to be able to handle both low and high chr codes.
*/
static void
-subcoloronechr(struct vars * v,
+subcoloronechr(struct vars *v,
chr ch,
- struct state * lp,
- struct state * rp,
+ struct state *lp,
+ struct state *rp,
color *lastsubcolor)
{
struct colormap *cm = v->cm;
* subcoloronerange - do subcolorcvec's work for a high range
*/
static void
-subcoloronerange(struct vars * v,
+subcoloronerange(struct vars *v,
chr from,
chr to,
- struct state * lp,
- struct state * rp,
+ struct state *lp,
+ struct state *rp,
color *lastsubcolor)
{
struct colormap *cm = v->cm;
* subcoloronerow - do subcolorcvec's work for one new row in the high colormap
*/
static void
-subcoloronerow(struct vars * v,
+subcoloronerow(struct vars *v,
int rownum,
- struct state * lp,
- struct state * rp,
+ struct state *lp,
+ struct state *rp,
color *lastsubcolor)
{
struct colormap *cm = v->cm;
* okcolors - promote subcolors to full colors
*/
static void
-okcolors(struct nfa * nfa,
- struct colormap * cm)
+okcolors(struct nfa *nfa,
+ struct colormap *cm)
{
struct colordesc *cd;
struct colordesc *end = CDEND(cm);
* colorchain - add this arc to the color chain of its color
*/
static void
-colorchain(struct colormap * cm,
- struct arc * a)
+colorchain(struct colormap *cm,
+ struct arc *a)
{
struct colordesc *cd = &cm->cd[a->co];
* uncolorchain - delete this arc from the color chain of its color
*/
static void
-uncolorchain(struct colormap * cm,
- struct arc * a)
+uncolorchain(struct colormap *cm,
+ struct arc *a)
{
struct colordesc *cd = &cm->cd[a->co];
struct arc *aa = a->colorchainRev;
* rainbow - add arcs of all full colors (but one) between specified states
*/
static void
-rainbow(struct nfa * nfa,
- struct colormap * cm,
+rainbow(struct nfa *nfa,
+ struct colormap *cm,
int type,
color but, /* COLORLESS if no exceptions */
- struct state * from,
- struct state * to)
+ struct state *from,
+ struct state *to)
{
struct colordesc *cd;
struct colordesc *end = CDEND(cm);
* The calling sequence ought to be reconciled with cloneouts().
*/
static void
-colorcomplement(struct nfa * nfa,
- struct colormap * cm,
+colorcomplement(struct nfa *nfa,
+ struct colormap *cm,
int type,
- struct state * of, /* complements of this guy's PLAIN
+ struct state *of, /* complements of this guy's PLAIN
* outarcs */
- struct state * from,
- struct state * to)
+ struct state *from,
+ struct state *to)
{
struct colordesc *cd;
struct colordesc *end = CDEND(cm);
* dumpcolors - debugging output
*/
static void
-dumpcolors(struct colormap * cm,
+dumpcolors(struct colormap *cm,
FILE *f)
{
struct colordesc *cd;