aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-24 15:56:34 +0100
committerMax Kellermann <max@duempel.org>2009-01-24 15:56:34 +0100
commit6a2118d04c7b73450edfffb6fdc40de1a05bfe94 (patch)
tree26b72b675bc6dcf864e58d4e9ff2a4869aa48f0c /src/locate.c
parentba7c9962663d2e80a6320ca097c06a0849218d27 (diff)
downloadmpd-6a2118d04c7b73450edfffb6fdc40de1a05bfe94.tar.gz
mpd-6a2118d04c7b73450edfffb6fdc40de1a05bfe94.tar.xz
mpd-6a2118d04c7b73450edfffb6fdc40de1a05bfe94.zip
queue_print, dbUtils: use struct locate_item_list
Changed the function prototypes to get locate_item_list objects instead of num_items/items.
Diffstat (limited to 'src/locate.c')
-rw-r--r--src/locate.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/locate.c b/src/locate.c
index 838378797..9f6eff686 100644
--- a/src/locate.c
+++ b/src/locate.c
@@ -177,11 +177,12 @@ locate_tag_search(const struct song *song, enum tag_type type, const char *str)
}
bool
-locate_song_search(const struct song *song, int num_items,
- const struct locate_item *items)
+locate_song_search(const struct song *song,
+ const struct locate_item_list *criteria)
{
- for (int i = 0; i < num_items; i++)
- if (!locate_tag_search(song, items[i].tag, items[i].needle))
+ for (unsigned i = 0; i < criteria->length; i++)
+ if (!locate_tag_search(song, criteria->items[i].tag,
+ criteria->items[i].needle))
return false;
return true;
@@ -234,11 +235,12 @@ locate_tag_match(const struct song *song, enum tag_type type, const char *str)
}
bool
-locate_song_match(const struct song *song, int num_items,
- const struct locate_item *items)
+locate_song_match(const struct song *song,
+ const struct locate_item_list *criteria)
{
- for (int i = 0; i < num_items; i++)
- if (!locate_tag_match(song, items[i].tag, items[i].needle))
+ for (unsigned i = 0; i < criteria->length; i++)
+ if (!locate_tag_match(song, criteria->items[i].tag,
+ criteria->items[i].needle))
return false;
return true;