1 /* Pattern Matchers - Common Utilities.
2 Copyright (C) 1992, 1998, 2000, 2005 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 Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23 #if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC
24 /* We can handle multibyte string. */
30 #define NCHAR (UCHAR_MAX + 1)
32 struct compiled_kwset
{
41 kwsinit (struct compiled_kwset
*ckwset
,
42 bool match_icase
, bool match_words
, bool match_lines
,
47 check_multibyte_string (const char *buf
, size_t buf_size
);
50 #define IS_WORD_CONSTITUENT(C) (ISALNUM(C) || (C) == '_')