|
Revision 389, 1.4 kB
(checked in by heitor.barbieri, 3 weeks ago)
|
|
essage first commit
|
| Line | |
|---|
| 1 | /* ==----------------------------- w2ralbs.c ------------------------------== */ |
|---|
| 2 | |
|---|
| 3 | #if WHENFUN |
|---|
| 4 | int w2rcox ( int cmd, WTFUN_ARRAY *awtfp, int coll ) |
|---|
| 5 | { |
|---|
| 6 | #endif |
|---|
| 7 | |
|---|
| 8 | /* read all language bit strigs |
|---|
| 9 | */ |
|---|
| 10 | #if PARMLANG |
|---|
| 11 | WTFUN_XWT *xwtp=awtfp->vwtfp[coll]; // current |
|---|
| 12 | |
|---|
| 13 | if (parmlanguage) { |
|---|
| 14 | if (readnlangs >= MAXPARMLANG) fatal("wtrig2/terminverted/lang/MAXPARMLANG"); |
|---|
| 15 | for (langidx=0; langidx < readnlangs; langidx++) { |
|---|
| 16 | int xdir; |
|---|
| 17 | /* read */ |
|---|
| 18 | RECORD(ifrec,colxdb,readnterms+langidx+1); |
|---|
| 19 | if (RECrc != RCNORMAL) fatal("wtrig2/terminverted/lang/RCNORMAL"); |
|---|
| 20 | /* allocate */ |
|---|
| 21 | langshits[nlangs]=(char *)loadfile(NULL,'@',"",NULL,hitbytes,'\0'); |
|---|
| 22 | /* store bit string */ |
|---|
| 23 | xdir=fieldx(ifrec,TAG35,1); if (xdir < 0) fatal("wtrig2/terminverted/lang/TAG35"); |
|---|
| 24 | memcpy(langshits[nlangs],FIELDP(xdir),hitbytes); |
|---|
| 25 | /* store name */ |
|---|
| 26 | xdir=fieldx(ifrec,TAG34,1); if (xdir < 0) fatal("wtrig2/terminverted/lang/TAG34"); |
|---|
| 27 | for (p=FIELDP(xdir), left=DIRlen(xdir); left--; ) { |
|---|
| 28 | if (*p == '^') break; |
|---|
| 29 | *p=isisuctab[*p]; p++; |
|---|
| 30 | } |
|---|
| 31 | *p='\0'; /* ok */ |
|---|
| 32 | langsname[nlangs]=strdup(FIELDP(xdir)); //... |
|---|
| 33 | langscount[nlangs++]=0; |
|---|
| 34 | } |
|---|
| 35 | if (nlangs != readnlangs) fatal("wtrig2/terminverted/lang/nlangs"); |
|---|
| 36 | } |
|---|
| 37 | #endif /* PARMLANG */ |
|---|
| 38 | |
|---|
| 39 | #if WHENFUN |
|---|
| 40 | return 0; |
|---|
| 41 | } |
|---|
| 42 | #endif |
|---|