Mercurial > hg > octave-kai > gnulib-hg
annotate lib/exclude.h @ 7040:e97a4de675a6
* stdio--.h (tmpfile): Make safer.
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sun, 23 Jul 2006 18:50:12 +0000 |
parents | 47b6eeb68e9e |
children | bbbbbf4cd1c5 |
rev | line source |
---|---|
1171 | 1 /* exclude.h -- declarations for excluding file names |
4076
c9f986ba634e
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
Paul Eggert <eggert@cs.ucla.edu>
parents:
3399
diff
changeset
|
2 |
6804
47b6eeb68e9e
(excluded_file_name): New prototype
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
5907
diff
changeset
|
3 Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003, 2005, |
47b6eeb68e9e
(excluded_file_name): New prototype
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
5907
diff
changeset
|
4 2006 Free Software Foundation, Inc. |
1171 | 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 2, or (at your option) | |
9 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; see the file COPYING. | |
18 If not, write to the Free Software Foundation, | |
5848
a48fb0e98c8c
*** empty log message ***
Paul Eggert <eggert@cs.ucla.edu>
parents:
4291
diff
changeset
|
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ |
1171 | 20 |
21 /* Written by Paul Eggert <eggert@twinsun.com> */ | |
22 | |
3399
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
23 /* Exclude options, which can be ORed with fnmatch options. */ |
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
24 |
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
25 /* Patterns must match the start of file names, instead of matching |
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
26 anywhere after a '/'. */ |
4076
c9f986ba634e
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
Paul Eggert <eggert@cs.ucla.edu>
parents:
3399
diff
changeset
|
27 #define EXCLUDE_ANCHORED (1 << 30) |
3399
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
28 |
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
29 /* Include instead of exclude. */ |
4076
c9f986ba634e
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
Paul Eggert <eggert@cs.ucla.edu>
parents:
3399
diff
changeset
|
30 #define EXCLUDE_INCLUDE (1 << 29) |
3399
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
31 |
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
32 /* '?', '*', '[', and '\\' are special in patterns. Without this |
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
33 option, these characters are ordinary and fnmatch is not used. */ |
4076
c9f986ba634e
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
Paul Eggert <eggert@cs.ucla.edu>
parents:
3399
diff
changeset
|
34 #define EXCLUDE_WILDCARDS (1 << 28) |
3399
eb2cfe9a0e30
(EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
Jim Meyering <jim@meyering.net>
parents:
2807
diff
changeset
|
35 |
1171 | 36 struct exclude; |
37 | |
4291
4b34ec53b686
(PARAMS): Remove definition and uses.
Jim Meyering <jim@meyering.net>
parents:
4076
diff
changeset
|
38 struct exclude *new_exclude (void); |
4b34ec53b686
(PARAMS): Remove definition and uses.
Jim Meyering <jim@meyering.net>
parents:
4076
diff
changeset
|
39 void free_exclude (struct exclude *); |
4b34ec53b686
(PARAMS): Remove definition and uses.
Jim Meyering <jim@meyering.net>
parents:
4076
diff
changeset
|
40 void add_exclude (struct exclude *, char const *, int); |
4b34ec53b686
(PARAMS): Remove definition and uses.
Jim Meyering <jim@meyering.net>
parents:
4076
diff
changeset
|
41 int add_exclude_file (void (*) (struct exclude *, char const *, int), |
4b34ec53b686
(PARAMS): Remove definition and uses.
Jim Meyering <jim@meyering.net>
parents:
4076
diff
changeset
|
42 struct exclude *, char const *, int, char); |
5907 | 43 bool excluded_file_name (struct exclude const *, char const *); |
6804
47b6eeb68e9e
(excluded_file_name): New prototype
Sergey Poznyakoff <gray@gnu.org.ua>
parents:
5907
diff
changeset
|
44 bool exclude_fnmatch (char const *pattern, char const *f, int options); |