~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to lib/datastruct/str_list.c

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2014-08-19 15:37:06 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140819153706-i1gaio8lg534dara
Tags: 2.02.109-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
int str_list_add(struct dm_pool *mem, struct dm_list *sll, const char *str)
34
34
{
35
 
        struct str_list *sln;
 
35
        struct dm_str_list *sln;
36
36
 
37
37
        if (!str)
38
38
                return_0;
55
55
        struct dm_list *slh, *slht;
56
56
 
57
57
        dm_list_iterate_safe(slh, slht, sll)
58
 
                if (!strcmp(str, dm_list_item(slh, struct str_list)->str))
 
58
                if (!strcmp(str, dm_list_item(slh, struct dm_str_list)->str))
59
59
                         dm_list_del(slh);
60
60
}
61
61
 
62
62
int str_list_dup(struct dm_pool *mem, struct dm_list *sllnew,
63
63
                 const struct dm_list *sllold)
64
64
{
65
 
        struct str_list *sl;
 
65
        struct dm_str_list *sl;
66
66
 
67
67
        dm_list_init(sllnew);
68
68
 
79
79
 */
80
80
int str_list_match_item(const struct dm_list *sll, const char *str)
81
81
{
82
 
        struct str_list *sl;
 
82
        struct dm_str_list *sl;
83
83
 
84
84
        dm_list_iterate_items(sl, sll)
85
85
            if (!strcmp(str, sl->str))
94
94
 */
95
95
int str_list_match_list(const struct dm_list *sll, const struct dm_list *sll2, const char **tag_matched)
96
96
{
97
 
        struct str_list *sl;
 
97
        struct dm_str_list *sl;
98
98
 
99
99
        dm_list_iterate_items(sl, sll)
100
100
                if (str_list_match_item(sll2, sl->str)) {
111
111
 */
112
112
int str_list_lists_equal(const struct dm_list *sll, const struct dm_list *sll2)
113
113
{
114
 
        struct str_list *sl;
 
114
        struct dm_str_list *sl;
115
115
 
116
116
        if (dm_list_size(sll) != dm_list_size(sll2))
117
117
                return 0;