1170754Sdelphij/* exclude.h -- declarations for excluding file names 2170754Sdelphij 3170754Sdelphij Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003 Free 4170754Sdelphij Software Foundation, Inc. 5170754Sdelphij 6170754Sdelphij This program is free software; you can redistribute it and/or modify 7170754Sdelphij it under the terms of the GNU General Public License as published by 8170754Sdelphij the Free Software Foundation; either version 2, or (at your option) 9170754Sdelphij any later version. 10170754Sdelphij 11170754Sdelphij This program is distributed in the hope that it will be useful, 12170754Sdelphij but WITHOUT ANY WARRANTY; without even the implied warranty of 13170754Sdelphij MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14170754Sdelphij GNU General Public License for more details. 15170754Sdelphij 16170754Sdelphij You should have received a copy of the GNU General Public License 17170754Sdelphij along with this program; see the file COPYING. 18170754Sdelphij If not, write to the Free Software Foundation, 19170754Sdelphij 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 20170754Sdelphij 21170754Sdelphij/* Written by Paul Eggert <eggert@twinsun.com> */ 22170754Sdelphij 23170754Sdelphij/* Exclude options, which can be ORed with fnmatch options. */ 24170754Sdelphij 25170754Sdelphij/* Patterns must match the start of file names, instead of matching 26170754Sdelphij anywhere after a '/'. */ 27170754Sdelphij#define EXCLUDE_ANCHORED (1 << 30) 28170754Sdelphij 29170754Sdelphij/* Include instead of exclude. */ 30170754Sdelphij#define EXCLUDE_INCLUDE (1 << 29) 31170754Sdelphij 32170754Sdelphij/* '?', '*', '[', and '\\' are special in patterns. Without this 33170754Sdelphij option, these characters are ordinary and fnmatch is not used. */ 34170754Sdelphij#define EXCLUDE_WILDCARDS (1 << 28) 35170754Sdelphij 36170754Sdelphijstruct exclude; 37170754Sdelphij 38170754Sdelphijstruct exclude *new_exclude (void); 39170754Sdelphijvoid free_exclude (struct exclude *); 40170754Sdelphijvoid add_exclude (struct exclude *, char const *, int); 41170754Sdelphijint add_exclude_file (void (*) (struct exclude *, char const *, int), 42170754Sdelphij struct exclude *, char const *, int, char); 43170754Sdelphijbool excluded_filename (struct exclude const *, char const *); 44