X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=dfa%2Fagrep.c;h=504b50ab71b85d309b6e2b8eefa9ec7a7998fe24;hp=c57d5617e4da1c47605d395c34ab72cbf748fd5c;hb=20e2d608e0cd383054e627db00264388affb58cd;hpb=97a7adeb9e5059463f039495cc01cfa448463a27 diff --git a/dfa/agrep.c b/dfa/agrep.c index c57d561..504b50a 100644 --- a/dfa/agrep.c +++ b/dfa/agrep.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1995-2008 Index Data + Copyright (C) 1994-2011 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -18,6 +18,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -181,7 +184,7 @@ static int go (int fd, struct DFA_state **dfaar) break; } for (t=s->trans, i=s->tran_no; --i >= 0; t++) - if ((unsigned) *p >= t->ch[0] + if ((unsigned) *p >= t->ch[0] && (unsigned) *p <= t->ch[1]) break; p++; @@ -289,6 +292,7 @@ int main (int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab