aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 19:36:37 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 19:36:37 +0200
commit047043d2a8ee4482a845ed9860dbf4cd01540eef (patch)
treeec8542ca3ea28e255bd857f01b7b8672fb029da5 /src/playlist.c
parent7366191f0d0d5c50ee051a3b60fc31ad86bce721 (diff)
downloadmpd-047043d2a8ee4482a845ed9860dbf4cd01540eef.tar.gz
mpd-047043d2a8ee4482a845ed9860dbf4cd01540eef.tar.xz
mpd-047043d2a8ee4482a845ed9860dbf4cd01540eef.zip
locate: use g_utf8_casefold() instead of string_toupper()
string_toupper() and strDupToUpper() were not able to deal with character sets other than US-ASCII. Use GLib's g_utf8_casefold() for strings.
Diffstat (limited to 'src/playlist.c')
-rw-r--r--src/playlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 3498ae7bb..bfcfb1f7a 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -37,6 +37,8 @@
#include "idle.h"
#include "os_compat.h"
+#include <glib.h>
+
#define PLAYLIST_STATE_STOP 0
#define PLAYLIST_STATE_PLAY 1
@@ -1372,7 +1374,7 @@ void searchForSongsInPlaylist(struct client *client,
for (i = 0; i < numItems; i++) {
originalNeedles[i] = items[i].needle;
- items[i].needle = strDupToUpper(originalNeedles[i]);
+ items[i].needle = g_utf8_casefold(originalNeedles[i], -1);
}
for (i = 0; i < playlist.length; i++) {
@@ -1381,7 +1383,7 @@ void searchForSongsInPlaylist(struct client *client,
}
for (i = 0; i < numItems; i++) {
- free(items[i].needle);
+ g_free(items[i].needle);
items[i].needle = originalNeedles[i];
}