Mercurial > hg > octave-kai > gnulib-hg
annotate lib/gl_linked_list.c @ 17160:72f4bab621be
fts: introduce FTS_VERBATIM
This gives clients the option to disable stripping of trailing slashes
from input path names during fts_open initialization.
The recent change v0.0-7611-g3a9002d that made fts_open strip trailing
slashes from input path names had a negative impact on findutils that
relies on the old fts_open behavior to implement POSIX requirement that
each path operand of the find utility shall be evaluated unaltered as it
was provided, including all trailing slash characters.
* lib/fts_.h (FTS_VERBATIM): New bit flag.
(FTS_OPTIONMASK, FTS_NAMEONLY, FTS_STOP): Adjust.
* lib/fts.c (fts_open): Honor it.
author | Dmitry V. Levin <ldv@altlinux.org> |
---|---|
date | Sun, 18 Nov 2012 04:40:18 +0400 |
parents | 8250f2777afc |
children | e542fd46ad6f |
rev | line source |
---|---|
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Sequential list data type implemented by a linked list. |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
2 Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 Written by Bruno Haible <bruno@clisp.org>, 2006. |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7410
diff
changeset
|
5 This program is free software: you can redistribute it and/or modify |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 it under the terms of the GNU General Public License as published by |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7410
diff
changeset
|
7 the Free Software Foundation; either version 3 of the License, or |
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7410
diff
changeset
|
8 (at your option) any later version. |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 GNU General Public License for more details. |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7410
diff
changeset
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 |
7304
1c4ed7637c24
Include <config.h> unconditionally.
Bruno Haible <bruno@clisp.org>
parents:
6978
diff
changeset
|
18 #include <config.h> |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 /* Specification. */ |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 #include "gl_linked_list.h" |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 #include <stdlib.h> |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 /* -------------------------- gl_list_t Data Type -------------------------- */ |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 /* Generic linked list code. */ |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 #include "gl_anylinked_list1.h" |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 #include "gl_anylinked_list2.h" |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 const struct gl_list_implementation gl_linked_list_implementation = |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 { |
12445
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
34 gl_linked_nx_create_empty, |
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
35 gl_linked_nx_create, |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 gl_linked_size, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 gl_linked_node_value, |
12445
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
38 gl_linked_node_nx_set_value, |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 gl_linked_next_node, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 gl_linked_previous_node, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 gl_linked_get_at, |
12445
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
42 gl_linked_nx_set_at, |
7405
0de49c40e105
Add searching operations, limited to a subsequence of the list.
Bruno Haible <bruno@clisp.org>
parents:
7304
diff
changeset
|
43 gl_linked_search_from_to, |
0de49c40e105
Add searching operations, limited to a subsequence of the list.
Bruno Haible <bruno@clisp.org>
parents:
7304
diff
changeset
|
44 gl_linked_indexof_from_to, |
12445
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
45 gl_linked_nx_add_first, |
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
46 gl_linked_nx_add_last, |
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
47 gl_linked_nx_add_before, |
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
48 gl_linked_nx_add_after, |
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
49 gl_linked_nx_add_at, |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 gl_linked_remove_node, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 gl_linked_remove_at, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 gl_linked_remove, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 gl_linked_list_free, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
54 gl_linked_iterator, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 gl_linked_iterator_from_to, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 gl_linked_iterator_next, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 gl_linked_iterator_free, |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 gl_linked_sortedlist_search, |
7410
9704ff2cbdfe
Add bounded list search operations.
Bruno Haible <bruno@clisp.org>
parents:
7405
diff
changeset
|
59 gl_linked_sortedlist_search_from_to, |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
60 gl_linked_sortedlist_indexof, |
7410
9704ff2cbdfe
Add bounded list search operations.
Bruno Haible <bruno@clisp.org>
parents:
7405
diff
changeset
|
61 gl_linked_sortedlist_indexof_from_to, |
12445
a8c91b846640
Move the malloc checking from module 'list' to new module 'xlist'.
Bruno Haible <bruno@clisp.org>
parents:
9686
diff
changeset
|
62 gl_linked_sortedlist_nx_add, |
6978
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
63 gl_linked_sortedlist_remove |
ec26419f7c0b
Sequential list data type implemented by a linked list.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
64 }; |