Updated WIN32 code specific sections. Changed header.
[idzebra-moved-to-github.git] / dfa / grepper.c
index 1c51554..d7a858e 100644 (file)
@@ -1,10 +1,23 @@
 /*
- * Copyright (C) 1994, Index Data I/S 
+ * Copyright (C) 1994-1999, Index Data
  * All rights reserved.
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: grepper.c,v $
- * Revision 1.4  1995-01-24 16:00:21  adam
+ * Revision 1.8  1999-02-02 14:50:07  adam
+ * Updated WIN32 code specific sections. Changed header.
+ *
+ * Revision 1.7  1996/10/29 13:57:24  adam
+ * Include of zebrautl.h instead of alexutil.h.
+ *
+ * Revision 1.6  1996/01/08 09:09:20  adam
+ * Function dfa_parse got 'const' string argument.
+ * New functions to define char mappings made public.
+ *
+ * Revision 1.5  1995/09/04  12:33:26  adam
+ * Various cleanup. YAZ util used instead.
+ *
+ * Revision 1.4  1995/01/24  16:00:21  adam
  * Added -ansi to CFLAGS.
  * Some changes to the dfa module.
  *
@@ -24,7 +37,7 @@
 #include <ctype.h>
 #include <assert.h>
 
-#include <util.h>
+#include <zebrautl.h>
 #include <dfa.h>
 #include "imalloc.h"
 
@@ -326,7 +339,7 @@ static int grep_file (struct DFA *dfa, const char *fname, int range)
         inf = fopen (fname, "r");
         if (!inf)
         {
-            log (LOG_FATAL|LOG_ERRNO, "cannot open `%s'", fname);
+            logf (LOG_FATAL|LOG_ERRNO, "cannot open `%s'", fname);
             exit (1);
         }
     }
@@ -347,7 +360,7 @@ int main (int argc, char **argv)
     int ret;
     int range = 0;
     char *arg;
-    char *pattern = NULL;
+    const char *pattern = NULL;
     int no_files = 0;
     struct DFA *dfa = dfa_init();
 
@@ -398,7 +411,7 @@ int main (int argc, char **argv)
         }
         else
         {
-            log (LOG_FATAL, "Unknown option '-%s'", arg);
+            logf (LOG_FATAL, "Unknown option '-%s'", arg);
             exit (1);
         }
     }