The Samba-Bugzilla – Attachment 985 Details for
Bug 2240
Add last-match/short-circuit processing of include/exclude
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add optional last-match parsing
last-match.patch (text/plain), 1.28 KB, created by
Wayne Davison
on 2005-02-25 10:00:32 UTC
(
hide
)
Description:
Add optional last-match parsing
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2005-02-25 10:00:32 UTC
Size:
1.28 KB
patch
obsolete
>--- exclude.c 20 Feb 2005 17:04:53 -0000 1.112 >+++ exclude.c 25 Feb 2005 16:50:24 -0000 >@@ -73,6 +73,7 @@ static BOOL parent_dirscan = False; > static struct filter_struct **mergelist_parents; > static int mergelist_cnt = 0; > static int mergelist_size = 0; >+static int reversing_file = 0; > > /* Each filter_list_struct describes a singly-linked list by keeping track > * of both the head and tail pointers. The list is slightly unusual in that >@@ -231,6 +232,9 @@ static void add_rule(struct filter_list_ > if (!listp->tail) { > ret->next = listp->head; > listp->head = listp->tail = ret; >+ } else if (reversing_file) { >+ ret->next = listp->head; >+ listp->head = ret; > } else { > ret->next = listp->tail->next; > listp->tail->next = ret; >@@ -1017,6 +1021,10 @@ void parse_filter_file(struct filter_lis > s = line; > } > *s = '\0'; >+ if (*line == '[' && strcmp(line+1, "last-match]") == 0) { >+ reversing_file = 1; >+ continue; >+ } > /* Skip an empty token and (when line parsing) comments. */ > if (*line && (word_split || (*line != ';' && *line != '#'))) > parse_rule(listp, line, mflags, xflags); >@@ -1024,6 +1032,7 @@ void parse_filter_file(struct filter_lis > break; > } > fclose(fp); >+ reversing_file = 0; > } > > /* If the "for_xfer" flag is set, the prefix is made compatible with the
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2240
:
887
| 985