From f7ce4f6239ded6681713bc9e8d281712106e6f25 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 13 Oct 2009 18:01:06 +0200 Subject: song: renamed attribute "url" to "uri" --- src/song.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/song.c') diff --git a/src/song.c b/src/song.c index e96041f72..942beb5d7 100644 --- a/src/song.c +++ b/src/song.c @@ -27,18 +27,18 @@ #include static struct song * -song_alloc(const char *url, struct directory *parent) +song_alloc(const char *uri, struct directory *parent) { - size_t urllen; + size_t uri_length; struct song *song; - assert(url); - urllen = strlen(url); - assert(urllen); - song = g_malloc(sizeof(*song) - sizeof(song->url) + urllen + 1); + assert(uri); + uri_length = strlen(uri); + assert(uri_length); + song = g_malloc(sizeof(*song) - sizeof(song->uri) + uri_length + 1); song->tag = NULL; - memcpy(song->url, url, urllen + 1); + memcpy(song->uri, uri, uri_length + 1); song->parent = parent; song->mtime = 0; @@ -46,9 +46,9 @@ song_alloc(const char *url, struct directory *parent) } struct song * -song_remote_new(const char *url) +song_remote_new(const char *uri) { - return song_alloc(url, NULL); + return song_alloc(uri, NULL); } struct song * @@ -71,11 +71,11 @@ char * song_get_uri(const struct song *song) { assert(song != NULL); - assert(*song->url); + assert(*song->uri); if (!song_in_database(song) || directory_is_root(song->parent)) - return g_strdup(song->url); + return g_strdup(song->uri); else return g_strconcat(directory_get_path(song->parent), - "/", song->url, NULL); + "/", song->uri, NULL); } -- cgit v1.2.3