root/trunk/t1.c

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

essage first commit

Line 
1/* Program T1: dumps the dictionary and postings of a given data base
2*/
3#include <stdio.h>
4#include "cisis.h"   /* CISIS Interface header file */
5#include "cirun.h"   /* CISIS Interface runtime declarations */
6
7void main(int argc, char *argv[])
8{
9        TRMSTRU *trmp;  /* mandatory for defines TRM */
10        LONGX itrm;
11
12        if (argc != 2) {
13                printf("%s",cicopyr("t1 <dbname>"));
14                exit(1);
15        }
16
17        TERM(itrm=ntrms,argv[1],"!");
18        while (TRMrc != RCEOF) {
19                printf("%6"_LD_"  %s \n",TRMxytotp,TRMkey);
20                while (posting(itrm,TRMpost+1) > 0L)
21                        printf("   %6"_LD_"  %"_LD_"/%d/%d/%d \n",
22                                TRMpost,TRMpmfn,TRMptag,TRMpocc,TRMpcnt);
23                NXTERM(itrm);
24        }
25} /* end of main */
Note: See TracBrowser for help on using the browser.