diff options
author | David Robillard <d@drobilla.net> | 2012-03-08 15:57:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-08 15:57:20 +0000 |
commit | f4365012b555699b916dbeec4d81425bf663579c (patch) | |
tree | 27807b4430269cdb279d32e9f734f119b8bb7191 /src/serd_internal.h | |
parent | 7b022006c47586dc00ed8bca85fcb0bdf5f9465d (diff) | |
download | serd-f4365012b555699b916dbeec4d81425bf663579c.tar.gz serd-f4365012b555699b916dbeec4d81425bf663579c.tar.bz2 serd-f4365012b555699b916dbeec4d81425bf663579c.zip |
Add serd_writer_get_env().
Add serd_node_new_uri_from_path() and serd_file_uri_parse() and implement
proper URI to/from path hex escaping, etc.
Add serd_uri_serialise_relative() for making URIs relative to a base where
possible (by chopping a common prefix and adding dot segments).
Make URIs serialised by the writer properly escape characters.
git-svn-id: http://svn.drobilla.net/serd/trunk@330 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r-- | src/serd_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h index 6e535402..f0137f28 100644 --- a/src/serd_internal.h +++ b/src/serd_internal.h @@ -233,4 +233,11 @@ is_base64(const uint8_t c) return is_alpha(c) || is_digit(c) || c == '+' || c == '/' || c == '='; } +static inline bool +is_windows_path(const uint8_t* path) +{ + return is_alpha(path[0]) && (path[1] == ':' || path[1] == '|') + && (path[2] == '/' || path[2] == '\\'); +} + #endif // SERD_INTERNAL_H |