|
Revision 4, 1.3 kB
(checked in by heitor.barbieri, 2 years ago)
|
|
Versão 5.52 do cisis (28/04/2010)
|
| Line | |
|---|
| 1 | /* ifload.c - Load an inverted file from sorted link files |
|---|
| 2 | */ |
|---|
| 3 | #include <stdio.h> |
|---|
| 4 | #include <string.h> |
|---|
| 5 | #include "cisis.h" |
|---|
| 6 | #include "cirun.h" |
|---|
| 7 | |
|---|
| 8 | void main(argc,argv) |
|---|
| 9 | int argc; |
|---|
| 10 | char *argv[]; |
|---|
| 11 | { |
|---|
| 12 | int rc; |
|---|
| 13 | #if IFFUN |
|---|
| 14 | char area[BUFSIZ+BUFSIZ+1]; |
|---|
| 15 | char *p; |
|---|
| 16 | int iarg; |
|---|
| 17 | for (p=area, iarg=1; iarg<argc; iarg++) { |
|---|
| 18 | strcpy(p,argv[iarg]); p+=strlen(p); if (iarg<argc-1) *p++='\n'; |
|---|
| 19 | } |
|---|
| 20 | *p='\0'; |
|---|
| 21 | rc=cisis_ifload(area); |
|---|
| 22 | #else /* IFFUN */ |
|---|
| 23 | rc=ifloadexec(argc,argv); |
|---|
| 24 | #endif /* IFFUN */ |
|---|
| 25 | if (rc > 1 /* error */) { |
|---|
| 26 | char *msgp,line[80]; |
|---|
| 27 | rc = rc - 1 /* error */; |
|---|
| 28 | switch (rc) { |
|---|
| 29 | case 1: msgp="ifload/CIIFL/link file/open"; break; |
|---|
| 30 | case 2: msgp="ifload/CIIFL/invalid link record/mpe"; break; |
|---|
| 31 | case 3: msgp="ifload/CIIFL/invalid link record/fix"; break; |
|---|
| 32 | case 4: msgp="ifload/CIIFL/invalid link record/mfn"; break; |
|---|
| 33 | case 5: msgp="ifload/CIIFL/invalid link record/key"; break; |
|---|
| 34 | case 6: msgp="ifload/CIIFL/read"; break; |
|---|
| 35 | case 7: msgp="ifload/CIIFL/keys not sorted"; break; |
|---|
| 36 | case 8: msgp="ifload/CIIFL/keys/postings not sorted"; break; |
|---|
| 37 | case 9: msgp="ifload/CIIFL/ifpbuff"; break; |
|---|
| 38 | default: sprintf(line,"ifload/error#%d",rc); msgp=line; |
|---|
| 39 | } |
|---|
| 40 | fatal(msgp); |
|---|
| 41 | } |
|---|
| 42 | exit(rc); |
|---|
| 43 | } |
|---|