projects
/
gnulib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cada80c
)
Sync to the slightly more general version of GNU tar.
author
Jim Meyering
<jim@meyering.net>
Wed, 12 Jan 2000 06:37:30 +0000
(06:37 +0000)
committer
Jim Meyering
<jim@meyering.net>
Wed, 12 Jan 2000 06:37:30 +0000
(06:37 +0000)
lib/exclude.c
patch
|
blob
|
history
lib/exclude.h
patch
|
blob
|
history
diff --git
a/lib/exclude.c
b/lib/exclude.c
index
ebb599c
..
1925a39
100644
(file)
--- a/
lib/exclude.c
+++ b/
lib/exclude.c
@@
-1,5
+1,5
@@
/* exclude.c -- exclude file names
/* exclude.c -- exclude file names
- Copyright 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1997
, 1999, 2000
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-54,14
+54,14
@@
new_exclude (void)
}
int
}
int
-excluded_filename (struct exclude const *ex, char const *f)
+excluded_filename (struct exclude const *ex, char const *f
, int options
)
{
char const * const *exclude = ex->exclude;
int exclude_count = ex->exclude_count;
int i;
for (i = 0; i < exclude_count; i++)
{
char const * const *exclude = ex->exclude;
int exclude_count = ex->exclude_count;
int i;
for (i = 0; i < exclude_count; i++)
- if (fnmatch (exclude[i], f,
0
) == 0)
+ if (fnmatch (exclude[i], f,
options
) == 0)
return 1;
return 0;
return 1;
return 0;
@@
-79,7
+79,8
@@
add_exclude (struct exclude *ex, char const *pattern)
}
int
}
int
-add_exclude_file (struct exclude *ex, char const *filename, char line_end)
+add_exclude_file (void (*add_func) PARAMS ((struct exclude *, char const *)),
+ struct exclude *ex, char const *filename, char line_end)
{
int use_stdin = filename[0] == '-' && !filename[1];
FILE *in;
{
int use_stdin = filename[0] == '-' && !filename[1];
FILE *in;
@@
-118,7
+119,7
@@
add_exclude_file (struct exclude *ex, char const *filename, char line_end)
if (p < lim ? *p == line_end : buf < p && p[-1])
{
*p = '\0';
if (p < lim ? *p == line_end : buf < p && p[-1])
{
*p = '\0';
-
add_exclude
(ex, pattern);
+
(*add_func)
(ex, pattern);
pattern = p + 1;
}
pattern = p + 1;
}
diff --git
a/lib/exclude.h
b/lib/exclude.h
index
e783f24
..
8a48a00
100644
(file)
--- a/
lib/exclude.h
+++ b/
lib/exclude.h
@@
-1,5
+1,5
@@
/* exclude.h -- declarations for excluding file names
/* exclude.h -- declarations for excluding file names
- Copyright 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1997
, 1999
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-30,5
+30,6
@@
struct exclude;
struct exclude *new_exclude PARAMS ((void));
void add_exclude PARAMS ((struct exclude *, char const *));
struct exclude *new_exclude PARAMS ((void));
void add_exclude PARAMS ((struct exclude *, char const *));
-int add_exclude_file PARAMS ((struct exclude *, char const *, char));
-int excluded_filename PARAMS ((struct exclude const *, char const *));
+int add_exclude_file PARAMS ((void (*) (struct exclude *, char const *),
+ struct exclude *, char const *, char));
+int excluded_filename PARAMS ((struct exclude const *, char const *, int));