Changeset 63

Show
Ignore:
Timestamp:
1999-09-20 10:26:02 (9 years ago)
Author:
richard
Message:

Martin's latest changes.

Location:
trunk/xapian-core/backends/da
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/xapian-core/backends/da/daread.h

    r41 r63  
    33#ifndef _daread_h_ 
    44#define _daread_h_ 
    5  
    6 #ifdef __cplusplus 
    7 extern "C" { 
    8 #endif 
    95 
    106#include <stdio.h>   /* main etc */ 
     
    4743 
    4844    byte *p;      /* term-block pointer (transitory) */ 
    49     int c;        /* term-block offset */ 
     45    byte *term;   /* term pointer (transitory) */ 
     46    /*int c;        -- term-block offset */ 
    5047    int o;        /* term-block index offset */ 
    5148    int n;        /* term-block number */ 
     
    7067}; 
    7168 
    72 struct DAfile * DAopen(byte * s, int type); 
    73 void   DAclose(struct DAfile * p); 
    74 int    DAterm(byte * k, int d, struct terminfo * t, struct DAfile * p); 
    75 struct postings * DAopenpostings(struct terminfo * t, struct DAfile * p); 
    76 void   DAreadpostings(struct postings * q, int style, int Z0); 
    77 void   DAclosepostings(struct postings * q); 
     69struct record 
     70{   byte * p;     /* the record */ 
     71    int size;     /* size of malloc-ed space */ 
     72    int number;   /* its number */ 
     73}; 
    7874 
    79 #ifdef __cplusplus 
    80 } 
    81 #endif 
     75 
     76struct termvec 
     77{   byte * p;     /* the termvec */ 
     78    int size;     /* size of malloc-ed space */ 
     79    int number;   /* its number */ 
     80 
     81    /* termvec inherits record, and is cast to (record) at one 
     82       significant point */ 
     83 
     84    byte * l;     /* its end point */ 
     85    byte * term;  /* current term is tv->term */ 
     86    byte * nextterm; 
     87                  /* next term is tv->nextterm */ 
     88    int rel;      /* marked for relevance feedback? */ 
     89    int wdf;      /* its wdf (or 0) */ 
     90    int freq;     /* its frequency (or -1) */ 
     91    byte * termp; /* pointer to position info (or 0) */ 
     92}; 
     93 
     94extern struct DAfile * DAopen(byte * s, int type); 
     95extern void   DAclose(struct DAfile * p); 
     96extern int    DAterm(byte * k, struct terminfo * t, struct DAfile * p); 
     97extern struct postings * DAopenpostings(struct terminfo * t, struct DAfile * p); 
     98extern void   DAreadpostings(struct postings * q, int style, int Z0); 
     99extern void   DAclosepostings(struct postings * q); 
     100 
     101extern int    DAnextterm(struct terminfo * v, struct DAfile * p); 
     102extern int    DAprevterm(struct terminfo * v, struct DAfile * p); 
     103 
     104extern struct record * makerecord(); 
     105extern void   loserecord(struct record * r); 
     106extern int    DAgetrecord(struct DAfile * p, int n, struct record * r); 
     107 
     108extern struct termvec * maketermvec(); 
     109extern void   losetermvec(struct termvec * tv); 
     110extern int    DAgettermvec(struct DAfile * p, int n, struct termvec * tv); 
     111 
     112extern struct terms * openterms(struct termvec * tv); 
     113extern void   readterms(struct termvec * tv); 
    82114 
    83115#endif /* daread.h */