1 /* grep.h - interface to grep driver for searching subroutines.
2 Copyright (C) 1992, 1998 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 /* $FreeBSD: src/gnu/usr.bin/grep/grep.h,v 1.5 2000/01/04 03:25:40 obrien Exp $ */
20 /* $DragonFly: src/gnu/usr.bin/grep/grep.h,v 1.2 2003/06/17 06:25:45 dillon Exp $ */
22 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
23 # define __attribute__(x)
26 extern void fatal
PARAMS ((const char *, int)) __attribute__((noreturn
));
27 extern char *xmalloc
PARAMS ((size_t size
));
28 extern char *xrealloc
PARAMS ((char *ptr
, size_t size
));
30 /* Grep.c expects the matchers vector to be terminated
31 by an entry with a NULL name, and to contain at least
32 an entry named "default". */
37 void (*compile
) PARAMS ((char *, size_t));
38 char *(*execute
) PARAMS ((char *, size_t, char **));
41 /* Exported from fgrepmat.c, egrepmat.c, grepmat.c. */
42 extern char const *matcher
;
44 /* The following flags are exported from grep for the matchers
46 extern int match_icase
; /* -i */
47 extern int match_words
; /* -w */
48 extern int match_lines
; /* -x */
49 extern unsigned char eolbyte
; /* -z */