summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-16 19:02:36 +0000
committerDavid Robillard <d@drobilla.net>2011-04-16 19:02:36 +0000
commit62286b7b9ed6ec9c7b68ba2f7f6060ceb995ed9c (patch)
tree3c85b55bd0542bfc364848e0d4af123bfc19e31d
parent688d7d6d95ee16353a5c0f9a2234fd5faabb2935 (diff)
downloadlilv-62286b7b9ed6ec9c7b68ba2f7f6060ceb995ed9c.tar.gz
lilv-62286b7b9ed6ec9c7b68ba2f7f6060ceb995ed9c.tar.bz2
lilv-62286b7b9ed6ec9c7b68ba2f7f6060ceb995ed9c.zip
Squeeze blank lines and delete trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3152 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--slv2/slv2.h57
-rw-r--r--src/collections.c1
-rw-r--r--src/plugin.c2
-rw-r--r--src/pluginuiinstance.c4
-rw-r--r--src/port.c6
-rw-r--r--src/query.c2
-rw-r--r--src/slv2_internal.h18
-rw-r--r--src/util.c2
-rw-r--r--src/world.c4
-rw-r--r--test/slv2_test.c2
10 files changed, 41 insertions, 57 deletions
diff --git a/slv2/slv2.h b/slv2/slv2.h
index c367154..119b533 100644
--- a/slv2/slv2.h
+++ b/slv2/slv2.h
@@ -104,7 +104,7 @@ typedef void* SLV2Values; /**< set<Value>. */
/**
@defgroup slv2 SLV2
SLV2 is a simple yet powerful C API for using LV2 plugins.
-
+
For more information about LV2, see <http://lv2plug.in>.
For more information about SLV2, see <http://drobilla.net/software/slv2>.
@{
@@ -580,7 +580,7 @@ slv2_world_free(SLV2World world);
established/standard best practice for discovering all LV2 data on the
system. The environment variable LV2_PATH may be used to control where
this function will look for bundles.
-
+
Hosts should use this function rather than explicitly load bundles, except
in special circumstances (e.g. development utilities, or hosts that ship
with special plugin bundles which are installed to a known location).
@@ -593,9 +593,9 @@ slv2_world_load_all(SLV2World world);
Load a specific bundle.
@a bundle_uri must be a fully qualified URI to the bundle directory,
with the trailing slash, eg. file:///usr/lib/lv2/foo.lv2/
-
+
Normal hosts should not need this function (use slv2_world_load_all).
-
+
Hosts MUST NOT attach any long-term significance to bundle paths
(e.g. in save files), since there are no guarantees they will remain
unchanged between (or even during) program invocations. Plugins (among
@@ -654,7 +654,7 @@ slv2_world_get_plugin_by_uri_string(SLV2World world,
Check if @a plugin is valid.
This is not a rigorous validator, but can be used to reject some malformed
plugins that could cause bugs (e.g. plugins with missing required fields).
-
+
Note that normal hosts do NOT need to use this - slv2 does not
load invalid plugins into plugin lists. This is included for plugin
testing utilities, etc.
@@ -669,13 +669,13 @@ slv2_plugin_verify(SLV2Plugin plugin);
Any serialization that refers to plugins should refer to them by this.
Hosts SHOULD NOT save any filesystem paths, plugin indexes, etc. in saved
files; save only the URI.
-
+
The URI is a globally unique identifier for one specific plugin. Two
plugins with the same URI are compatible in port signature, and should
be guaranteed to work in a compatible and consistent way. If a plugin
is upgraded in an incompatible way (eg if it has different ports), it
MUST have a different URI than it's predecessor.
-
+
@return A shared URI value which must not be modified or freed.
*/
SLV2_API
@@ -687,7 +687,7 @@ slv2_plugin_get_uri(SLV2Plugin plugin);
This returns the URI of the bundle where the plugin itself was found.
Note that the data for a plugin may be spread over many bundles, that is,
slv2_plugin_get_data_uris may return URIs which are not within this bundle.
-
+
Typical hosts should not need to use this function.
Note this always returns a fully qualified URI. If you want a local
filesystem path, use slv2_uri_to_path.
@@ -740,11 +740,11 @@ slv2_plugin_get_class(SLV2Plugin plugin);
/**
Get a value associated with the plugin in a plugin's data files.
@a predicate must be either a URI or a QName.
-
+
Returns the ?object of all triples found of the form:
-
+
<code>&lt;plugin-uri&gt; predicate ?object</code>
-
+
May return NULL if the property was not found, or if object(s) is not
sensibly represented as an SLV2Values (e.g. blank nodes).
Return value must be freed by caller with slv2_values_free.
@@ -768,14 +768,14 @@ slv2_plugin_get_value_by_qname(SLV2Plugin p,
/**
Get a value associated with some subject in a plugin's data files.
@a predicate must be either a URI or a QName.
-
+
Returns the ?object of all triples found of the form:
-
+
<code>subject predicate ?object</code>
-
+
This can be used to investigate URIs returned by slv2_plugin_get_value
(if information about it is contained in the plugin's data files).
-
+
May return NULL if the property was not found, or if object is not
sensibly represented as an SLV2Values (e.g. blank nodes).
Return value must be freed by caller with slv2_values_free.
@@ -814,11 +814,11 @@ slv2_plugin_get_supported_features(SLV2Plugin p);
Get the LV2 Features required by a plugin.
If a feature is required by a plugin, hosts MUST NOT use the plugin if they do not
understand (or are unable to support) that feature.
-
+
All values returned here MUST be passed to the plugin's instantiate method
(along with data, if necessary, as defined by the feature specification)
or plugin instantiation will fail.
-
+
Return value must be freed by caller with slv2_values_free.
*/
SLV2_API
@@ -830,7 +830,7 @@ slv2_plugin_get_required_features(SLV2Plugin p);
Hosts MAY ignore optional plugin features for whatever reasons. Plugins
MUST operate (at least somewhat) if they are instantiated without being
passed optional features.
-
+
Return value must be freed by caller with slv2_values_free.
*/
SLV2_API
@@ -853,7 +853,7 @@ slv2_plugin_get_num_ports(SLV2Plugin p);
with array index corresponding to port index. If a port doesn't have a
minimum, maximum or default value, or the port's type is not float, the
corresponding array element will be set to NAN.
-
+
This is a convenience method for the common case of getting the range of
all float ports on a plugin, and may be significantly faster than
repeated calls to slv2_port_get_range.
@@ -889,7 +889,7 @@ slv2_plugin_has_latency(SLV2Plugin p);
Return the index of the plugin's latency port.
It is a fatal error to call this on a plugin without checking if the port
exists by first calling slv2_plugin_has_latency.
-
+
Any plugin that introduces unwanted latency that should be compensated for
(by hosts with the ability/need) MUST provide this port, which is a control
rate output port that reports the latency for each cycle in frames.
@@ -1077,7 +1077,6 @@ SLV2ScalePoints
slv2_port_get_scale_points(SLV2Plugin plugin,
SLV2Port port);
-
/**
@}
@name Scale Point
@@ -1272,7 +1271,7 @@ slv2_instance_get_extension_data(SLV2Instance instance,
Get the LV2_Descriptor of the plugin instance.
Normally hosts should not need to access the LV2_Descriptor directly,
use the slv2_instance_* functions.
-
+
The returned descriptor is shared and must not be deleted.
*/
static inline const LV2_Descriptor*
@@ -1285,7 +1284,7 @@ slv2_instance_get_descriptor(SLV2Instance instance)
Get the LV2_Handle of the plugin instance.
Normally hosts should not need to access the LV2_Handle directly,
use the slv2_instance_* functions.
-
+
The returned handle is shared and must not be deleted.
*/
static inline LV2_Handle
@@ -1326,13 +1325,13 @@ slv2_plugin_get_uis(SLV2Plugin plugin);
This function makes a best effort at choosing a default UI for the given
widget type. A native UI for the given widget type will be returned if one
exists, otherwise a UI which can be wrapped by SLV2 will be returned.
-
+
This function makes the common case (a plugin with a single UI, or a single
UI per toolkit) simple, but is not fully powerful since a plugin may have
several usable UIs. To support multiple UIs per plugin, use
@ref slv2_ui_supported to determine which UIs are usable and choose a UI
to instantiate from among them.
-
+
@return NULL if there is no suitable UI.
*/
SLV2_API
@@ -1448,7 +1447,7 @@ slv2_ui_host_free(SLV2UIHost ui_host);
/**
Instantiate a plugin UI.
-
+
The returned object represents shared library objects loaded into memory, it
must be cleaned up with slv2_ui_instance_free when no longer needed. The
returned object does not refer to @a ui_host directly (though it of course
@@ -1462,7 +1461,7 @@ slv2_ui_host_free(SLV2UIHost ui_host);
@param controller Opaque host pointer passed to each function.
@param features NULL-terminated array of features the host supports.
NULL may be passed if the host supports no additional features.
-
+
@return NULL if instantiation failed.
*/
SLV2_API
@@ -1515,7 +1514,7 @@ slv2_ui_instance_extension_data(SLV2UIInstance instance,
Get the LV2UI_Descriptor of the plugin UI instance.
Normally hosts should not need to access the LV2UI_Descriptor directly,
use the slv2_ui_instance_* functions.
-
+
The returned descriptor is shared and must not be deleted.
*/
SLV2_API
@@ -1526,7 +1525,7 @@ slv2_ui_instance_get_descriptor(SLV2UIInstance instance);
Get the LV2UI_Handle of the plugin UI instance.
Normally hosts should not need to access the LV2UI_Handle directly,
use the slv2_ui_instance_* functions.
-
+
The returned handle is shared and must not be deleted.
*/
SLV2_API
diff --git a/src/collections.c b/src/collections.c
index 4c3ae5e..a13ceb2 100644
--- a/src/collections.c
+++ b/src/collections.c
@@ -136,7 +136,6 @@ slv2_plugins_get_by_uri(SLV2Plugins list, SLV2Value uri)
return (SLV2Plugin)slv2_sequence_get_by_uri(list, uri);
}
-
/* Values */
SLV2_API
diff --git a/src/plugin.c b/src/plugin.c
index a4f9338..ea48507 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -805,7 +805,7 @@ slv2_plugin_get_uis(SLV2Plugin p)
SLV2_ERROR("Corrupt UI\n");
continue;
}
-
+
SLV2UI slv2_ui = slv2_ui_new(
p->world,
slv2_value_new_from_node(p->world, ui),
diff --git a/src/pluginuiinstance.c b/src/pluginuiinstance.c
index 189ae6e..6231705 100644
--- a/src/pluginuiinstance.c
+++ b/src/pluginuiinstance.c
@@ -46,7 +46,7 @@ slv2_ui_instantiate(SLV2Plugin plugin,
const LV2_Feature* const* features)
{
SLV2UIHost ui_host = slv2_ui_host_new(write_function, NULL, NULL, NULL);
-
+
SLV2UIInstance ret = slv2_ui_instance_new(
plugin, ui, NULL, ui_host, controller, features);
@@ -75,7 +75,7 @@ slv2_ui_host_free(SLV2UIHost ui_host)
{
free(ui_host);
}
-
+
SLV2_API
SLV2UIInstance
slv2_ui_instance_new(SLV2Plugin plugin,
diff --git a/src/port.c b/src/port.c
index 6ae6a08..3bb8d82 100644
--- a/src/port.c
+++ b/src/port.c
@@ -187,7 +187,7 @@ slv2_port_get_value(SLV2Plugin p,
}
return slv2_port_get_value_by_node(
- p, port,
+ p, port,
slv2_value_as_node(predicate));
}
@@ -206,7 +206,7 @@ slv2_port_get_name(SLV2Plugin p,
{
SLV2Values results = slv2_port_get_value(p, port,
p->world->lv2_name_val);
-
+
SLV2Value ret = NULL;
if (results) {
SLV2Value val = slv2_values_get_first(results);
@@ -218,7 +218,7 @@ slv2_port_get_name(SLV2Plugin p,
if (!ret)
SLV2_WARNF("<%s> has no (mandatory) doap:name\n",
slv2_value_as_string(slv2_plugin_get_uri(p)));
-
+
return ret;
}
diff --git a/src/query.c b/src/query.c
index ab32c1c..aa0e8c4 100644
--- a/src/query.c
+++ b/src/query.c
@@ -96,7 +96,7 @@ slv2_values_from_stream_objects_i18n(SLV2Plugin p,
lm = SLV2_LANG_MATCH_EXACT;
}
}
-
+
if (lm == SLV2_LANG_MATCH_EXACT) {
// Exact language match, add to results
slv2_array_append(values, slv2_value_new_from_node(p->world, value));
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index e2a6807..f49f404 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -88,8 +88,6 @@ slv2_match_end(SLV2Matches iter)
sord_iter_free(iter);
}
-
-
/* ********* PORT ********* */
/** Reference to a port on some plugin. */
@@ -99,11 +97,9 @@ struct _SLV2Port {
SLV2Values classes; ///< rdf:type
};
-
SLV2Port slv2_port_new(SLV2World world, uint32_t index, const char* symbol);
void slv2_port_free(SLV2Port port);
-
/* ********* Plugin ********* */
/** Header of an SLV2Plugin, SLV2PluginClass, or SLV2UI.
@@ -114,7 +110,7 @@ struct _SLV2Header {
struct _SLV2World* world;
SLV2Value uri;
};
-
+
/** Record of an installed/available plugin.
*
* A simple reference to a plugin somewhere on the system. This just holds
@@ -145,7 +141,6 @@ slv2_plugin_get_unique(SLV2Plugin p,
/* ********* Plugins ********* */
-
SLV2Plugins
slv2_plugins_new();
@@ -165,7 +160,7 @@ slv2_collection_size(SLV2Collection collection);
/**
Get an element from @a collection by index.
-
+
@a index has no significance other than as an index into @a collection.
Any @a index not less than the size of the collection will return NULL,
@@ -174,7 +169,7 @@ slv2_collection_size(SLV2Collection collection);
Note this function is a search, and not constant time.
This function is deprecated, use iterators instead.
-
+
@return NULL if @a index is out of range.
*/
SLV2_DEPRECATED
@@ -190,7 +185,6 @@ struct _SLV2InstanceImpl {
void* lib_handle;
};
-
/* ********* UI Instance ********* */
struct _SLV2UIInstance {
@@ -220,13 +214,11 @@ SLV2PluginClass slv2_plugin_class_new(SLV2World world,
void slv2_plugin_class_free(SLV2PluginClass plugin_class);
-
/* ********* Plugin Classes ********* */
SLV2PluginClasses slv2_plugin_classes_new();
void slv2_plugin_classes_free();
-
/* ********* World ********* */
typedef struct {
@@ -280,7 +272,6 @@ slv2_world_blank_node_prefix(SLV2World world);
void
slv2_world_load_file(SLV2World world, const char* file_uri);
-
/* ********* Plugin UI ********* */
struct _SLV2UI {
@@ -353,7 +344,6 @@ static inline void slv2_node_free(SLV2World world, SLV2Node node) {
sord_node_free(world->world, node);
}
-
/* ********* Scale Points ********* */
struct _SLV2ScalePoint {
@@ -364,7 +354,6 @@ struct _SLV2ScalePoint {
SLV2ScalePoint slv2_scale_point_new(SLV2Value value, SLV2Value label);
void slv2_scale_point_free(SLV2ScalePoint point);
-
/* ********* Query Results ********* */
SLV2Matches slv2_plugin_find_statements(SLV2Plugin plugin,
@@ -383,7 +372,6 @@ static inline bool slv2_matches_end(SLV2Matches matches) {
SLV2Values slv2_values_from_stream_objects(SLV2Plugin p,
SLV2Matches stream);
-
/* ********* Utilities ********* */
char* slv2_strjoin(const char* first, ...);
diff --git a/src/util.c b/src/util.c
index d7ac0b7..4154fac 100644
--- a/src/util.c
+++ b/src/util.c
@@ -94,7 +94,7 @@ slv2_get_lang()
|| !strcmp(env_lang, "C") || !strcmp(env_lang, "POSIX")) {
return NULL;
}
-
+
const size_t env_lang_len = strlen(env_lang);
char* const lang = malloc(env_lang_len + 1);
for (size_t i = 0; i < env_lang_len + 1; ++i) {
diff --git a/src/world.c b/src/world.c
index 6d31cd7..4155c07 100644
--- a/src/world.c
+++ b/src/world.c
@@ -247,7 +247,7 @@ struct _SLV2Header*
slv2_sequence_get_by_uri(GSequence* seq,
SLV2Value uri)
{
- struct _SLV2Header key = { NULL, uri };
+ struct _SLV2Header key = { NULL, uri };
GSequenceIter* i = g_sequence_search(
seq, &key, slv2_header_compare_by_uri, NULL);
@@ -303,7 +303,7 @@ slv2_world_add_plugin(SLV2World world,
if (dyn_manifest_lib) {
plugin->dynman_uri = slv2_value_new_from_node(world, dyn_manifest_lib);
}
-
+
// Add all plugin data files (rdfs:seeAlso)
SLV2Matches files = slv2_world_find_statements(
world, world->model,
diff --git a/test/slv2_test.c b/test/slv2_test.c
index 5635076..d1225da 100644
--- a/test/slv2_test.c
+++ b/test/slv2_test.c
@@ -386,7 +386,6 @@ test_discovery()
return 1;
}
-
/*****************************************************************************/
int
@@ -477,7 +476,6 @@ test_classes()
return 1;
}
-
/*****************************************************************************/
int