comparison src/audacious/playlist_container.c @ 3639:8b1c6c301d7f

Branch merge.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 25 Sep 2007 23:49:11 +0300
parents 1f7c00c1de22
children ae3ed045e5aa
comparison
equal deleted inserted replaced
3632:ffe7a2346055 3639:8b1c6c301d7f
38 void playlist_container_unregister(PlaylistContainer *plc) 38 void playlist_container_unregister(PlaylistContainer *plc)
39 { 39 {
40 registered_plcs = g_list_remove(registered_plcs, plc); 40 registered_plcs = g_list_remove(registered_plcs, plc);
41 } 41 }
42 42
43 PlaylistContainer *playlist_container_find(char *ext) 43 PlaylistContainer *playlist_container_find(gchar *ext)
44 { 44 {
45 GList *node; 45 GList *node;
46 PlaylistContainer *plc; 46 PlaylistContainer *plc;
47 47
48 /* check ext neither is NULL nor 1 (in a consequence of optimization). */ 48 /* check ext neither is NULL nor 1 (in a consequence of optimization). */
56 } 56 }
57 57
58 return NULL; 58 return NULL;
59 } 59 }
60 60
61 void playlist_container_read(char *filename, gint pos) 61 void playlist_container_read(gchar *filename, gint pos)
62 { 62 {
63 char *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ 63 gchar *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */
64 PlaylistContainer *plc = playlist_container_find(ext); 64 PlaylistContainer *plc = playlist_container_find(ext);
65 65
66 if (plc->plc_read == NULL) 66 if (plc->plc_read == NULL)
67 return; 67 return;
68 68
69 plc->plc_read(filename, pos); 69 plc->plc_read(filename, pos);
70 } 70 }
71 71
72 void playlist_container_write(char *filename, gint pos) 72 void playlist_container_write(gchar *filename, gint pos)
73 { 73 {
74 char *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ 74 gchar *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */
75 PlaylistContainer *plc = playlist_container_find(ext); 75 PlaylistContainer *plc = playlist_container_find(ext);
76 76
77 if (plc->plc_write == NULL) 77 if (plc->plc_write == NULL)
78 return; 78 return;
79 79
80 plc->plc_write(filename, pos); 80 plc->plc_write(filename, pos);
81 } 81 }
82 82
83 gboolean is_playlist_name(char *filename) 83 gboolean is_playlist_name(gchar *filename)
84 { 84 {
85 char *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ 85 gchar *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */
86 PlaylistContainer *plc = playlist_container_find(ext); 86 PlaylistContainer *plc = playlist_container_find(ext);
87 87
88 if (plc != NULL) 88 if (plc != NULL)
89 return TRUE; 89 return TRUE;
90 90