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
Added support for specification of staticrank for grs-class of filters.
[idzebra-moved-to-github.git]
/
dfa
/
agrep.c
diff --git
a/dfa/agrep.c
b/dfa/agrep.c
index
a741c1e
..
c0c6173
100644
(file)
--- a/
dfa/agrep.c
+++ b/
dfa/agrep.c
@@
-1,6
+1,6
@@
-/* $Id: agrep.c,v 1.13 2002-08-02 19:26:55 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
- Index Data Aps
+/* $Id: agrep.c,v 1.19 2006-10-29 17:20:00 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.
@@
-15,9
+15,9
@@
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
*/
*/
@@
-32,14
+32,13
@@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <fcntl.h>
#ifdef WIN32
#include <fcntl.h>
#ifdef WIN32
-
#include <io.h>
#include <io.h>
-
-#else
+#endif
+#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <unistd.h>
#endif
-#include <zebrautl.h>
+#include <idzebra/util.h>
#include <dfa.h>
#include "imalloc.h"
#include <dfa.h>
#include "imalloc.h"
@@
-61,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 == '-')
@@
-113,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;
@@
-144,8
+140,7
@@
int fd;
return 0;
}
return 0;
}
-static char *prline (p)
-char *p;
+static char *prline (char *p)
{
char *p0;
{
char *p0;
@@
-164,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;
@@
-221,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;
@@
-238,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];
@@
-300,3
+289,11
@@
char **argv;
dfa_delete (&dfa);
return 0;
}
dfa_delete (&dfa);
return 0;
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+