5 * Revision 1.5 1995/02/14 16:20:57 adam
6 * Qualifiers are read from a file now.
8 * Revision 1.4 1995/02/14 14:12:42 adam
9 * Ranges for ordered qualfiers implemented (e.g. pd=1980-1990).
11 * Revision 1.3 1995/02/14 10:25:57 adam
12 * The constructions 'qualifier rel term ...' implemented.
14 * Revision 1.2 1995/02/13 15:15:07 adam
15 * Added handling of qualifiers. Not finished yet.
17 * Revision 1.1 1995/02/13 12:35:21 adam
18 * First version of CCL. Qualifiers aren't handled yet.
31 static int ti_attr[] = {
33 CCL_BIB1_STR, CCL_BIB1_STR_WP
36 static int au_attr[] = {
38 CCL_BIB1_STR, CCL_BIB1_STR_WP
41 static int pd_attr[] = {
43 CCL_BIB1_REL, CCL_BIB1_REL_ORDER
46 int main (int argc, char **argv)
53 bibset = ccl_qual_mk ();
65 bib_fname = argv[0]+2;
73 fprintf (stderr, "%s: missing bib filename\n", prog);
76 bib_inf = fopen (bib_fname, "r");
79 fprintf (stderr, "%s: cannot open %s\n", prog,
83 ccl_qual_file (bibset, bib_inf);
87 fprintf (stderr, "%s: unknown option '%s'\n",
94 fprintf (stderr, "%s: no filenames, please\n", prog);
102 struct ccl_rpn_node *rpn;
104 printf ("CCLSH>"); fflush (stdout);
105 if (!fgets (buf, 79, stdin))
107 rpn = ccl_find_str (bibset, buf, &error, &pos);
110 printf ("%*s^ - ", 6+pos, " ");
111 printf ("%s\n", ccl_err_msg (error));