X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dfa%2Freadfile.c;h=cd40c926c6d9e192862278800b0d6869b05df1fb;hb=cc4fcee50354f71ed32a586de6d226b61139819e;hp=d28bbd2b61a8e7bf0734b638a01df5ea0c0322d8;hpb=b879b04a092d5b00cc866cf16f755e55053d2e89;p=idzebra-moved-to-github.git diff --git a/dfa/readfile.c b/dfa/readfile.c index d28bbd2..cd40c92 100644 --- a/dfa/readfile.c +++ b/dfa/readfile.c @@ -1,10 +1,20 @@ /* - * Copyright (C) 1994, Index Data I/S + * Copyright (C) 1994-1999, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: readfile.c,v $ - * Revision 1.5 1995-09-04 12:33:27 adam + * Revision 1.8 1999-02-02 14:50:12 adam + * Updated WIN32 code specific sections. Changed header. + * + * Revision 1.7 1996/10/29 13:57:28 adam + * Include of zebrautl.h instead of alexutil.h. + * + * Revision 1.6 1996/01/08 09:09:21 adam + * Function dfa_parse got 'const' string argument. + * New functions to define char mappings made public. + * + * Revision 1.5 1995/09/04 12:33:27 adam * Various cleanup. YAZ util used instead. * * Revision 1.4 1995/01/25 11:30:51 adam @@ -30,7 +40,7 @@ #include #include -#include +#include #include #include "lexer.h" @@ -88,6 +98,7 @@ static void read_defs (void) static void read_rules (struct DFA *dfa) { char *s; + const char *sc; int i; int no = 0; @@ -106,7 +117,8 @@ static void read_rules (struct DFA *dfa) /* preprocess regular expression */ prep (&s); /* now parse regular expression */ - i = dfa_parse (dfa, &s); + sc = s; + i = dfa_parse (dfa, &sc); if (i) { fprintf (stderr, "%s #%d: regular expression syntax error\n", @@ -121,9 +133,9 @@ static void read_rules (struct DFA *dfa) no++; fprintf (outf, "\tcase %d:\n#line %d\n\t\t", no, line_no); } - while (*s == '\t' || *s == ' ') - s++; - fputs (s, outf); + while (*sc == '\t' || *sc == ' ') + sc++; + fputs (sc, outf); } } fputs ("\tYY_BREAK\n\t}\n}\n", outf);