118fd37a7SXin LI /* exclude.h -- declarations for excluding file names 218fd37a7SXin LI 318fd37a7SXin LI Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003 Free 418fd37a7SXin LI Software Foundation, Inc. 518fd37a7SXin LI 618fd37a7SXin LI This program is free software; you can redistribute it and/or modify 718fd37a7SXin LI it under the terms of the GNU General Public License as published by 818fd37a7SXin LI the Free Software Foundation; either version 2, or (at your option) 918fd37a7SXin LI any later version. 1018fd37a7SXin LI 1118fd37a7SXin LI This program is distributed in the hope that it will be useful, 1218fd37a7SXin LI but WITHOUT ANY WARRANTY; without even the implied warranty of 1318fd37a7SXin LI MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1418fd37a7SXin LI GNU General Public License for more details. 1518fd37a7SXin LI 1618fd37a7SXin LI You should have received a copy of the GNU General Public License 1718fd37a7SXin LI along with this program; see the file COPYING. 1818fd37a7SXin LI If not, write to the Free Software Foundation, 1918fd37a7SXin LI 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 2018fd37a7SXin LI 2118fd37a7SXin LI /* Written by Paul Eggert <eggert@twinsun.com> */ 2218fd37a7SXin LI 2318fd37a7SXin LI /* Exclude options, which can be ORed with fnmatch options. */ 2418fd37a7SXin LI 2518fd37a7SXin LI /* Patterns must match the start of file names, instead of matching 2618fd37a7SXin LI anywhere after a '/'. */ 2718fd37a7SXin LI #define EXCLUDE_ANCHORED (1 << 30) 2818fd37a7SXin LI 2918fd37a7SXin LI /* Include instead of exclude. */ 3018fd37a7SXin LI #define EXCLUDE_INCLUDE (1 << 29) 3118fd37a7SXin LI 3218fd37a7SXin LI /* '?', '*', '[', and '\\' are special in patterns. Without this 3318fd37a7SXin LI option, these characters are ordinary and fnmatch is not used. */ 3418fd37a7SXin LI #define EXCLUDE_WILDCARDS (1 << 28) 3518fd37a7SXin LI 3618fd37a7SXin LI struct exclude; 3718fd37a7SXin LI 3818fd37a7SXin LI struct exclude *new_exclude (void); 3918fd37a7SXin LI void free_exclude (struct exclude *); 4018fd37a7SXin LI void add_exclude (struct exclude *, char const *, int); 4118fd37a7SXin LI int add_exclude_file (void (*) (struct exclude *, char const *, int), 4218fd37a7SXin LI struct exclude *, char const *, int, char); 4318fd37a7SXin LI bool excluded_filename (struct exclude const *, char const *); 44