2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.1 1994-09-16 15:39:11 adam
8 * Initial code of lookup - not tested yet.
22 int main (int argc, char **argv)
26 char *inputfile = NULL;
31 while ((ret = options ("vh", argv, argc, &arg)) != -2)
39 log (LOG_FATAL, "too many files specified\n");
45 log_init (atoi(arg), prog, NULL);
49 fprintf (stderr, "usage:\n"
50 " %s [-h] [-v n] [file]\n", prog);
55 log (LOG_FATAL, "unknown option");
61 ipf = fopen (inputfile, "r");
64 log (LOG_FATAL|LOG_ERRNO, "cannot open '%s'", inputfile);
68 while (fgets (ipf_buf, 1023, ipf))
70 char *ipf_ptr = ipf_buf;
71 for (;*ipf_ptr && *ipf_ptr != '\n';ipf_ptr++)
73 if (isalpha(*ipf_ptr) || *ipf_ptr == '_')
76 while (ipf_ptr[i] && (isalnum(ipf_ptr[i]) ||
81 printf ("%s\n", ipf_ptr);