X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dfa%2Fgrepper.c;h=cefb2f6e58f610e2b3345404600876ecb0cbea6d;hb=062978fe7432da086bd0cb468149d88d1b6414cf;hp=1c515548da5a88ec6b58539c06163c717c1a2fb6;hpb=6f5101be21e854a5125b489a03814cc7509236cc;p=idzebra-moved-to-github.git diff --git a/dfa/grepper.c b/dfa/grepper.c index 1c51554..cefb2f6 100644 --- a/dfa/grepper.c +++ b/dfa/grepper.c @@ -4,7 +4,14 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: grepper.c,v $ - * Revision 1.4 1995-01-24 16:00:21 adam + * 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 +31,7 @@ #include #include -#include +#include #include #include "imalloc.h" @@ -326,7 +333,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 +354,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 +405,7 @@ int main (int argc, char **argv) } else { - log (LOG_FATAL, "Unknown option '-%s'", arg); + logf (LOG_FATAL, "Unknown option '-%s'", arg); exit (1); } }