1 /* search.c - searching subroutines using dfa, kwset and regex for grep. 2 Copyright 1992, 1998, 2000, 2007, 2009-2011 Free Software Foundation, Inc. 3 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 3, or (at your option) 7 any later version. 8 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. 13 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., 51 Franklin Street - Fifth Floor, Boston, MA 17 02110-1301, USA. */ 18 19 #ifndef GREP_SEARCH_H 20 #define GREP_SEARCH_H 1 21 22 #include <config.h> 23 24 #include <sys/types.h> 25 26 #include "mbsupport.h" 27 28 #include <wchar.h> 29 #include <wctype.h> 30 #include <regex.h> 31 32 #include "system.h" 33 #include "error.h" 34 #include "grep.h" 35 #include "kwset.h" 36 #include "xalloc.h" 37 38 /* searchutils.c */ 39 extern void kwsinit (kwset_t *); 40 41 #if MBS_SUPPORT 42 extern char *mbtolower (const char *, size_t *); 43 extern bool is_mb_middle (const char **, const char *, const char *, size_t); 44 #endif 45 46 /* dfasearch.c */ 47 extern void GEAcompile (char const *, size_t, reg_syntax_t); 48 extern size_t EGexecute (char const *, size_t, size_t *, char const *); 49 50 /* kwsearch.c */ 51 extern void Fcompile (char const *, size_t); 52 extern size_t Fexecute (char const *, size_t, size_t *, char const *); 53 54 /* pcresearch.c */ 55 extern void Pcompile (char const *, size_t); 56 extern size_t Pexecute (char const *, size_t, size_t *, char const *); 57 58 #endif /* GREP_SEARCH_H */ 59