diff options
author | Max Kellermann <max@duempel.org> | 2012-08-07 23:25:42 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-07 23:27:23 +0200 |
commit | 6b39a5621d9c6724db8f03164e350ae6220fa00a (patch) | |
tree | 1d2284873c2a8bdb1f27703731ed1b6f988fb84c /src/DatabaseCommands.cxx | |
parent | 0d46e118269689e2a98e8011f52bb4bb0459421a (diff) | |
download | mpd-6b39a5621d9c6724db8f03164e350ae6220fa00a.tar.gz mpd-6b39a5621d9c6724db8f03164e350ae6220fa00a.tar.xz mpd-6b39a5621d9c6724db8f03164e350ae6220fa00a.zip |
locate: add "casefold" flag to parser
Fold the case during construction, without having to create another
copy.
Diffstat (limited to '')
-rw-r--r-- | src/DatabaseCommands.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/DatabaseCommands.cxx b/src/DatabaseCommands.cxx index 40ba88052..618fe0947 100644 --- a/src/DatabaseCommands.cxx +++ b/src/DatabaseCommands.cxx @@ -60,7 +60,7 @@ enum command_return handle_find(struct client *client, int argc, char *argv[]) { struct locate_item_list *list = - locate_item_list_parse(argv + 1, argc - 1); + locate_item_list_parse(argv + 1, argc - 1, false); if (list == NULL || list->length == 0) { if (list != NULL) @@ -84,7 +84,7 @@ enum command_return handle_findadd(struct client *client, int argc, char *argv[]) { struct locate_item_list *list = - locate_item_list_parse(argv + 1, argc - 1); + locate_item_list_parse(argv + 1, argc - 1, false); if (list == NULL || list->length == 0) { if (list != NULL) locate_item_list_free(list); @@ -108,7 +108,7 @@ enum command_return handle_search(struct client *client, int argc, char *argv[]) { struct locate_item_list *list = - locate_item_list_parse(argv + 1, argc - 1); + locate_item_list_parse(argv + 1, argc - 1, true); if (list == NULL || list->length == 0) { if (list != NULL) @@ -132,7 +132,7 @@ enum command_return handle_searchadd(struct client *client, int argc, char *argv[]) { struct locate_item_list *list = - locate_item_list_parse(argv + 1, argc - 1); + locate_item_list_parse(argv + 1, argc - 1, true); if (list == NULL || list->length == 0) { if (list != NULL) @@ -159,7 +159,7 @@ handle_searchaddpl(struct client *client, int argc, char *argv[]) const char *playlist = argv[1]; struct locate_item_list *list = - locate_item_list_parse(argv + 2, argc - 2); + locate_item_list_parse(argv + 2, argc - 2, true); if (list == NULL || list->length == 0) { if (list != NULL) @@ -184,7 +184,7 @@ enum command_return handle_count(struct client *client, int argc, char *argv[]) { struct locate_item_list *list = - locate_item_list_parse(argv + 1, argc - 1); + locate_item_list_parse(argv + 1, argc - 1, false); if (list == NULL || list->length == 0) { if (list != NULL) @@ -245,14 +245,14 @@ handle_list(struct client *client, int argc, char *argv[]) return COMMAND_RETURN_ERROR; } - locate_item_list_parse(argv + 1, argc - 1); + locate_item_list_parse(argv + 1, argc - 1, false); conditionals = locate_item_list_new(1); conditionals->items[0].tag = TAG_ARTIST; conditionals->items[0].needle = g_strdup(argv[2]); } else { conditionals = - locate_item_list_parse(argv + 2, argc - 2); + locate_item_list_parse(argv + 2, argc - 2, false); if (conditionals == NULL) { command_error(client, ACK_ERROR_ARG, "not able to parse args"); |