1*75f6d617Schristos /* $NetBSD: exclude.h,v 1.1.1.1 2016/01/13 03:15:30 christos Exp $ */ 2*75f6d617Schristos 3*75f6d617Schristos /* exclude.h -- declarations for excluding file names 4*75f6d617Schristos Copyright 1992, 1993, 1994, 1997, 1999, 2001 Free Software Foundation, Inc. 5*75f6d617Schristos 6*75f6d617Schristos This program is free software; you can redistribute it and/or modify 7*75f6d617Schristos it under the terms of the GNU General Public License as published by 8*75f6d617Schristos the Free Software Foundation; either version 2, or (at your option) 9*75f6d617Schristos any later version. 10*75f6d617Schristos 11*75f6d617Schristos This program is distributed in the hope that it will be useful, 12*75f6d617Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 13*75f6d617Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*75f6d617Schristos GNU General Public License for more details. 15*75f6d617Schristos 16*75f6d617Schristos You should have received a copy of the GNU General Public License 17*75f6d617Schristos along with this program; see the file COPYING. 18*75f6d617Schristos If not, write to the Free Software Foundation, 19*75f6d617Schristos 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 20*75f6d617Schristos 21*75f6d617Schristos /* Written by Paul Eggert <eggert@twinsun.com> */ 22*75f6d617Schristos 23*75f6d617Schristos #ifndef PARAMS 24*75f6d617Schristos # if defined PROTOTYPES || (defined __STDC__ && __STDC__) 25*75f6d617Schristos # define PARAMS(Args) Args 26*75f6d617Schristos # else 27*75f6d617Schristos # define PARAMS(Args) () 28*75f6d617Schristos # endif 29*75f6d617Schristos #endif 30*75f6d617Schristos 31*75f6d617Schristos /* Exclude options, which can be ORed with fnmatch options. */ 32*75f6d617Schristos 33*75f6d617Schristos /* Patterns must match the start of file names, instead of matching 34*75f6d617Schristos anywhere after a '/'. */ 35*75f6d617Schristos #define EXCLUDE_ANCHORED (1 << 5) 36*75f6d617Schristos 37*75f6d617Schristos /* Include instead of exclude. */ 38*75f6d617Schristos #define EXCLUDE_INCLUDE (1 << 6) 39*75f6d617Schristos 40*75f6d617Schristos /* '?', '*', '[', and '\\' are special in patterns. Without this 41*75f6d617Schristos option, these characters are ordinary and fnmatch is not used. */ 42*75f6d617Schristos #define EXCLUDE_WILDCARDS (1 << 7) 43*75f6d617Schristos 44*75f6d617Schristos struct exclude; 45*75f6d617Schristos 46*75f6d617Schristos struct exclude *new_exclude PARAMS ((void)); 47*75f6d617Schristos void free_exclude PARAMS ((struct exclude *)); 48*75f6d617Schristos void add_exclude PARAMS ((struct exclude *, char const *, int)); 49*75f6d617Schristos int add_exclude_file PARAMS ((void (*) (struct exclude *, char const *, int), 50*75f6d617Schristos struct exclude *, char const *, int, char)); 51*75f6d617Schristos bool excluded_filename PARAMS ((struct exclude const *, char const *)); 52