diff options
| author | Bruce Momjian <bruce@momjian.us> | 2009-06-11 14:49:15 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2009-06-11 14:49:15 +0000 |
| commit | d7471402794266078953f1bd113dab4913d631a1 (patch) | |
| tree | 618e392a84eaf837e00bf78f8694097b78fec227 /contrib/intarray | |
| parent | 4e86efb4e51b66ef57b3fe6f28576de23a1bf1c6 (diff) | |
| download | postgresql-d7471402794266078953f1bd113dab4913d631a1.tar.gz | |
8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
Diffstat (limited to 'contrib/intarray')
| -rw-r--r-- | contrib/intarray/_int.h | 18 | ||||
| -rw-r--r-- | contrib/intarray/_int_bool.c | 30 | ||||
| -rw-r--r-- | contrib/intarray/_int_gin.c | 3 | ||||
| -rw-r--r-- | contrib/intarray/_int_gist.c | 3 | ||||
| -rw-r--r-- | contrib/intarray/_int_op.c | 2 | ||||
| -rw-r--r-- | contrib/intarray/_int_tool.c | 2 | ||||
| -rw-r--r-- | contrib/intarray/_intbig_gist.c | 11 |
7 files changed, 36 insertions, 33 deletions
diff --git a/contrib/intarray/_int.h b/contrib/intarray/_int.h index debc324933..35dbb54796 100644 --- a/contrib/intarray/_int.h +++ b/contrib/intarray/_int.h @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/intarray/_int.h,v 1.16 2008/05/17 01:28:19 adunstan Exp $ + * $PostgreSQL: pgsql/contrib/intarray/_int.h,v 1.17 2009/06/11 14:48:51 momjian Exp $ */ #ifndef ___INT_H__ #define ___INT_H__ @@ -78,7 +78,7 @@ typedef struct int32 vl_len_; /* varlena header (do not touch directly!) */ int4 flag; char data[1]; -} GISTTYPE; +} GISTTYPE; #define ALLISTRUE 0x04 @@ -131,14 +131,14 @@ typedef struct ITEM int2 type; int2 left; int4 val; -} ITEM; +} ITEM; typedef struct { int32 vl_len_; /* varlena header (do not touch directly!) */ int4 size; char data[1]; -} QUERYTYPE; +} QUERYTYPE; #define HDRSIZEQT (VARHDRSZ + sizeof(int4)) #define COMPUTESIZE(size) ( HDRSIZEQT + size * sizeof(ITEM) ) @@ -151,10 +151,10 @@ typedef struct #define OPEN 4 #define CLOSE 5 -bool signconsistent(QUERYTYPE * query, BITVEC sign, bool calcnot); -bool execconsistent(QUERYTYPE * query, ArrayType *array, bool calcnot); -bool ginconsistent(QUERYTYPE * query, bool *check); -int4 shorterquery(ITEM * q, int4 len); +bool signconsistent(QUERYTYPE *query, BITVEC sign, bool calcnot); +bool execconsistent(QUERYTYPE *query, ArrayType *array, bool calcnot); +bool ginconsistent(QUERYTYPE *query, bool *check); +int4 shorterquery(ITEM *q, int4 len); int compASC(const void *a, const void *b); @@ -165,4 +165,4 @@ if (ARRNELEMS(a) > 1) \ qsort((void*)ARRPTR(a), ARRNELEMS(a),sizeof(int4), \ (direction) ? compASC : compDESC ) -#endif /* ___INT_H__ */ +#endif /* ___INT_H__ */ diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c index 2cba9b66c1..438db2ca95 100644 --- a/contrib/intarray/_int_bool.c +++ b/contrib/intarray/_int_bool.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/intarray/_int_bool.c,v 1.15 2008/05/17 01:28:19 adunstan Exp $ + * $PostgreSQL: pgsql/contrib/intarray/_int_bool.c,v 1.16 2009/06/11 14:48:51 momjian Exp $ */ #include "postgres.h" @@ -54,13 +54,13 @@ typedef struct NODE *str; /* number in str */ int4 num; -} WORKSTATE; +} WORKSTATE; /* * get token from query string */ static int4 -gettoken(WORKSTATE * state, int4 *val) +gettoken(WORKSTATE *state, int4 *val) { char nnn[16], *curnnn; @@ -143,7 +143,7 @@ gettoken(WORKSTATE * state, int4 *val) * push new one in polish notation reverse view */ static void -pushquery(WORKSTATE * state, int4 type, int4 val) +pushquery(WORKSTATE *state, int4 type, int4 val) { NODE *tmp = (NODE *) palloc(sizeof(NODE)); @@ -160,7 +160,7 @@ pushquery(WORKSTATE * state, int4 type, int4 val) * make polish notation of query */ static int4 -makepol(WORKSTATE * state) +makepol(WORKSTATE *state) { int4 val, type; @@ -239,7 +239,7 @@ typedef struct * is there value 'val' in array or not ? */ static bool -checkcondition_arr(void *checkval, ITEM * item) +checkcondition_arr(void *checkval, ITEM *item) { int4 *StopLow = ((CHKVAL *) checkval)->arrb; int4 *StopHigh = ((CHKVAL *) checkval)->arre; @@ -261,7 +261,7 @@ checkcondition_arr(void *checkval, ITEM * item) } static bool -checkcondition_bit(void *checkval, ITEM * item) +checkcondition_bit(void *checkval, ITEM *item) { return GETBIT(checkval, HASHVAL(item->val)); } @@ -270,7 +270,7 @@ checkcondition_bit(void *checkval, ITEM * item) * check for boolean condition */ static bool -execute(ITEM * curitem, void *checkval, bool calcnot, bool (*chkcond) (void *checkval, ITEM * item)) +execute(ITEM *curitem, void *checkval, bool calcnot, bool (*chkcond) (void *checkval, ITEM *item)) { if (curitem->type == VAL) @@ -302,7 +302,7 @@ execute(ITEM * curitem, void *checkval, bool calcnot, bool (*chkcond) (void *che * signconsistent & execconsistent called by *_consistent */ bool -signconsistent(QUERYTYPE * query, BITVEC sign, bool calcnot) +signconsistent(QUERYTYPE *query, BITVEC sign, bool calcnot) { return execute( GETQUERY(query) + query->size - 1, @@ -312,7 +312,7 @@ signconsistent(QUERYTYPE * query, BITVEC sign, bool calcnot) } bool -execconsistent(QUERYTYPE * query, ArrayType *array, bool calcnot) +execconsistent(QUERYTYPE *query, ArrayType *array, bool calcnot) { CHKVAL chkval; @@ -333,7 +333,7 @@ typedef struct } GinChkVal; static bool -checkcondition_gin(void *checkval, ITEM * item) +checkcondition_gin(void *checkval, ITEM *item) { GinChkVal *gcv = (GinChkVal *) checkval; @@ -341,7 +341,7 @@ checkcondition_gin(void *checkval, ITEM * item) } bool -ginconsistent(QUERYTYPE * query, bool *check) +ginconsistent(QUERYTYPE *query, bool *check) { GinChkVal gcv; ITEM *items = GETQUERY(query); @@ -408,7 +408,7 @@ boolop(PG_FUNCTION_ARGS) } static void -findoprnd(ITEM * ptr, int4 *pos) +findoprnd(ITEM *ptr, int4 *pos) { #ifdef BS_DEBUG elog(DEBUG3, (ptr[*pos].type == OPR) ? @@ -618,7 +618,7 @@ bqarr_out(PG_FUNCTION_ARGS) } static int4 -countdroptree(ITEM * q, int4 pos) +countdroptree(ITEM *q, int4 pos) { if (q[pos].type == VAL) return 1; @@ -634,7 +634,7 @@ countdroptree(ITEM * q, int4 pos) * we can modify query tree for clearing */ int4 -shorterquery(ITEM * q, int4 len) +shorterquery(ITEM *q, int4 len) { int4 index, posnot, diff --git a/contrib/intarray/_int_gin.c b/contrib/intarray/_int_gin.c index 598cdeca57..2bf8fc54bb 100644 --- a/contrib/intarray/_int_gin.c +++ b/contrib/intarray/_int_gin.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/intarray/_int_gin.c,v 1.9 2009/03/25 22:19:01 tgl Exp $ + * $PostgreSQL: pgsql/contrib/intarray/_int_gin.c,v 1.10 2009/06/11 14:48:51 momjian Exp $ */ #include "postgres.h" @@ -90,6 +90,7 @@ ginint4_consistent(PG_FUNCTION_ARGS) { bool *check = (bool *) PG_GETARG_POINTER(0); StrategyNumber strategy = PG_GETARG_UINT16(1); + /* int32 nkeys = PG_GETARG_INT32(3); */ /* Pointer *extra_data = (Pointer *) PG_GETARG_POINTER(4); */ bool *recheck = (bool *) PG_GETARG_POINTER(5); diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index 13fee25ec7..29e08eda66 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/intarray/_int_gist.c,v 1.22 2008/05/17 01:28:19 adunstan Exp $ + * $PostgreSQL: pgsql/contrib/intarray/_int_gist.c,v 1.23 2009/06/11 14:48:51 momjian Exp $ */ #include "postgres.h" @@ -42,6 +42,7 @@ g_int_consistent(PG_FUNCTION_ARGS) GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0); ArrayType *query = (ArrayType *) PG_DETOAST_DATUM_COPY(PG_GETARG_POINTER(1)); StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + /* Oid subtype = PG_GETARG_OID(3); */ bool *recheck = (bool *) PG_GETARG_POINTER(4); bool retval; diff --git a/contrib/intarray/_int_op.c b/contrib/intarray/_int_op.c index b29a405e35..54858322a2 100644 --- a/contrib/intarray/_int_op.c +++ b/contrib/intarray/_int_op.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/intarray/_int_op.c,v 1.8 2008/05/17 01:28:19 adunstan Exp $ + * $PostgreSQL: pgsql/contrib/intarray/_int_op.c,v 1.9 2009/06/11 14:48:51 momjian Exp $ */ #include "postgres.h" diff --git a/contrib/intarray/_int_tool.c b/contrib/intarray/_int_tool.c index 7f7e4d43a9..8c0ec29c31 100644 --- a/contrib/intarray/_int_tool.c +++ b/contrib/intarray/_int_tool.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/intarray/_int_tool.c,v 1.11 2008/05/17 01:28:19 adunstan Exp $ + * $PostgreSQL: pgsql/contrib/intarray/_int_tool.c,v 1.12 2009/06/11 14:48:51 momjian Exp $ */ #include "postgres.h" diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c index d1e3f19037..f9c5986db2 100644 --- a/contrib/intarray/_intbig_gist.c +++ b/contrib/intarray/_intbig_gist.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/intarray/_intbig_gist.c,v 1.19 2008/05/17 01:28:19 adunstan Exp $ + * $PostgreSQL: pgsql/contrib/intarray/_intbig_gist.c,v 1.20 2009/06/11 14:48:51 momjian Exp $ */ #include "postgres.h" @@ -78,7 +78,7 @@ _intbig_out(PG_FUNCTION_ARGS) ** intbig functions *********************************************************************/ static bool -_intbig_overlap(GISTTYPE * a, ArrayType *b) +_intbig_overlap(GISTTYPE *a, ArrayType *b) { int num = ARRNELEMS(b); int4 *ptr = ARRPTR(b); @@ -96,7 +96,7 @@ _intbig_overlap(GISTTYPE * a, ArrayType *b) } static bool -_intbig_contains(GISTTYPE * a, ArrayType *b) +_intbig_contains(GISTTYPE *a, ArrayType *b) { int num = ARRNELEMS(b); int4 *ptr = ARRPTR(b); @@ -243,7 +243,7 @@ hemdistsign(BITVECP a, BITVECP b) } static int -hemdist(GISTTYPE * a, GISTTYPE * b) +hemdist(GISTTYPE *a, GISTTYPE *b) { if (ISALLTRUE(a)) { @@ -265,7 +265,7 @@ g_intbig_decompress(PG_FUNCTION_ARGS) } static int4 -unionkey(BITVECP sbase, GISTTYPE * add) +unionkey(BITVECP sbase, GISTTYPE *add) { int4 i; BITVECP sadd = GETSIGN(add); @@ -506,6 +506,7 @@ g_intbig_consistent(PG_FUNCTION_ARGS) GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0); ArrayType *query = (ArrayType *) PG_DETOAST_DATUM(PG_GETARG_POINTER(1)); StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + /* Oid subtype = PG_GETARG_OID(3); */ bool *recheck = (bool *) PG_GETARG_POINTER(4); bool retval; |
