diff options
author | Tom Lane | 2005-06-22 22:56:29 +0000 |
---|---|---|
committer | Tom Lane | 2005-06-22 22:56:29 +0000 |
commit | d20763dbee7cdf8a700bf6bdd120b3913a3b99f4 (patch) | |
tree | 5cb9ed9ba10cdbac226fd6b96ac02a2cc5a543a8 /contrib/tsearch/gistidx.h | |
parent | 4cc7a93d220644ae068ce2639b961db6764a68f6 (diff) |
Remove contrib modules that have been agreed to be obsolete.
(There are more that will be removed once they've been copied to
pgfoundry.org.)
Diffstat (limited to 'contrib/tsearch/gistidx.h')
-rw-r--r-- | contrib/tsearch/gistidx.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/contrib/tsearch/gistidx.h b/contrib/tsearch/gistidx.h deleted file mode 100644 index 449e2ac8423..00000000000 --- a/contrib/tsearch/gistidx.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef __GISTIDX_H__ -#define __GISTIDX_H__ - -/* -#define GISTIDX_DEBUG -*/ - -/* - * signature defines - */ -#define BITBYTE 8 -#define SIGLENINT 64 /* >121 => key will toast, so it will not - * work !!! */ -#define SIGLEN ( sizeof(int4)*SIGLENINT ) -#define SIGLENBIT (SIGLEN*BITBYTE) - -typedef char BITVEC[SIGLEN]; -typedef char *BITVECP; - -#define LOOPBYTE(a) \ - for(i=0;i<SIGLEN;i++) {\ - a;\ - } -#define LOOPBIT(a) \ - for(i=0;i<SIGLENBIT;i++) {\ - a;\ - } - -#define GETBYTE(x,i) ( *( (BITVECP)(x) + (int)( (i) / BITBYTE ) ) ) -#define GETBITBYTE(x,i) ( ((char)(x)) >> (i) & 0x01 ) -#define CLRBIT(x,i) GETBYTE(x,i) &= ~( 0x01 << ( (i) % BITBYTE ) ) -#define SETBIT(x,i) GETBYTE(x,i) |= ( 0x01 << ( (i) % BITBYTE ) ) -#define GETBIT(x,i) ( (GETBYTE(x,i) >> ( (i) % BITBYTE )) & 0x01 ) - -#define HASHVAL(val) (((unsigned int)(val)) % SIGLENBIT) -#define HASH(sign, val) SETBIT((sign), HASHVAL(val)) - - -/* - * type of index key - */ -typedef struct -{ - int4 len; - int4 flag; - char data[1]; -} GISTTYPE; - -#define ARRKEY 0x01 -#define SIGNKEY 0x02 -#define ALLISTRUE 0x04 - -#define ISARRKEY(x) ( ((GISTTYPE*)(x))->flag & ARRKEY ) -#define ISSIGNKEY(x) ( ((GISTTYPE*)(x))->flag & SIGNKEY ) -#define ISALLTRUE(x) ( ((GISTTYPE*)(x))->flag & ALLISTRUE ) - -#define GTHDRSIZE ( sizeof(int4)* 2 ) -#define CALCGTSIZE(flag, len) ( GTHDRSIZE + ( ( (flag) & ARRKEY ) ? ((len)*sizeof(int4)) : (((flag) & ALLISTRUE) ? 0 : SIGLEN) ) ) - -#define GETSIGN(x) ( (BITVECP)( (char*)(x) + GTHDRSIZE ) ) -#define GETARR(x) ( (int4*)( (char*)(x) + GTHDRSIZE ) ) -#define ARRNELEM(x) ( ( ((GISTTYPE*)(x))->len - GTHDRSIZE ) / sizeof(int4) ) - -#endif |