summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-04-29 23:31:13 +0000
committerDavid Robillard <d@drobilla.net>2008-04-29 23:31:13 +0000
commite1f86edd9d134471d64b6804989061801c40f3e5 (patch)
tree645e193b5dfabcef226cf13090de3f7ac583f0d8
parent7710f68e240a2454ba68cf23872065ca9ec500fe (diff)
downloadlilv-e1f86edd9d134471d64b6804989061801c40f3e5.tar.gz
lilv-e1f86edd9d134471d64b6804989061801c40f3e5.tar.bz2
lilv-e1f86edd9d134471d64b6804989061801c40f3e5.zip
Don't print "Properties:" header for ports with no properties.
git-svn-id: http://svn.drobilla.net/lad/slv2@1183 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--utils/lv2_inspect.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c
index 5aa6a6b..200d7dc 100644
--- a/utils/lv2_inspect.c
+++ b/utils/lv2_inspect.c
@@ -79,14 +79,16 @@ print_port(SLV2Plugin p, uint32_t index)
}
SLV2Values properties = slv2_port_get_properties(p, port);
- printf("\t\tProperties: ");
+ if (slv2_values_size(properties) > 0)
+ printf("\t\tProperties: ");
for (unsigned i=0; i < slv2_values_size(properties); ++i) {
if (i > 0) {
printf("\n\t\t ");
}
printf("%s\n", slv2_value_as_uri(slv2_values_get_at(properties, i)));
}
- printf("\n");
+ if (slv2_values_size(properties) > 0)
+ printf("\n");
slv2_values_free(properties);
}