]> git.cworth.org Git - tar/blob - gnu/exclude.h
upstream: Fix extraction of device nodes.
[tar] / gnu / exclude.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* exclude.h -- declarations for excluding file names
4
5    Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003, 2005, 2006,
6    2009, 2010 Free Software Foundation, Inc.
7
8    This program is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 3 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20
21 #ifndef _GL_EXCLUDE_H
22 #define _GL_EXCLUDE_H 1
23
24 #include <stdbool.h>
25
26 /* Written by Paul Eggert <eggert@twinsun.com>
27    and Sergey Poznyakoff <gray@gnu.org> */
28
29 /* Exclude options, which can be ORed with fnmatch options.  */
30
31 /* Patterns must match the start of file names, instead of matching
32    anywhere after a '/'.  */
33 #define EXCLUDE_ANCHORED (1 << 30)
34
35 /* Include instead of exclude.  */
36 #define EXCLUDE_INCLUDE (1 << 29)
37
38 /* '?', '*', '[', and '\\' are special in patterns.  Without this
39    option, these characters are ordinary and fnmatch is not used.  */
40 #define EXCLUDE_WILDCARDS (1 << 28)
41
42 struct exclude;
43
44 bool fnmatch_pattern_has_wildcards (const char *, int);
45
46 struct exclude *new_exclude (void);
47 void free_exclude (struct exclude *);
48 void add_exclude (struct exclude *, char const *, int);
49 int add_exclude_file (void (*) (struct exclude *, char const *, int),
50                       struct exclude *, char const *, int, char);
51 bool excluded_file_name (struct exclude const *, char const *);
52 bool exclude_fnmatch (char const *pattern, char const *f, int options);
53
54 #endif /* _GL_EXCLUDE_H */