diff options
Diffstat (limited to 'utils/lv2info.c')
-rw-r--r-- | utils/lv2info.c | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/utils/lv2info.c b/utils/lv2info.c index 52c5aac..75a093f 100644 --- a/utils/lv2info.c +++ b/utils/lv2info.c @@ -84,8 +84,9 @@ print_port(const LilvPlugin* p, } LilvScalePoints* points = lilv_port_get_scale_points(p, port); - if (points) + if (points) { printf("\n\t\tScale Points:\n"); + } LILV_FOREACH(scale_points, i, points) { const LilvScalePoint* point = lilv_scale_points_get(points, i); printf("\t\t\t%s = \"%s\"\n", @@ -116,17 +117,21 @@ print_port(const LilvPlugin* p, lilv_nodes_free(designations); if (lilv_port_is_a(p, port, control_class)) { - if (!isnan(mins[index])) + if (!isnan(mins[index])) { printf("\t\tMinimum: %f\n", mins[index]); - if (!isnan(maxes[index])) + } + if (!isnan(maxes[index])) { printf("\t\tMaximum: %f\n", maxes[index]); - if (!isnan(defaults[index])) + } + if (!isnan(defaults[index])) { printf("\t\tDefault: %f\n", defaults[index]); + } } LilvNodes* properties = lilv_port_get_properties(p, port); - if (lilv_nodes_size(properties) > 0) + if (lilv_nodes_size(properties) > 0) { printf("\t\tProperties: "); + } first = true; LILV_FOREACH(nodes, i, properties) { if (!first) { @@ -135,8 +140,9 @@ print_port(const LilvPlugin* p, printf("%s\n", lilv_node_as_uri(lilv_nodes_get(properties, i))); first = false; } - if (lilv_nodes_size(properties) > 0) + if (lilv_nodes_size(properties) > 0) { printf("\n"); + } lilv_nodes_free(properties); } @@ -209,8 +215,9 @@ print_plugin(LilvWorld* world, lilv_node_as_uri(lilv_nodes_get(types, t))); } - if (binary) + if (binary) { printf("\t\t\tBinary: %s\n", binary); + } printf("\t\t\tBundle: %s\n", lilv_node_as_uri(lilv_ui_get_bundle_uri(ui))); @@ -233,8 +240,9 @@ print_plugin(LilvWorld* world, /* Required Features */ LilvNodes* features = lilv_plugin_get_required_features(p); - if (features) + if (features) { printf("\tRequired Features: "); + } first = true; LILV_FOREACH(nodes, i, features) { if (!first) { @@ -243,15 +251,17 @@ print_plugin(LilvWorld* world, printf("%s", lilv_node_as_uri(lilv_nodes_get(features, i))); first = false; } - if (features) + if (features) { printf("\n"); + } lilv_nodes_free(features); /* Optional Features */ features = lilv_plugin_get_optional_features(p); - if (features) + if (features) { printf("\tOptional Features: "); + } first = true; LILV_FOREACH(nodes, i, features) { if (!first) { @@ -260,15 +270,17 @@ print_plugin(LilvWorld* world, printf("%s", lilv_node_as_uri(lilv_nodes_get(features, i))); first = false; } - if (features) + if (features) { printf("\n"); + } lilv_nodes_free(features); /* Extension Data */ LilvNodes* data = lilv_plugin_get_extension_data(p); - if (data) + if (data) { printf("\tExtension Data: "); + } first = true; LILV_FOREACH(nodes, i, data) { if (!first) { @@ -277,15 +289,17 @@ print_plugin(LilvWorld* world, printf("%s", lilv_node_as_uri(lilv_nodes_get(data, i))); first = false; } - if (data) + if (data) { printf("\n"); + } lilv_nodes_free(data); /* Presets */ LilvNodes* presets = lilv_plugin_get_related(p, preset_class); - if (presets) + if (presets) { printf("\tPresets: \n"); + } LILV_FOREACH(nodes, i, presets) { const LilvNode* preset = lilv_nodes_get(presets, i); lilv_world_load_resource(world, preset); @@ -310,8 +324,9 @@ print_plugin(LilvWorld* world, float* defaults = (float*)calloc(num_ports, sizeof(float)); lilv_plugin_get_port_ranges_float(p, mins, maxes, defaults); - for (uint32_t i = 0; i < num_ports; ++i) + for (uint32_t i = 0; i < num_ports; ++i) { print_port(p, i, mins, maxes, defaults); + } free(mins); free(maxes); |