153451Speter/* grep.h - interface to grep driver for searching subroutines. 2131557Stjr Copyright (C) 1992, 1998, 2001 Free Software Foundation, Inc. 353451Speter 453451Speter This program is free software; you can redistribute it and/or modify 553451Speter it under the terms of the GNU General Public License as published by 653451Speter the Free Software Foundation; either version 2, or (at your option) 753451Speter any later version. 853451Speter 953451Speter This program is distributed in the hope that it will be useful, 1053451Speter but WITHOUT ANY WARRANTY; without even the implied warranty of 1153451Speter MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1253451Speter GNU General Public License for more details. 1353451Speter 1453451Speter You should have received a copy of the GNU General Public License 1553451Speter along with this program; if not, write to the Free Software 1653475Sobrien Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1753475Sobrien 02111-1307, USA. */ 1853451Speter 1953475Sobrien/* $FreeBSD: releng/11.0/gnu/usr.bin/grep/grep.h 146199 2005-05-14 03:02:22Z tjr $ */ 2053451Speter 2153475Sobrien#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__ 2253475Sobrien# define __attribute__(x) 2353475Sobrien#endif 2453451Speter 2553451Speter/* Grep.c expects the matchers vector to be terminated 26131557Stjr by an entry with a NULL compile, and to contain at least 2753451Speter an entry named "default". */ 2853451Speter 2953451Speterextern struct matcher 3053451Speter{ 31131557Stjr char name[8]; 32131557Stjr void (*compile) PARAMS ((char const *, size_t)); 33146199Stjr size_t (*execute) PARAMS ((char const *, size_t, size_t *, int)); 34131557Stjr} const matchers[]; 3553451Speter 3655379Sobrien/* Exported from fgrepmat.c, egrepmat.c, grepmat.c. */ 3753475Sobrienextern char const *matcher; 3853451Speter 3953451Speter/* The following flags are exported from grep for the matchers 4053451Speter to look at. */ 4153451Speterextern int match_icase; /* -i */ 4253451Speterextern int match_words; /* -w */ 4353451Speterextern int match_lines; /* -x */ 4455379Sobrienextern unsigned char eolbyte; /* -z */ 45