aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue_print.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/queue_print.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 '')
-rw-r--r--src/queue_print.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/queue_print.c b/src/queue_print.c
index 3c0437ca0..54cdc15ae 100644
--- a/src/queue_print.c
+++ b/src/queue_print.c
@@ -81,19 +81,20 @@ queue_print_changes_position(struct client *client, const struct queue *queue,
void
queue_search(struct client *client, const struct queue *queue,
- unsigned num_items, const struct locate_item *items)
+ const struct locate_item_list *criteria)
{
unsigned i;
- struct locate_item_list *new_list = locate_item_list_new(num_items);
+ struct locate_item_list *new_list =
+ locate_item_list_new(criteria->length);
- for (i = 0; i < num_items; i++)
+ for (i = 0; i < criteria->length; i++)
new_list->items[i].needle =
- g_utf8_casefold(items[i].needle, -1);
+ g_utf8_casefold(criteria->items[i].needle, -1);
for (i = 0; i < queue_length(queue); i++) {
const struct song *song = queue_get(queue, i);
- if (locate_song_search(song, num_items, new_list->items))
+ if (locate_song_search(song, new_list))
queue_print_song_info(client, queue, i);
}
@@ -102,12 +103,12 @@ queue_search(struct client *client, const struct queue *queue,
void
queue_find(struct client *client, const struct queue *queue,
- unsigned num_items, const struct locate_item *items)
+ const struct locate_item_list *criteria)
{
for (unsigned i = 0; i < queue_length(queue); i++) {
const struct song *song = queue_get(queue, i);
- if (locate_song_match(song, num_items, items))
+ if (locate_song_match(song, criteria))
queue_print_song_info(client, queue, i);
}
}