| 1 | /* --------------------- cib70.h --------------------- */ |
|---|
| 2 | |
|---|
| 3 | #if CIAPI |
|---|
| 4 | #include "ciapi.h" |
|---|
| 5 | #endif |
|---|
| 6 | |
|---|
| 7 | /* |
|---|
| 8 | b7_CIB7 *cib7 como primer parametro de las funciones, algo asi como el this de C++ |
|---|
| 9 | */ |
|---|
| 10 | #define B7_THIS cib7p |
|---|
| 11 | #define B7_THISP cib7p, |
|---|
| 12 | |
|---|
| 13 | #define DISTRACE 0 |
|---|
| 14 | #define TOKTRACE 0 |
|---|
| 15 | #define BOLTRACE 0 |
|---|
| 16 | #define RECTRACE 0 |
|---|
| 17 | |
|---|
| 18 | #if RECTRACE |
|---|
| 19 | #define DISTRACE 1 |
|---|
| 20 | #endif |
|---|
| 21 | |
|---|
| 22 | /* prototipos de las funciones */ |
|---|
| 23 | |
|---|
| 24 | #if ANSI |
|---|
| 25 | b7_CIB7 *b7_cib7(b7_CIB7 *cib7p, void *xciapip); |
|---|
| 26 | b7_CIB7 *b7_cib7_delete(b7_CIB7 *cib7p); |
|---|
| 27 | int b7_msg(b7_CIB7 *cib7,int tline,char *msg,LONGX psts,LONGX docs,int tmsg); |
|---|
| 28 | void statement(b7_CIB7 *cib7, LONGX *result); |
|---|
| 29 | void astatement(b7_CIB7 *cib7, LONGX *result); |
|---|
| 30 | char expression(b7_CIB7 *cib7, LONGX *result); |
|---|
| 31 | char conjunction(b7_CIB7 *cib7, LONGX *result); |
|---|
| 32 | char conjgop(b7_CIB7 *cib7, LONGX *result); |
|---|
| 33 | char conjfop(b7_CIB7 *cib7, LONGX *result); |
|---|
| 34 | char conjpop(b7_CIB7 *cib7, LONGX *result); |
|---|
| 35 | char conjeop(b7_CIB7 *cib7, LONGX *result); |
|---|
| 36 | char primitive(b7_CIB7 *cib7, LONGX *result); |
|---|
| 37 | void semaction(b7_CIB7 *cib7, int type, char op, int opl, LONGX *r, LONGX *h); |
|---|
| 38 | void get_token(b7_CIB7 *cib7); |
|---|
| 39 | void gettoken(b7_CIB7 *cib7); |
|---|
| 40 | void b7_experr(b7_CIB7 *cib7, int error, char *errp, int errl); |
|---|
| 41 | void fixup(b7_CIB7 *cib7, char *p1, char *p2); |
|---|
| 42 | int fixlev(b7_CIB7 *cib7, int i2, char level); |
|---|
| 43 | char *b7_massp(b7_CIB7 *cib7, char *tokenmassp, int tokenlen, int b7ee_pfx); |
|---|
| 44 | int b7_free(b7_CIB7 *cib7, int ipdl); |
|---|
| 45 | int b7_xpdl(b7_CIB7* cib7,int ipdl1, int ipdl2 ); |
|---|
| 46 | void b7_runerr(b7_CIB7* cib7, int error, char *errp, int errl); |
|---|
| 47 | char *b7_initpdl(b7_CIB7* cib7, PDLSTRU *pdl, char postlen, LONGX lastmfn); |
|---|
| 48 | PDLSTRU *b7_ipdl(b7_CIB7* cib7, int ipdl); |
|---|
| 49 | int b7_pop(b7_CIB7* cib7); |
|---|
| 50 | PDLSTRU *b7_push(b7_CIB7* cib7); |
|---|
| 51 | PDLSTRU *b7_top(b7_CIB7* cib7); |
|---|
| 52 | LONGX b7_hsizh(b7_CIB7* cib7, PDLSTRU *pdlp,LONGX *hsizp); |
|---|
| 53 | void b7_zorx(b7_CIB7* cib7); |
|---|
| 54 | void b7_zand(b7_CIB7* cib7, short andl ); |
|---|
| 55 | void b7_zann(b7_CIB7* cib7); |
|---|
| 56 | void b7_zanp(b7_CIB7* cib7, short andl, unsigned char b7qty ); |
|---|
| 57 | void b7_copy(b7_CIB7* cib7, PDLSTRU *pdl, char *src ); |
|---|
| 58 | void b7_inst(b7_CIB7* cib7, PDLSTRU *pdl, char *src ); |
|---|
| 59 | void b7_addk(b7_CIB7* cib7, PDLSTRU *pdl, TRMSTRU *trmp ); |
|---|
| 60 | void b7_showpdl(b7_CIB7* cib7); |
|---|
| 61 | char *b7_xlkey(b7_CIB7 *cib7, char *opx,char *bufp,unsigned char uctab[],char *xlfilp,int *opxlp); |
|---|
| 62 | int b7_pfx(b7_CIB7 *cib7, LONGX irec, UWORD invxtag, char *dp, char *op, int b7re_pfx); |
|---|
| 63 | int b7_cmp(b7_CIB7 *cib7p, char *op1,char *op2,int oplen); |
|---|
| 64 | LONGX b7_gmfn(b7_CIB7 *cib7p, char *str); |
|---|
| 65 | int b7_prox(b7_CIB7 *cib7p,char *op1,char *op2,short andl,LONGX dist); |
|---|
| 66 | void b7_print(b7_CIB7 *cib7p,char *str,short int len); |
|---|
| 67 | #else |
|---|
| 68 | b7_CIB7 *b7_cib7(); |
|---|
| 69 | b7_CIB7 *b7_cib7_delete(); |
|---|
| 70 | int b7_msg(); |
|---|
| 71 | void statement(); |
|---|
| 72 | void astatement(); |
|---|
| 73 | char expression(); |
|---|
| 74 | char conjunction(); |
|---|
| 75 | char conjgop(); |
|---|
| 76 | char conjfop(); |
|---|
| 77 | char conjpop(); |
|---|
| 78 | char conjeop(); |
|---|
| 79 | char primitive(); |
|---|
| 80 | void semaction(); |
|---|
| 81 | void get_token(); |
|---|
| 82 | void gettoken(); |
|---|
| 83 | void b7_experr(); |
|---|
| 84 | void fixup(); |
|---|
| 85 | int fixlev(); |
|---|
| 86 | char *b7_massp(); |
|---|
| 87 | int b7_free(); |
|---|
| 88 | int b7_xpdl(); |
|---|
| 89 | void b7_runerr(); |
|---|
| 90 | char *b7_initpdl(); |
|---|
| 91 | PDLSTRU *b7_ipdl(); |
|---|
| 92 | int b7_pop(); |
|---|
| 93 | PDLSTRU *b7_push(); |
|---|
| 94 | PDLSTRU *b7_top(); |
|---|
| 95 | LONGX b7_hsizh(); |
|---|
| 96 | void b7_zorx(); |
|---|
| 97 | void b7_zand(); |
|---|
| 98 | void b7_zann(); |
|---|
| 99 | void b7_zanp(); |
|---|
| 100 | void b7_showpdl(); |
|---|
| 101 | void b7_copy(); |
|---|
| 102 | void b7_inst(); |
|---|
| 103 | void b7_addk(); |
|---|
| 104 | char *b7_xlkey(); |
|---|
| 105 | int b7_pfx(); |
|---|
| 106 | int b7_cmp(); |
|---|
| 107 | LONGX b7_gmfn(); |
|---|
| 108 | int b7_prox(); |
|---|
| 109 | void b7_print(); |
|---|
| 110 | #endif /* ANSI */ |
|---|
| 111 | |
|---|
| 112 | |
|---|
| 113 | /* uso de los componenter de cib7 como si fueran "globales" */ |
|---|
| 114 | /* tratando de no modificar mucho los fuentes... */ |
|---|
| 115 | #define b7objp cib7p->b7objp |
|---|
| 116 | #define and2gf cib7p->and2gf |
|---|
| 117 | #define subst_and cib7p->subst_and |
|---|
| 118 | #define b7setno1 cib7p->b7setno1 |
|---|
| 119 | #define b7setno cib7p->b7setno |
|---|
| 120 | #define b7batchp cib7p->b7batchp |
|---|
| 121 | #define b7recp cib7p->b7recp |
|---|
| 122 | #define b71jumper cib7p->b71jumper |
|---|
| 123 | #define b71error cib7p->b71error |
|---|
| 124 | #define b7errxy cib7p->b7errxy |
|---|
| 125 | #define tokbackp cib7p->tokbackp |
|---|
| 126 | #define toknextp cib7p->toknextp |
|---|
| 127 | #define token cib7p->token |
|---|
| 128 | #define toktyp cib7p->toktyp |
|---|
| 129 | #define tokopr cib7p->tokopr |
|---|
| 130 | #define tokqty cib7p->tokqty |
|---|
| 131 | #define toklen cib7p->toklen |
|---|
| 132 | #define tokqualp cib7p->tokqualp |
|---|
| 133 | #define tokquall cib7p->tokquall |
|---|
| 134 | #define tokqualn cib7p->tokqualn |
|---|
| 135 | #define tokmassp cib7p->tokmassp |
|---|
| 136 | #define nb7oprs cib7p->nb7oprs |
|---|
| 137 | #define mask cib7p->mask |
|---|
| 138 | #define b7_gidbnp cib7p->b7_gidbnp |
|---|
| 139 | #define vpdlp cib7p->vpdlp |
|---|
| 140 | #define npdls cib7p->npdls |
|---|
| 141 | #define b7tell cib7p->b7tell |
|---|
| 142 | #define b7itrm cib7p->b7itrm |
|---|
| 143 | #define b7fd cib7p->b7fd |
|---|
| 144 | #define b7error cib7p->b7error |
|---|
| 145 | #define b7bufferp cib7p->b7bufferp |
|---|
| 146 | #define b7_pfxdbn cib7p->b7_pfxdbn |
|---|
| 147 | #define b7_pfxopx cib7p->b7_pfxopx |
|---|
| 148 | #define b7_pfxlen cib7p->b7_pfxlen |
|---|
| 149 | #define b7_pfxmsg cib7p->b7_pfxmsg |
|---|
| 150 | #define b7_pfxtwx cib7p->b7_pfxtwx |
|---|
| 151 | #define b7_pfxmdl cib7p->b7_pfxmdl |
|---|
| 152 | #define xtrac cib7p->xtrac |
|---|
| 153 | #define vetopr cib7p->vetopr |
|---|
| 154 | #define vetcas cib7p->vetcas |
|---|
| 155 | #define vetopp cib7p->vetopp |
|---|
| 156 | #define nop cib7p->nop |
|---|
| 157 | #define nqualts cib7p->nqualts |
|---|
| 158 | #define vqualt cib7p->vqualt |
|---|
| 159 | #define qualtp cib7p->qualtp |
|---|
| 160 | #define b7rootmsg cib7p->b7rootmsg |
|---|
| 161 | #define b7tw2mh cib7p->b7tw2mh |
|---|
| 162 | |
|---|
| 163 | #if ANSI |
|---|
| 164 | void display(char *s); |
|---|
| 165 | #else |
|---|
| 166 | void display(); |
|---|
| 167 | #endif |
|---|
| 168 | |
|---|