aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-29Don't break relative URIs with up-references when parsing a document with no ↵David Robillard1-6/+8
base URI. git-svn-id: http://svn.drobilla.net/serd/trunk@342 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-03-10Add serd_writer_set_root_uri(), root parameter toDavid Robillard1-76/+74
serd_uri_serialise_relative(), and -r option to serdi, to enable writing URIs with up references (../) within a parent namespace. Resolve dot segments in serd_uri_resolve() instead of at write time. git-svn-id: http://svn.drobilla.net/serd/trunk@336 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-03-10Trim redundant case.David Robillard1-3/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@335 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-03-08Add serd_writer_get_env().David Robillard1-57/+178
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
2012-02-20Fix collection parsing code to not leak stack space.David Robillard1-1/+0
Collection parsing now truly uses O(1) memory. Trim some fat. git-svn-id: http://svn.drobilla.net/serd/trunk@309 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-02-05Update to r65/autowaf and waf-1.6.10.David Robillard1-2/+4
git-svn-id: http://svn.drobilla.net/serd/trunk@302 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-18Make serd_node_new_integer take int64_t instead of long.David Robillard1-1/+1
Turns out long is sometimes 32-bits even on modern 64-bit machines on certain insane Operating Systems... git-svn-id: http://svn.drobilla.net/serd/trunk@297 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-16Support compilation as C++ under MSVC++David Robillard1-6/+12
git-svn-id: http://svn.drobilla.net/serd/trunk@291 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-16Update copyright dates.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@285 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-01-14Lint.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@283 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-25Near 100% branch coverage.David Robillard1-23/+12
git-svn-id: http://svn.drobilla.net/serd/trunk@277 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-24Support file://localhost/foo URIs in serd_uri_to_path().David Robillard1-14/+12
Support Windows file://c:/foo URIs in serd_uri_to_path() on all platforms. 100% test coverage (by line) for uri.c. git-svn-id: http://svn.drobilla.net/serd/trunk@269 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-24Clean up path writing logic in serd_uri_serialise.David Robillard1-30/+26
git-svn-id: http://svn.drobilla.net/serd/trunk@268 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-24Separate remove_dot_segments from serd_uri_resolve.David Robillard1-62/+73
git-svn-id: http://svn.drobilla.net/serd/trunk@267 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-24Improve URI resolution to cover most of the abnormal cases from RFC3986.David Robillard1-9/+32
Improve test coverage of uri.c. git-svn-id: http://svn.drobilla.net/serd/trunk@266 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Move all #ifdef gunk to serd_internal.h.David Robillard1-3/+1
Centralise file open and buffer allocation to localize platform tweaks. git-svn-id: http://svn.drobilla.net/serd/trunk@244 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-09-29Tidy.David Robillard1-43/+42
git-svn-id: http://svn.drobilla.net/serd/trunk@218 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-24More picky URI to path conversionDavid Robillard1-1/+4
git-svn-id: http://svn.drobilla.net/serd/trunk@193 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-24Add serd_uri_to_path to API.David Robillard1-0/+26
Remove unused SERD_ANON_END statement flag. git-svn-id: http://svn.drobilla.net/serd/trunk@191 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-05-15Remove dead code found by clang static analyser.David Robillard1-7/+7
git-svn-id: http://svn.drobilla.net/serd/trunk@180 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-30Use descriptive return codes instead of boolDavid Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@154 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-23Tidy.David Robillard1-1/+0
git-svn-id: http://svn.drobilla.net/serd/trunk@145 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-22Fix license header (awk oops).David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@143 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-04-22Switch to ISC license (legally equivalent to MIT license but with less ↵David Robillard1-19/+11
obnoxious lawyer noise). git-svn-id: http://svn.drobilla.net/serd/trunk@139 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-02-25Switch to 2-clause BSD license.David Robillard1-16/+24
git-svn-id: http://svn.drobilla.net/serd/trunk@105 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-02-10Make serd_uri_resolve return void, since it has no error case anyway.David Robillard1-4/+3
git-svn-id: http://svn.drobilla.net/serd/trunk@96 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-02-03Write "//" for URIs with empty authorities (e.g. the correct file:///foo/bar ↵David Robillard1-1/+4
instead of the incorrect file:/foo/bar, even though the authority has length zero). git-svn-id: http://svn.drobilla.net/serd/trunk@89 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Add `amalgamate' waf target for building single source file distribution.David Robillard1-0/+2
git-svn-id: http://svn.drobilla.net/serd/trunk@78 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Change source header tag line.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@72 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-25Fix URI resolution of absolute URIs.David Robillard1-6/+1
Better URI test coverage. git-svn-id: http://svn.drobilla.net/serd/trunk@64 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-24Remove SerdString from public API in favour of more expressive (and not ↵David Robillard1-54/+2
necessarily inline with data payload) SerdNode. git-svn-id: http://svn.drobilla.net/serd/trunk@53 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-23Faster serd_uri_serialise.David Robillard1-19/+32
git-svn-id: http://svn.drobilla.net/serd/trunk@50 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-23Rearrange code, put common internal stuff in serd_internal.h.David Robillard1-22/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@46 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-23Code cleanup (appease cpplint).David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@45 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-21Make writer write to any sink passed in by the user.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@20 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-20Support passing no base URI on command line (use filename as base URI).David Robillard1-8/+6
Decent usage output. git-svn-id: http://svn.drobilla.net/serd/trunk@15 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-20Flesh out documentation.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@12 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-20Fix memory errors (full test suite passes with zero errors or leaks reported ↵David Robillard1-3/+2
by valgrind). git-svn-id: http://svn.drobilla.net/serd/trunk@11 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-20Run, and pass all, bad tests.David Robillard1-37/+31
Fix memory errors. git-svn-id: http://svn.drobilla.net/serd/trunk@10 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-20Rework character reading functions to support reading multi-byte characters ↵David Robillard1-34/+15
(take a string dest parameter instead of returning uchar). Escape ntriples output. Pass all good read tests with output verification. git-svn-id: http://svn.drobilla.net/serd/trunk@8 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-01-19Initial import.David Robillard1-0/+428
git-svn-id: http://svn.drobilla.net/serd/trunk@2 490d8e77-9747-427b-9fa3-0b8f29cee8a0