Line
Link Here
|
0 |
-- grep-2.6.1/lib/exclude.c.orig |
0 |
++ grep-2.6.1/lib/exclude.c |
Lines 342-348
Link Here
|
342 |
{ |
342 |
{ |
343 |
char const *pattern = exclude[i].pattern; |
343 |
char const *pattern = exclude[i].pattern; |
344 |
int options = exclude[i].options; |
344 |
int options = exclude[i].options; |
345 |
if (excluded != exclude_fnmatch (pattern, f, options)) |
345 |
if (exclude_fnmatch (pattern, f, options)) |
346 |
return !excluded; |
346 |
return !excluded; |
347 |
} |
347 |
} |
348 |
return excluded; |
348 |
return excluded; |
349 |
-- grep-2.6.1/lib/savedir.c.orig |
349 |
++ grep-2.6.1/lib/savedir.c |
Lines 48-54
Link Here
|
48 |
size_t dirlen = strlen (dir); |
48 |
size_t dirlen = strlen (dir); |
49 |
size_t filelen = strlen (file); |
49 |
size_t filelen = strlen (file); |
50 |
|
50 |
|
51 |
while (dirlen && path[dirlen - 1] == '/') |
51 |
while (dirlen && dir[dirlen - 1] == '/') |
52 |
dirlen--; |
52 |
dirlen--; |
53 |
|
53 |
|
54 |
if ((dirlen + filelen + 2) > pathlen) |
54 |
if ((dirlen + filelen + 2) > pathlen) |
Lines 112-118
Link Here
|
112 |
&& !isdir1 (dir, dp->d_name)) |
112 |
&& !isdir1 (dir, dp->d_name)) |
113 |
{ |
113 |
{ |
114 |
if (included_patterns |
114 |
if (included_patterns |
115 |
&& !excluded_file_name (included_patterns, dp->d_name)) |
115 |
&& excluded_file_name (included_patterns, dp->d_name)) |
116 |
continue; |
116 |
continue; |
117 |
if (excluded_patterns |
117 |
if (excluded_patterns |
118 |
&& excluded_file_name (excluded_patterns, dp->d_name)) |
118 |
&& excluded_file_name (excluded_patterns, dp->d_name)) |
119 |
-- grep-2.6.1/src/main.c.orig |
119 |
++ grep-2.6.1/src/main.c |
Lines 2066-2072
Link Here
|
2066 |
case INCLUDE_OPTION: |
2066 |
case INCLUDE_OPTION: |
2067 |
if (!included_patterns) |
2067 |
if (!included_patterns) |
2068 |
included_patterns = new_exclude (); |
2068 |
included_patterns = new_exclude (); |
2069 |
add_exclude (included_patterns, optarg, EXCLUDE_INCLUDE); |
2069 |
add_exclude (included_patterns, optarg, EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS); |
2070 |
break; |
2070 |
break; |
2071 |
|
2071 |
|
2072 |
case GROUP_SEPARATOR_OPTION: |
2072 |
case GROUP_SEPARATOR_OPTION: |