~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to contrib/pg_trgm/trgm.h

  • Committer: Bazaar Package Importer
  • Author(s): Ubuntu Archive Backport
  • Date: 2009-11-09 13:46:16 UTC
  • mfrom: (5.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091109134616-ae14l9tr3g7p2t9y
Tags: 8.4.1-1~hardy1
Automated backport upload; no source changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $PostgreSQL: pgsql/contrib/pg_trgm/trgm.h,v 1.10 2008/11/12 13:43:54 teodor Exp $ 
 
2
 * $PostgreSQL: pgsql/contrib/pg_trgm/trgm.h,v 1.11 2009/06/11 14:48:51 momjian Exp $
3
3
 */
4
4
#ifndef __TRGM_H__
5
5
#define __TRGM_H__
31
31
        *(((char*)(a))+2) = *(((char*)(b))+2);  \
32
32
} while(0);
33
33
 
34
 
uint32 trgm2int(trgm *ptr);
 
34
uint32          trgm2int(trgm *ptr);
35
35
 
36
36
#ifdef KEEPONLYALNUM
37
37
#define ISPRINTABLECHAR(a)      ( isascii( *(unsigned char*)(a) ) && (isalnum( *(unsigned char*)(a) ) || *(unsigned char*)(a)==' ') )
45
45
        int32           vl_len_;                /* varlena header (do not touch directly!) */
46
46
        uint8           flag;
47
47
        char            data[1];
48
 
}       TRGM;
 
48
} TRGM;
49
49
 
50
50
#define TRGMHDRSIZE               (VARHDRSZ + sizeof(uint8))
51
51
 
87
87
extern float4 trgm_limit;
88
88
 
89
89
TRGM       *generate_trgm(char *str, int slen);
90
 
float4          cnt_sml(TRGM * trg1, TRGM * trg2);
 
90
float4          cnt_sml(TRGM *trg1, TRGM *trg2);
91
91
 
92
92
#endif