root/trunk/citrm.hpp

Revision 389, 2.8 kB (checked in by heitor.barbieri, 3 weeks ago)

essage first commit

Line 
1#ifndef CITRM_HPP
2#define CITRM_HPP
3
4#include <cidbx.hpp>
5
6class _YOURCLASS TRMSTRU
7{
8 public:
9
10    LONGX     trmnbytes;         /* nbytes allocated */
11    int      trmtype;           /* layout indicator */
12    DBXSTRU *trmdbxp;
13    int      trmrc;             /* term/nxterm rc */
14    UCHR     trmkey[LE2+1];     /* key padded with blanks and null */
15    LONGX     trmpost;           /* current posting order */
16    LONGX     trmpmfn;           /* current posting pmfn */
17    UWORD    trmptag;           /* current posting ptag */
18    UWORD    trmpocc;           /* current posting pocc */
19    UWORD    trmpcnt;           /* current posting pcnt */
20    L1STRU   trml1buf;          /* .l01 input buffer */
21    UCHR     trml1nul;          /* .l01 input buffer idx delimiter */
22    L2STRU   trml2buf;          /* .l02 input buffer */
23    UCHR     trml2nul;          /* .l02 input buffer idx delimiter */
24    int      trmlcase;          /* last term/nxterm tree used */
25    int      trmrcase;          /* trmread() treecase+1 selection  */
26    off_t    trmrseek[2];       /* last term/nxterm leafread() lseek addr */
27    int      trmrsize[2];       /* last term/nxterm leafread() read size */
28    int      trmliock[2];       /* last trmread() ock */
29    UCHR     *trmlidxp[2];      /* last term/nxterm idxchars ptr */
30    LONGX     trmpleft;          /* postings left in segment */
31    UCHR     *trmpcurr;         /* trmpchar not yet incremented */
32    UCHR     *trmpchar;         /* ptr to next posting in trmifbuf */
33#if LIND
34    LONGX     trmyaddr;          /* byte address */
35    LONGX     trmypsts;          /* total no of psts */
36    int       trmycase;          /* postings type */
37    int       trmysize;          /* postings length */
38    LONGX     trmydocs;          /* total no of docs */
39    LONGX     trmydisk;          /* total no of bytes */
40    LONGX     trmyread;          /* total no of bytes already read */
41    LONGX     trmyleft;          /* total no of bytes left on ifbuf */
42#else
43    INFO     trmpcblk;          /* info1 for next posting() */
44    INFO     trmpcpos;          /* info2 for next posting() */
45    IFPHEAD  trmifseg;          /* .ifp current segm header */
46    IFPHEAD  trmifhdr;          /* .ifp 1st segm header - total psts here */
47#endif
48  //UCHR     trmifbuf[1];       /* .ifp input buffer */
49    UCHR     trmifbuf[IFBSIZ];   /* .ifp input buffer */
50    CISISX  *cisisxp;
51
52
53  TRMSTRU (CISISX *cxp);
54
55  void    xtrminit(void);
56
57  LONGX    xtrmalloc(LONGX nbytes);
58
59  LONGX    xterm(UCHR *dbnamp,
60                UCHR *keyp);
61
62  int     xtrmread(int      treecase,
63                   UCHR   **retkeyp);
64
65  LONGX    xnxterm(void);
66
67  void    xposthdr1(void);
68
69  LONGX    xposting(LONGX nord);
70
71  void    xpostpost(void);
72};
73
74#endif // CITRM_CPP
Note: See TracBrowser for help on using the browser.