David Robillard
02a41f39b2
Add error callback to reader and writer for custom error reporting.
...
Add -q option to serdi to suppress all non-data output, e.g. errors.
Resolves #815 .
git-svn-id: http://svn.drobilla.net/serd/trunk@354 490d8e77-9747-427b-9fa3-0b8f29cee8a0
11 years ago
David Robillard
4de86fdfb6
Add incremental read interface suitable for reading from infinite streams.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@350 490d8e77-9747-427b-9fa3-0b8f29cee8a0
11 years ago
David Robillard
91ae836711
Add serd_reader_set_default_graph() for reading a file as a named graph.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@338 490d8e77-9747-427b-9fa3-0b8f29cee8a0
11 years ago
David Robillard
d14a7d1136
Add serd_writer_set_root_uri(), root parameter to
...
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
11 years ago
David Robillard
44177f8c18
Add escape parameter to serd_node_new_file_uri().
...
git-svn-id: http://svn.drobilla.net/serd/trunk@333 490d8e77-9747-427b-9fa3-0b8f29cee8a0
11 years ago
David Robillard
1725dfdf7c
serd_node_new_uri_from_path => serd_node_new_file_uri.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@331 490d8e77-9747-427b-9fa3-0b8f29cee8a0
11 years ago
David Robillard
f4365012b5
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
11 years ago
David Robillard
7b022006c4
Add serd_chunk_sink for easy writing to a string.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@329 490d8e77-9747-427b-9fa3-0b8f29cee8a0
11 years ago
David Robillard
192508f364
Implement pretty-printing for collections.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@305 490d8e77-9747-427b-9fa3-0b8f29cee8a0
11 years ago
David Robillard
8778ef5322
Make serd_node_new_integer take int64_t instead of long.
...
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
12 years ago
David Robillard
2d724f0e19
Support compilation as C++ under MSVC++
...
git-svn-id: http://svn.drobilla.net/serd/trunk@291 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
3c3e2de8a7
Update copyright dates.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@285 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
e092ff0935
Lint.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@283 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
62b8156a4b
Update man page.
...
Sort command line options in help and man page.
Fix doxygen warnings about undocumented parameters.
git-svn-id: http://svn.drobilla.net/serd/trunk@282 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
847e56d9e6
Add serd_node_new_blob and serd_base64_decode for handling arbitrary binary
...
data via base64 encoding.
git-svn-id: http://svn.drobilla.net/serd/trunk@280 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
4b512a6890
Add serd_file_sink for the common case of writing to a FILE* stream.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@262 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
2469c739d8
Add serd_strtod(), serd_node_new_decimal(), and serd_node_new_integer() for
...
locale-independent numeric node parsing/serialising.
git-svn-id: http://svn.drobilla.net/serd/trunk@260 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
22ac239266
Make bulk writer internal and inlinable to avoid function call overhead in the writer.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@254 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
6e4a3a9ea9
Add SerdBulkSink for writing bulk output and corresponding serdi -B option.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@242 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
2eec748dbf
Move serd_strlen and serd_strerror to string.c and document both in "String Utilities" section.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@229 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
c8e9bd0923
Tidy.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@218 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
de5aa9e275
Add serd_env_set_prefix_from_strings for convenience.
...
Fix configure --debug.
git-svn-id: http://svn.drobilla.net/serd/trunk@217 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
59143950ec
Gracefully handle NULL reader sinks.
...
Add serd_strerror.
Fix erroneously equal SERD_ERR_BAD_SYNTAX and SERD_ERR_BAD_ARG.
git-svn-id: http://svn.drobilla.net/serd/trunk@211 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
92fe7781dc
Tidy up documentation
...
git-svn-id: http://svn.drobilla.net/serd/trunk@195 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
ba61f09501
Add serd_uri_to_path to API.
...
Remove unused SERD_ANON_END statement flag.
git-svn-id: http://svn.drobilla.net/serd/trunk@191 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
f2a023926e
Improve documentation.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@187 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
54f826be2f
Express inlining information via statement flags rather than node types.
...
Correctly support inline blank subjects (e.g. "[ :a :b ] :c :d .").
git-svn-id: http://svn.drobilla.net/serd/trunk@184 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
b92d598a22
Add test to ensure blank node IDs don't clash with generated IDs.
...
Add handle destructor parameter to serd_reader_new.
Add serd_reader_get_handle.
Rename serd_reader_set_blank_prefix to serd_reader_add_blank_prefix.
Rename serd_reader_read_file to serd_reader_read_file_handle.
Add new serd_reader_read_file that takes a path/URI parameter.
Add serdi -i option to select input syntax.
Add serdi -p and -c options to add/chop a prefix to/from blank IDs.
Add optional base_uri parameter to serd_env_new.
Add serd_writer_chop_blank_prefix.
Bump version to 0.3.0.
git-svn-id: http://svn.drobilla.net/serd/trunk@183 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
bc42e1c4d4
Use conventional string lengths not including NULL terminator
...
git-svn-id: http://svn.drobilla.net/serd/trunk@174 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
926f29ed81
Create SerdNodeFlags typedef for flags.
...
Expose serd_strlen.
Make serd_node_copy tolerate a NULL parameter.
git-svn-id: http://svn.drobilla.net/serd/trunk@168 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
efd2a2ecb1
Record whether strings contains quotes or newlines for smart selection of long strings vs short strings in writer output.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@167 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
64f006162d
Improve documentation and const-correctness.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@165 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
00433beb65
Make writer methods directly compatible with reader callbacks.
...
Connect writer directly to reader in serdi.
git-svn-id: http://svn.drobilla.net/serd/trunk@164 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
246aa2aca7
Merge SerdEnv and SerdReadState.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@163 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
6bd8d39e12
Improve documentation.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@162 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
b490ec05c2
Tidy.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@161 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
8c7698ce03
Make serd_read_state_get_base_uri return a pointer.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@157 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
3ef3583423
Use descriptive return codes instead of bool
...
git-svn-id: http://svn.drobilla.net/serd/trunk@154 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
68aa3540cb
Don't hide pointers in typedefs.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@150 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
0b04f70d82
Fix reader memory stack use and verify read_object fully clears its stack.
...
Make abbreviation in writer not assume equivalent nodes have equivalent addresses (abbreviate more than on input if triples are sorted correctly, e.g. abbrevate ntriples)
git-svn-id: http://svn.drobilla.net/serd/trunk@149 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
c8bca42125
Improve node struct alignment
...
git-svn-id: http://svn.drobilla.net/serd/trunk@147 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
ecc3adb41d
Tidy.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@145 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
78492aeaf5
Fix license header (awk oops).
...
git-svn-id: http://svn.drobilla.net/serd/trunk@143 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
0cdf509658
Switch to ISC license (legally equivalent to MIT license but with less obnoxious lawyer noise).
...
git-svn-id: http://svn.drobilla.net/serd/trunk@139 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
7da7a6510b
Update library preprocessor boilerplate
...
git-svn-id: http://svn.drobilla.net/serd/trunk@135 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
71068dae1e
Improve documentation.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@123 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
6574e511d9
Fix documentation typo.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@119 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
5e70c8f459
Fix Doxygen warning.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@118 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
bb14fdecab
Fix parsing several files/strings with the same parser.
...
Add serd_read_state_expand.
git-svn-id: http://svn.drobilla.net/serd/trunk@114 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago
David Robillard
ddd073f0a1
Abstract common read state tracking code (SerdReadState) to make user code less tedious.
...
git-svn-id: http://svn.drobilla.net/serd/trunk@110 490d8e77-9747-427b-9fa3-0b8f29cee8a0
12 years ago