aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
AgeCommit message (Collapse)AuthorFilesLines
2024-09-27Fix potential null dereferenceDavid Robillard1-1/+1
2024-09-27Make function parameters const wherever possibleDavid Robillard1-6/+8
The early history of this code didn't tend to make parameters const, but the "const density" is high enough now that I often find myself wondering if something is mutable for some reason, or just old and sloppier. So, eliminate this confusion by making (hopefully) all function parameters const if possible.
2024-06-24Clean up nonnull parameter assertionsDavid Robillard1-2/+1
2024-03-28Add assertions for all non-null pointers in the public APIDavid Robillard1-0/+18
2024-01-09Avoid regressions in clang nullability checksDavid Robillard1-0/+9
Clang 15 (and still as of 16) lost the ability to understand null checks in conditionals, which is supposed to suppress these warnings. For now, work around some, and suppress others. The suppression boilerplate here is noisy and ugly, and hopefully temporary. It should be removed once the issue is fixed in clang. See https://github.com/llvm/llvm-project/issues/63018
2023-05-08Avoid use of strtoul()David Robillard1-2/+3
This function is overkill for the simple cases actually needed here, and pretty slow anyway.
2023-04-06Simplify remove_dot_segments() implementationDavid Robillard1-53/+15
2023-04-05Fix relative URI creationDavid Robillard1-7/+7
2022-12-20Avoid using ASCII grave as a quoteDavid Robillard1-3/+3
2022-10-23Fix "suspicious" string comparisonDavid Robillard1-1/+1
This is beyond silly.
2022-08-31Adopt REUSE machine-readable licensing standardDavid Robillard1-15/+2
2021-05-31Make most function parameters constDavid Robillard1-16/+23
More const never hurts in general, but in particular this allows the compiler to make better nullability deductions, which reduces the amount of manual nullability casting required.
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