1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list

provided by Andrew.
This commit is contained in:
Bruce Momjian
2009-06-11 14:49:15 +00:00
parent 4e86efb4e5
commit d747140279
654 changed files with 11900 additions and 11387 deletions

View File

@ -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__ */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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