diff options
author | Max Kellermann <max@duempel.org> | 2009-02-25 16:44:06 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-25 16:44:06 +0100 |
commit | 6823217697043e3ad2c1e67e4bba759c66d18a4f (patch) | |
tree | 2c947ebe3c0bdfab76ce67873eaa1570bc6a4674 /src/ls.c | |
parent | 7957fefc91d2148fb2733f01ceaadf78d6844f1f (diff) | |
download | mpd-6823217697043e3ad2c1e67e4bba759c66d18a4f.tar.gz mpd-6823217697043e3ad2c1e67e4bba759c66d18a4f.tar.xz mpd-6823217697043e3ad2c1e67e4bba759c66d18a4f.zip |
ls: moved generic URI utilities to uri.c
"ls" is a bad name for a library which parses URIs. We'll move the
rest of the "ls" library later.
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -17,6 +17,7 @@ */ #include "ls.h" +#include "uri.h" #include "client.h" #include "config.h" @@ -46,11 +47,6 @@ void print_supported_uri_schemes(struct client *client) } } -bool uri_has_scheme(const char *uri) -{ - return strstr(uri, "://") != NULL; -} - bool uri_supported_scheme(const char *uri) { const char **urlPrefixes = remoteUrlPrefixes; @@ -65,11 +61,3 @@ bool uri_supported_scheme(const char *uri) return false; } - -/* suffixes should be ascii only characters */ -const char *uri_get_suffix(const char *utf8file) -{ - const char *dot = strrchr(g_basename(utf8file), '.'); - - return dot != NULL ? dot + 1 : NULL; -} |