$NetBSD: patch-ag,v 1.1.1.1 2001/03/19 19:35:52 wiz Exp $ --- common/playlist.cpp.orig Sun Jan 28 11:22:24 2001 +++ common/playlist.cpp Sun Jan 28 11:26:25 2001 @@ -13,7 +13,7 @@ #include "playlist.h" -gint CompareNames(gconstpointer a, gconstpointer b); +gint CompareNames(const gpointer a, const gpointer b); PlayList * CreatePlayList(char *Name) @@ -56,7 +56,7 @@ int i = 1; char *item; - while ((item = g_list_nth_data(List->modfiles, i++)) != NULL) { + while ((item = (char *)g_list_nth_data(List->modfiles, i++)) != NULL) { delete item; } g_list_free(List->modfiles); @@ -80,8 +80,8 @@ int RemoveModFile(char *ModFile, PlayList * List) { - char *name = (char *) g_list_find_custom(List->modfiles, (gpointer) ModFile, - CompareNames); + char *name = new char[strlen(ModFile) + 1]; + strcpy(name, ModFile); if (name == NULL) return -1; @@ -151,13 +151,12 @@ bool IsOnList(char *ModFile, PlayList * List) { - char *name = (char *) g_list_find_custom(List->modfiles, (gpointer) ModFile, - CompareNames); + char *name = (char *) g_list_find(List->modfiles, (gpointer) ModFile); return (name == NULL) ? false : true; } gint -CompareNames(gconstpointer a, gconstpointer b) +CompareNames(const gpointer a, const gpointer b) { if (strcmp((const char *) a, (const char *) b) == 0) return true;