aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-16 18:06:05 +0000
committerDavid Robillard <d@drobilla.net>2011-02-16 18:06:05 +0000
commite196a94abaddb2a90c34d735f232ee84d149a362 (patch)
tree822d09e8ce085c6565d38af0652805334b4a1a0c /src/env.c
parent0e7dfee8bae6655b316f1d0cabbad7df4dba6105 (diff)
downloadserd-e196a94abaddb2a90c34d735f232ee84d149a362.tar.gz
serd-e196a94abaddb2a90c34d735f232ee84d149a362.tar.bz2
serd-e196a94abaddb2a90c34d735f232ee84d149a362.zip
Make serd_writer_set_prefix return bool so it is compatible with SerdPrefixSink and can be used with serd_env_foreach.
Add SERD_STYLE_CURIED option to shorten URIs in output where possible. Fix serd_env_qualify. git-svn-id: http://svn.drobilla.net/serd/trunk@102 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/env.c b/src/env.c
index 9d3b3ca4..1becaa12 100644
--- a/src/env.c
+++ b/src/env.c
@@ -103,9 +103,9 @@ serd_env_qualify(const SerdEnv env,
if (uri->n_bytes >= prefix_uri->n_bytes) {
if (!strncmp((const char*)uri->buf,
(const char*)prefix_uri->buf,
- prefix_uri->n_bytes)) {
+ prefix_uri->n_bytes - 1)) {
*prefix_name = env->prefixes[i].name;
- suffix->buf = uri->buf + prefix_uri->n_bytes;
+ suffix->buf = uri->buf + prefix_uri->n_bytes - 1;
suffix->len = uri->n_bytes - prefix_uri->n_bytes;
return true;
}