summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBruce Momjian2007-11-16 01:12:24 +0000
committerBruce Momjian2007-11-16 01:12:24 +0000
commit5f0bf6cb0d1f1922a7da68392e50d214b1c2abe3 (patch)
tree1b0027f4e7874b0342bb678e506e93edb5181126 /contrib
parent0c2c061eb0436e696c40832272167273b04d2b73 (diff)
Run pgindent on remaining files now that LOOPBYTE is a usable macro.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/hstore/hstore_gist.c22
-rw-r--r--contrib/intarray/_intbig_gist.c2
-rw-r--r--contrib/ltree/_ltree_gist.c2
-rw-r--r--contrib/ltree/ltree_gist.c12
-rw-r--r--contrib/pg_trgm/trgm_gist.c18
5 files changed, 28 insertions, 28 deletions
diff --git a/contrib/hstore/hstore_gist.c b/contrib/hstore/hstore_gist.c
index 403c8b03f6b..aa3aa0d94be 100644
--- a/contrib/hstore/hstore_gist.c
+++ b/contrib/hstore/hstore_gist.c
@@ -146,8 +146,8 @@ ghstore_compress(PG_FUNCTION_ARGS)
LOOPBYTE
{
- if ((sign[i] & 0xff) != 0xff)
- PG_RETURN_POINTER(retval);
+ if ((sign[i] & 0xff) != 0xff)
+ PG_RETURN_POINTER(retval);
}
res = (GISTTYPE *) palloc(CALCGTSIZE(ALLISTRUE));
@@ -169,7 +169,7 @@ ghstore_decompress(PG_FUNCTION_ARGS)
{
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
GISTENTRY *retval;
- HStore *key;
+ HStore *key;
key = (HStore *) PG_DETOAST_DATUM(entry->key);
@@ -273,7 +273,7 @@ unionkey(BITVECP sbase, GISTTYPE * add)
if (ISALLTRUE(add))
return 1;
LOOPBYTE
- sbase[i] |= sadd[i];
+ sbase[i] |= sadd[i];
return 0;
}
@@ -328,7 +328,7 @@ typedef struct
{
OffsetNumber pos;
int4 cost;
-} SPLITCOST;
+} SPLITCOST;
static int
comparecost(const void *a, const void *b)
@@ -470,7 +470,7 @@ ghstore_picksplit(PG_FUNCTION_ARGS)
{
ptr = GETSIGN(_j);
LOOPBYTE
- union_l[i] |= ptr[i];
+ union_l[i] |= ptr[i];
}
*left++ = j;
v->spl_nleft++;
@@ -486,7 +486,7 @@ ghstore_picksplit(PG_FUNCTION_ARGS)
{
ptr = GETSIGN(_j);
LOOPBYTE
- union_r[i] |= ptr[i];
+ union_r[i] |= ptr[i];
}
*right++ = j;
v->spl_nright++;
@@ -516,7 +516,7 @@ ghstore_consistent(PG_FUNCTION_ARGS)
sign = GETSIGN(entry);
- if ( strategy == HStoreContainsStrategyNumber || strategy == 13 /* hack for old strats */ )
+ if (strategy == HStoreContainsStrategyNumber || strategy == 13 /* hack for old strats */ )
{
HStore *query = PG_GETARG_HS(1);
HEntry *qe = ARRPTR(query);
@@ -540,10 +540,10 @@ ghstore_consistent(PG_FUNCTION_ARGS)
qe++;
}
}
- else if ( strategy == HStoreExistsStrategyNumber )
+ else if (strategy == HStoreExistsStrategyNumber)
{
- text *query = PG_GETARG_TEXT_P(1);
- int crc = crc32_sz( VARDATA(query), VARSIZE(query)-VARHDRSZ );
+ text *query = PG_GETARG_TEXT_P(1);
+ int crc = crc32_sz(VARDATA(query), VARSIZE(query) - VARHDRSZ);
res = (GETBIT(sign, HASHVAL(crc))) ? true : false;
}
diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c
index 3f67000325d..3bfbc84dc75 100644
--- a/contrib/intarray/_intbig_gist.c
+++ b/contrib/intarray/_intbig_gist.c
@@ -319,7 +319,7 @@ typedef struct
{
OffsetNumber pos;
int4 cost;
-} SPLITCOST;
+} SPLITCOST;
static int
comparecost(const void *a, const void *b)
diff --git a/contrib/ltree/_ltree_gist.c b/contrib/ltree/_ltree_gist.c
index d773b93f7ca..34ec2552ca4 100644
--- a/contrib/ltree/_ltree_gist.c
+++ b/contrib/ltree/_ltree_gist.c
@@ -272,7 +272,7 @@ typedef struct
{
OffsetNumber pos;
int4 cost;
-} SPLITCOST;
+} SPLITCOST;
static int
comparecost(const void *a, const void *b)
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c
index 252f64ecf25..dea0b9c3863 100644
--- a/contrib/ltree/ltree_gist.c
+++ b/contrib/ltree/ltree_gist.c
@@ -1,7 +1,7 @@
/*
* GiST support for ltree
* Teodor Sigaev <teodor@stack.net>
- * $PostgreSQL: pgsql/contrib/ltree/ltree_gist.c,v 1.21 2007/11/16 00:13:02 momjian Exp $
+ * $PostgreSQL: pgsql/contrib/ltree/ltree_gist.c,v 1.22 2007/11/16 01:12:24 momjian Exp $
*/
#include "ltree.h"
@@ -136,8 +136,8 @@ ltree_same(PG_FUNCTION_ARGS)
{
LOOPBYTE
{
- if (sa[i] != sb[i])
- {
+ if (sa[i] != sb[i])
+ {
*result = false;
break;
}
@@ -202,7 +202,7 @@ ltree_union(PG_FUNCTION_ARGS)
BITVECP sc = LTG_SIGN(cur);
LOOPBYTE
- ((unsigned char *) base)[i] |= sc[i];
+ ((unsigned char *) base)[i] |= sc[i];
}
curtree = LTG_LNODE(cur);
@@ -347,7 +347,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
BITVECP sc = LTG_SIGN(lu);
LOOPBYTE
- ((unsigned char *) ls)[i] |= sc[i];
+ ((unsigned char *) ls)[i] |= sc[i];
}
}
}
@@ -368,7 +368,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
BITVECP sc = LTG_SIGN(lu);
LOOPBYTE
- ((unsigned char *) rs)[i] |= sc[i];
+ ((unsigned char *) rs)[i] |= sc[i];
}
}
}
diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c
index efee71eaf12..4286928d348 100644
--- a/contrib/pg_trgm/trgm_gist.c
+++ b/contrib/pg_trgm/trgm_gist.c
@@ -115,8 +115,8 @@ gtrgm_compress(PG_FUNCTION_ARGS)
LOOPBYTE
{
- if ((sign[i] & 0xff) != 0xff)
- PG_RETURN_POINTER(retval);
+ if ((sign[i] & 0xff) != 0xff)
+ PG_RETURN_POINTER(retval);
}
len = CALCGTSIZE(SIGNKEY | ALLISTRUE, 0);
@@ -137,7 +137,7 @@ gtrgm_decompress(PG_FUNCTION_ARGS)
{
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
GISTENTRY *retval;
- text *key;
+ text *key;
key = DatumGetTextP(entry->key);
@@ -212,7 +212,7 @@ unionkey(BITVECP sbase, TRGM * add)
return 1;
LOOPBYTE
- sbase[i] |= sadd[i];
+ sbase[i] |= sadd[i];
}
else
{
@@ -327,7 +327,7 @@ sizebitvec(BITVECP sign)
i;
LOOPBYTE
- size += number_of_ones[(unsigned char) sign[i]];
+ size += number_of_ones[(unsigned char) sign[i]];
return size;
}
@@ -394,10 +394,10 @@ typedef struct
{
bool allistrue;
BITVEC sign;
-} CACHESIGN;
+} CACHESIGN;
static void
-fillcache(CACHESIGN * item, TRGM * key)
+fillcache(CACHESIGN *item, TRGM * key)
{
item->allistrue = false;
if (ISARRKEY(key))
@@ -413,7 +413,7 @@ typedef struct
{
OffsetNumber pos;
int4 cost;
-} SPLITCOST;
+} SPLITCOST;
static int
comparecost(const void *a, const void *b)
@@ -426,7 +426,7 @@ comparecost(const void *a, const void *b)
static int
-hemdistcache(CACHESIGN * a, CACHESIGN * b)
+hemdistcache(CACHESIGN *a, CACHESIGN *b)
{
if (a->allistrue)
{