2 * Copyright (C) 1994, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.2 1994-09-28 13:07:08 adam
8 * Use log_mask_str now.
10 * Revision 1.1 1994/09/16 15:39:11 adam
11 * Initial code of lookup - not tested yet.
25 int main (int argc, char **argv)
29 char *inputfile = NULL;
34 while ((ret = options ("vh", argv, argc, &arg)) != -2)
42 log (LOG_FATAL, "too many files specified\n");
48 log_init (log_mask_str(arg), prog, NULL);
52 fprintf (stderr, "usage:\n"
53 " %s [-h] [-v n] [file]\n", prog);
58 log (LOG_FATAL, "unknown option");
64 ipf = fopen (inputfile, "r");
67 log (LOG_FATAL|LOG_ERRNO, "cannot open '%s'", inputfile);
71 while (fgets (ipf_buf, 1023, ipf))
73 char *ipf_ptr = ipf_buf;
74 for (;*ipf_ptr && *ipf_ptr != '\n';ipf_ptr++)
76 if (isalpha(*ipf_ptr) || *ipf_ptr == '_')
79 while (ipf_ptr[i] && (isalnum(ipf_ptr[i]) ||
84 printf ("%s\n", ipf_ptr);