projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump year to 2015
[idzebra-moved-to-github.git]
/
dfa
/
agrep.c
diff --git
a/dfa/agrep.c
b/dfa/agrep.c
index
22894a1
..
23014c0
100644
(file)
--- a/
dfa/agrep.c
+++ b/
dfa/agrep.c
@@
-1,8
+1,5
@@
-/* $Id: agrep.c,v 1.18 2006-08-14 10:40:08 adam Exp $
- Copyright (C) 1995-2006
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ 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
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
@@
-21,6
+18,9
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
@@
-60,9
+60,7
@@
void error (const char *format, ...)
static int show_lines = 0;
static int show_lines = 0;
-int agrep_options (argc, argv)
-int argc;
-char **argv;
+int agrep_options (int argc, char **argv)
{
while (--argc > 0)
if (**++argv == '-')
{
while (--argc > 0)
if (**++argv == '-')
@@
-112,8
+110,7
@@
static char *inf_buf;
static char *inf_ptr, *inf_flsh;
static int inf_eof, line_no;
static char *inf_ptr, *inf_flsh;
static int inf_eof, line_no;
-static int inf_flush (fd)
-int fd;
+static int inf_flush (int fd)
{
char *p;
unsigned b, r;
{
char *p;
unsigned b, r;
@@
-143,8
+140,7
@@
int fd;
return 0;
}
return 0;
}
-static char *prline (p)
-char *p;
+static char *prline (char *p)
{
char *p0;
{
char *p0;
@@
-163,9
+159,7
@@
char *p;
return p;
}
return p;
}
-static int go (fd, dfaar)
-int fd;
-struct DFA_state **dfaar;
+static int go (int fd, struct DFA_state **dfaar)
{
struct DFA_state *s = dfaar[0];
struct DFA_tran *t;
{
struct DFA_state *s = dfaar[0];
struct DFA_tran *t;
@@
-190,7
+184,7
@@
struct DFA_state **dfaar;
break;
}
for (t=s->trans, i=s->tran_no; --i >= 0; t++)
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++;
&& (unsigned) *p <= t->ch[1])
break;
p++;
@@
-220,9
+214,7
@@
struct DFA_state **dfaar;
return 0;
}
return 0;
}
-int agrep (dfas, fd)
-struct DFA_state **dfas;
-int fd;
+int agrep (struct DFA_state **dfas, int fd)
{
inf_buf = imalloc (sizeof(char)*INF_BUF_SIZE);
inf_eof = 0;
{
inf_buf = imalloc (sizeof(char)*INF_BUF_SIZE);
inf_eof = 0;
@@
-237,9
+229,7
@@
int fd;
}
}
-int main (argc, argv)
-int argc;
-char **argv;
+int main (int argc, char **argv)
{
const char *pattern = NULL;
char outbuf[BUFSIZ];
{
const char *pattern = NULL;
char outbuf[BUFSIZ];
@@
-302,6
+292,7
@@
char **argv;
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab