root/trunk/cib7.hpp

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

essage first commit

Line 
1#ifndef CIB7_HPP
2#define CIB7_HPP
3
4#include <cirec.hpp>
5#include <citrm.hpp>
6
7/*
8        CIB7 *cib7 como primer parametro de las funciones, algo asi como el this de C++
9 */
10
11#define B7_THIS
12#define B7_THISP
13
14#define DISTRACE 0
15#define TOKTRACE 0
16#define BOLTRACE 0
17#define RECTRACE 0
18
19#if RECTRACE
20#define DISTRACE 1
21#endif
22
23#define B7EE_X2          2
24#define B7EE_PFX         11
25
26
27class _YOURCLASS CIB7
28{
29 public:
30
31    CISISX * cisisxp;
32
33/*     int b70trace; atualizado em cisisx.?pp - AOT/RM, 23/02/2001 */
34
35
36//cib71.c
37#if BOLTRACE
38#define DISTRACE 1
39    char *b7objp;
40#endif
41
42    int and2gf;
43    char *subst_and;
44    LONGX b7setno1;
45    LONGX b7setno;
46    char *b7batchp;                 /* fldupdat */
47    RECSTRU *b7recp;                /* current recp */
48
49/* error */
50#if FATRAP
51#if !WWWISIS
52    jmp_buf b71jumper;
53#endif /* !WWWISIS */
54#endif /* FATRAP */
55
56    int b71error;
57    char b7errxy[MAXERRL+1];       /* static */
58
59/* gettoken */
60    char *tokbackp;
61    char *toknextp;
62    char *token;
63    char toktyp;
64    char tokopr;
65    int tokqty;
66    int toklen;
67
68    char *tokqualp;                 /* qualifiers */
69    int tokquall;                   /* length */
70    int tokqualn;                   /* no of elements in the list */
71
72    char *tokmassp;                 /* toknextp after b7_massp() */
73
74/* expressoes */
75        int nb7oprs;
76
77//cib72
78    unsigned char mask;
79    char *b7_gidbnp;
80    PDLSTRU *vpdlp[MAXPDLS];
81    int npdls;
82    LONGX b7tell;
83    LONGX b7itrm;
84    int b7fd;
85    int b7error;
86    B7HITBUF *b7bufferp;
87
88    char b7_pfxdbn[CIMPL+1];
89    char b7_pfxopx[LE2+LE2+1];
90    FFI b7_pfxlen;
91    char b7_pfxmsg[LE2+1];
92    char b7_pfxtwx[CIMPL+1];
93    FFI b7_pfxmdl;
94
95#if FIXTRACE
96    int xtrac;
97#endif
98
99    char vetopr[MAXVOPR],vetcas[MAXVOPR],*vetopp[MAXVOPR];
100    int nop;
101
102    void *ciapip;
103    LONGX smfn;
104    RECSTRU *srecp;
105
106    short unsigned int nqualts,vqualt[MAXQUAL],*qualtp;
107
108    int b7rootmsg;
109
110   //prototipos de las funciones
111
112    LONGX b7_z_search(char* path, char* query, LONGX *num_records );
113    char *b7_z_record(RECSTRU *lrecp, LONGX lmfn, LONGX nord );
114    b7_CIB7 *b7_cib7();
115    b7_CIB7 *b7_cib7_delete();
116    char *b7_exp(RECSTRU *irecp, char *dbnamp, char *qryp,
117               char *buffup, char *qrydbnp, RECSTRU *crecp, int *errnop);
118    char *b7_run(RECSTRU *irecp,char *dbnamp,char *buffup, int buffuplen,
119                                LONGX tell,unsigned char uctab[],char *btch0p,
120                 LONGX tlirecp,LONGX crec,int *errnop);
121    int b7_hballoc(LONGX bufsiz, B7HITBUF **bufferpp);
122    int b7_hbinit(LONGX setno, B7HITBUF *bufferp);
123    int b7_hbfree(B7HITBUF **bufferpp);                         
124    LONGX b7_hit(RECSTRU *irecp, LONGX nord, LONGX setno);
125    int b7_msg(int tline,char *msg,LONGX psts,LONGX docs,int tmsg);
126    void statement(LONGX *result);
127    void astatement(LONGX *result);
128    char expression(LONGX *result);
129    char conjunction(LONGX *result);
130    char conjgop(LONGX *result);
131    char conjfop(LONGX *result);
132    char conjpop(LONGX *result);
133    char conjeop(LONGX *result);
134    char primitive(LONGX *result);
135    void semaction(int type, char op, int opl, LONGX *r, LONGX *h);
136    void get_token();
137    void gettoken();
138    void b7_experr(int error, char *errp, int errl);
139    void fixup(char *p1, char *p2);
140    int fixlev(int i2, char level);
141    char *b7_massp(char *tokenmassp, int   tokenlen, int   b7ee_pfx);
142    int b7_free(int ipdl);
143    int b7_xpdl(int ipdl1, int ipdl2 );
144    void b7_runerr(int error, char *errp, int errl);
145    char *b7_initpdl(PDLSTRU *pdl, char postlen, LONGX lastmfn);
146    PDLSTRU *b7_ipdl(int ipdl);
147    int b7_pop();
148    int b7_pfx(RECSTRU *irecp, UWORD invxtag, char *dp, char *op, int b7re_pfx);
149    char *b7_run(RECSTRU *irecp, char *dbnamp, char *buffup, int buffuplen,
150                 LONGX tell, unsigned char uctab[], char *btch0p,
151                 RECSTRU *tlirecp, RECSTRU *crecp, int *errnop);
152    PDLSTRU *b7_push();
153    PDLSTRU *b7_top();
154    LONGX b7_hsizh(PDLSTRU *pdlp,LONGX *hsizp);
155    int b7_cmp( char *op1, char *op2, int oplen );
156    int b7_prox( char *op1, char* op2, short andl, LONGX dist );
157    LONGX b7_gmfn( char *str );       
158    void b7_zorx();
159    void b7_zand(short andl );
160    void b7_zann();
161    void b7_zanp(short andl, unsigned char b7qty );
162    void b7_copy(PDLSTRU *pdl, char *src );
163    void b7_inst(PDLSTRU *pdl, char *src );
164    void b7_addk(PDLSTRU *pdl, TRMSTRU *trmp );
165    void b7_print( char *str, short int len );   
166    void b7_showpdl();
167    char *b7_xlkey(char *opx,char *bufp,unsigned char uctab[],char *xlfilp,int *opxlp);
168    LONGX b7_hsizh(PDLSTRU *pdlp,LONGX hsizp);   
169    void display(char *s);
170
171    CIB7(CISISX *parm_cisisxp);
172};
173
174#endif /* CIB7_HPP */
Note: See TracBrowser for help on using the browser.