aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
AgeCommit message (Collapse)AuthorFilesLines
2021-03-08Make serd_uri_string_length() precise and add it to public APIDavid Robillard1-0/+38
2021-03-08WIP: Make serd_env_expand() always return a node if it is not relativeDavid Robillard1-3/+0
The old interface was potentially faster, because it avoided unnecessary copies, but was annoying to use and problematic because nodes that don't need expansion were indistinguishable from nodes that failed to expand (like those that use undefined namespace prefixes). In the grand scheme of things, the potential performance improvement isn't worth it, and unexpected unexpanded nodes causes deep nightmarish problems, so just make serd_env_expand() copy the input if it doesn't need expansion to make the API simpler and safer.
2021-03-07Bring read/write interface closer to C standardDavid Robillard1-16/+15
2021-03-07Simplify URI API and implementationDavid Robillard1-195/+181
2021-03-07Rename SerdURI to SerdURIViewDavid Robillard1-14/+14
2021-03-07Rename SerdChunk to SerdStringViewDavid Robillard1-1/+1
2021-03-07Use char* for strings in public APIDavid Robillard1-32/+29
The constant casting just makes user code a mess, for no benefit.
2021-03-07Add SerdBuffer type for mutable buffersDavid Robillard1-7/+5
This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks.
2021-03-07Remove serd_uri_to_path()David Robillard1-26/+1
2021-01-02Use email address instead of website for attributionDavid Robillard1-1/+1
2020-12-31Format all code with clang-formatDavid Robillard1-371/+395
2020-12-31Avoid "else" after "break" and "return"David Robillard1-2/+7
2020-11-10Fix potential memory error when serialising URIsDavid Robillard1-1/+2
2020-08-14Clean up and separate internal headersDavid Robillard1-1/+2
2020-06-21Cleanup: Fix uninitialised variablesDavid Robillard1-5/+5
2020-06-21Cleanup: Remove unnecessary storesDavid Robillard1-1/+1
2020-06-21Clean up includesDavid Robillard1-1/+6
2019-10-27Fix integer conversion warningsDavid Robillard1-5/+5
2019-01-05Rewrite switch statements that are better written as ifsDavid Robillard1-4/+2
2018-12-20Remove old URI parse debug logging codeDavid Robillard1-38/+0
2018-10-28Avoid use of sscanf for parsing escapes in URIsDavid Robillard1-4/+2
2018-09-30Fix calloc argument orderDavid Robillard1-1/+1
2018-09-04Fix fallthrough warnings with GCC8David Robillard1-1/+2
2018-07-30Fix resolving some URIs against base URIs with no trailing slashDavid Robillard1-0/+14
2018-06-15Remove redundant SERD_API declarationsDavid Robillard1-7/+0
2018-06-10Fix relative URI serialisationDavid Robillard1-4/+8
2017-07-08Fix parsing of hex escapes in file URIsJohannes Mueller1-1/+1
This fixes round-trip of paths to/from escaped file URIs.
2017-06-30Fix various clang-tidy issuesDavid Robillard1-14/+14
2017-06-29Fix strict parsing of abolute URI schemesDavid Robillard1-8/+4
2017-02-18Fix invalid doc commentDavid Robillard1-1/+1
2014-08-08Use Markdown in doc comments for better source readability.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@471 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2014-08-08Use Markdown in doc comments for better source readability.David Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/serd/trunk@469 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2014-08-08Update copyright dates.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@467 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2014-04-11Minor hardening.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@459 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2013-03-30Improve branch coverage.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@442 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-12-20Fix crash when resolving against non-standard base URIs.David Robillard1-4/+1
git-svn-id: http://svn.drobilla.net/serd/trunk@400 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2012-08-08Fix warnings: -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes ↵David Robillard1-3/+3
-Wmissing-prototypes. git-svn-id: http://svn.drobilla.net/serd/trunk@374 490d8e77-9747-427b-9fa3-0b8f29cee8a0
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