/* This file is part of the Zebra server.
- Copyright (C) 1994-2011 Index Data
+ Copyright (C) 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
#define INFBUF_SIZE 16384
-#define INLINE
+#define INLINE
static INLINE void set_bit (MatchContext *mc, MatchWord *m, int ch, int state)
{
mc->n = (dfa->no_states+WORD_BITS) / WORD_BITS;
mc->range = range;
mc->Sc = icalloc (sizeof(*mc->Sc) * 256 * mc->n);
-
+
for (i=0; i<dfa->no_states; i++)
{
int j;
int ch0 = state->trans[j].ch[0];
int ch1 = state->trans[j].ch[1];
assert (ch0 >= 0 && ch1 >= 0);
-
+
for (ch = ch0; ch <= ch1; ch++)
set_bit (mc, mc->Sc, ch, i);
}
while ((ch = getc (inf)) != EOF)
{
MatchWord *Rj_t;
-
+
infbuf[inf_ptr] = ch;
if (ch == '\n')
{
}
else
inf = stdin;
-
+
mc = mk_MatchContext (dfa, range);
go (mc, dfa, inf);