summaryrefslogtreecommitdiffstats
path: root/src/sratom.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-06-08 19:34:52 +0000
committerDavid Robillard <d@drobilla.net>2013-06-08 19:34:52 +0000
commit85e508a5ce01765f4e94ff99fb51f75fafbb6a56 (patch)
tree9cdc72b121e05b6b891a8a0fc782b218541fe4d9 /src/sratom.c
parentf489d312420e63c7a1c54e364d368a8b93da06f3 (diff)
downloadsratom-85e508a5ce01765f4e94ff99fb51f75fafbb6a56.tar.gz
sratom-85e508a5ce01765f4e94ff99fb51f75fafbb6a56.tar.bz2
sratom-85e508a5ce01765f4e94ff99fb51f75fafbb6a56.zip
Nicer printing of atom messages with -d.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@5126 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/sratom.c')
-rw-r--r--src/sratom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sratom.c b/src/sratom.c
index 8c2249c..584be8c 100644
--- a/src/sratom.c
+++ b/src/sratom.c
@@ -424,6 +424,14 @@ sratom_write(Sratom* sratom,
}
if (object.buf) {
+ SerdNode def_s = serd_node_from_string(SERD_BLANK, USTR("atom"));
+ SerdNode def_p = serd_node_from_string(SERD_URI, USTR(NS_RDF "value"));
+ if (!subject) {
+ subject = &def_s;
+ }
+ if (!predicate) {
+ predicate = &def_p;
+ }
sratom->write_statement(sratom->handle, flags, NULL,
subject, predicate, &object, &datatype, &language);
}