VirtualBox

source: kBuild/vendor/grep/current/lib/exclude.h@ 3530

Last change on this file since 3530 was 3529, checked in by bird, 3 years ago

Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1/* exclude.h -- declarations for excluding file names
2
3 Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2021 Free
4 Software Foundation, Inc.
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18
19#ifndef _GL_EXCLUDE_H
20#define _GL_EXCLUDE_H 1
21
22#include <stdbool.h>
23#include <stdio.h>
24
25/* Written by Paul Eggert <[email protected]>
26 and Sergey Poznyakoff <[email protected]> */
27
28/* Exclude options, which can be ORed with fnmatch options. */
29
30/* Patterns must match the start of file names, instead of matching
31 anywhere after a '/'. */
32#define EXCLUDE_ANCHORED (1 << 30)
33
34/* Include instead of exclude. */
35#define EXCLUDE_INCLUDE (1 << 29)
36
37/* '?', '*', '[', and '\\' are special in patterns. Without this
38 option, these characters are ordinary and fnmatch is not used. */
39#define EXCLUDE_WILDCARDS (1 << 28)
40
41/* Patterns are POSIX extended regular expressions */
42#define EXCLUDE_REGEX (1 << 27)
43
44/* Allocate storage for the pattern */
45#define EXCLUDE_ALLOC (1 << 26)
46
47struct exclude;
48
49bool fnmatch_pattern_has_wildcards (const char *, int) _GL_ATTRIBUTE_PURE;
50
51void free_exclude (struct exclude *)
52 _GL_ATTRIBUTE_NONNULL ((1));
53struct exclude *new_exclude (void)
54 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_RETURNS_NONNULL
55 _GL_ATTRIBUTE_DEALLOC (free_exclude, 1);
56void add_exclude (struct exclude *, char const *, int);
57int add_exclude_file (void (*) (struct exclude *, char const *, int),
58 struct exclude *, char const *, int, char);
59int add_exclude_fp (void (*) (struct exclude *, char const *, int, void *),
60 struct exclude *, FILE *, int, char, void *);
61bool excluded_file_name (struct exclude const *, char const *);
62void exclude_add_pattern_buffer (struct exclude *ex, char *buf);
63bool exclude_fnmatch (char const *, char const *, int);
64
65#endif /* _GL_EXCLUDE_H */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette