2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1994-08-16 16:26:47 adam
22 int main (int argc, char **argv)
24 const char *name = NULL;
25 const char *inputfile = NULL;
35 fprintf (stderr, "usage:\n"
36 " %s [-v n] [-i f] [-w] [-c n] file\n", prog);
39 while ((ret = options ("v:i:wc:", argv, argc, &arg)) != -2)
45 fprintf (stderr, "%s: too many files specified\n", prog);
67 fprintf (stderr, "%s: unknown option\n", prog);
73 fprintf (stderr, "%s: no dictionary file given\n", prog);
76 dict = dict_open (name, cache, rw);
79 fprintf (stderr, "%s: dict_open fail\n", prog);
89 if (!(ipf = fopen(inputfile, "r")))
91 fprintf (stderr, "%s: cannot open %s\n", prog, inputfile);
95 while (fgets (ipf_buf, 255, ipf))
104 dict_insert (dict, word, &line);