aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-02-04 20:49:28 +0100
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commit1c59b863d8c2c2d7b5531866586baf232c0047a2 (patch)
tree2a464c22769631b28fbaf8fdb1f0c04e0b4034f9 /src
parent14196632191339b69d9db3a242a1b8be3f960669 (diff)
downloadserd-1c59b863d8c2c2d7b5531866586baf232c0047a2.tar.gz
serd-1c59b863d8c2c2d7b5531866586baf232c0047a2.tar.bz2
serd-1c59b863d8c2c2d7b5531866586baf232c0047a2.zip
Remove serd_uri_to_path()
Diffstat (limited to 'src')
-rw-r--r--src/serd_config.h2
-rw-r--r--src/uri.c27
2 files changed, 2 insertions, 27 deletions
diff --git a/src/serd_config.h b/src/serd_config.h
index e649786f..e6b3aa4b 100644
--- a/src/serd_config.h
+++ b/src/serd_config.h
@@ -36,7 +36,7 @@
#define SERD_SRC_SERD_CONFIG_H
// Define version unconditionally so a warning will catch a mismatch
-#define SERD_VERSION "0.32.0"
+#define SERD_VERSION "1.1.1"
#if !defined(SERD_NO_DEFAULT_CONFIG)
diff --git a/src/uri.c b/src/uri.c
index b45f7e16..0920bf77 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -12,32 +12,6 @@
#include <stdlib.h>
#include <string.h>
-const uint8_t*
-serd_uri_to_path(const uint8_t* uri)
-{
- const uint8_t* path = uri;
- if (!is_windows_path(uri) && serd_uri_string_has_scheme(uri)) {
- if (!!strncmp((const char*)uri, "file:", 5)) {
- fprintf(stderr, "Non-file URI '%s'\n", uri);
- return NULL;
- }
-
- if (!strncmp((const char*)uri, "file://localhost/", 17)) {
- path = uri + 16;
- } else if (!strncmp((const char*)uri, "file://", 7)) {
- path = uri + 7;
- } else {
- fprintf(stderr, "Invalid file URI '%s'\n", uri);
- return NULL;
- }
-
- if (is_windows_path(path + 1)) {
- ++path; // Special case for terrible Windows file URIs
- }
- }
- return path;
-}
-
uint8_t*
serd_file_uri_parse(const uint8_t* const uri, uint8_t** const hostname)
{
@@ -45,6 +19,7 @@ serd_file_uri_parse(const uint8_t* const uri, uint8_t** const hostname)
if (hostname) {
*hostname = NULL;
}
+
if (!strncmp((const char*)uri, "file://", 7)) {
const uint8_t* auth = uri + 7;
if (*auth == '/') { // No hostname