aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ext/atom.lv2/atom-helpers.h17
-rw-r--r--ext/atom.lv2/atom.h4
-rw-r--r--ext/pui.lv2/pui.h2
-rw-r--r--ext/reference.lv2/reference.h22
-rw-r--r--wscript8
5 files changed, 31 insertions, 22 deletions
diff --git a/ext/atom.lv2/atom-helpers.h b/ext/atom.lv2/atom-helpers.h
index b58fa09..71c16e9 100644
--- a/ext/atom.lv2/atom-helpers.h
+++ b/ext/atom.lv2/atom-helpers.h
@@ -16,10 +16,10 @@
/**
@file atom-helpers.h Helper functions for the LV2 Atom extension.
-
+
These functions are provided for convenience only, use of them is not
required for supporting atoms.
-
+
Note that these functions are all static inline which basically means:
do not take the address of these functions.
*/
@@ -68,8 +68,9 @@ lv2_object_iter_equals(const LV2_Object_Iter l, const LV2_Object_Iter r)
static inline LV2_Object_Iter
lv2_object_iter_next(const LV2_Object_Iter iter)
{
- return (LV2_Object_Iter)(
- (uint8_t*)iter + sizeof(LV2_Atom_Property) + lv2_atom_pad_size(iter->value.size));
+ return (LV2_Object_Iter)((uint8_t*)iter
+ + sizeof(LV2_Atom_Property)
+ + lv2_atom_pad_size(iter->value.size));
}
/** Return the property pointed to by @c iter */
@@ -83,7 +84,7 @@ lv2_object_iter_get(LV2_Object_Iter iter)
A macro for iterating over all properties of an Object.
@param obj The object to iterate over
@param iter The name of the iterator
-
+
This macro is used similarly to a for loop (which it expands to), e.g.:
<pre>
LV2_OBJECT_FOREACH(object, i) {
@@ -169,8 +170,8 @@ lv2_atom_is_a(LV2_Atom* object,
/** A single entry in an Object query. */
typedef struct {
- uint32_t key; ///< Set by the user to the desired key to query.
- const LV2_Atom* value; ///< Possibly set by query function to the found value
+ uint32_t key; ///< Key to query (input set by user)
+ const LV2_Atom* value; ///< Found value (output set by query function)
} LV2_Object_Query;
/**
@@ -191,7 +192,7 @@ lv2_object_query(const LV2_Atom* object, LV2_Object_Query* query)
// Count number of query keys so we can short-circuit when done
for (LV2_Object_Query* q = query; q->key; ++q)
++n_queries;
-
+
LV2_OBJECT_FOREACH(object, o) {
const LV2_Atom_Property* prop = lv2_object_iter_get(o);
for (LV2_Object_Query* q = query; q->key; ++q) {
diff --git a/ext/atom.lv2/atom.h b/ext/atom.lv2/atom.h
index d69c547..d6d2308 100644
--- a/ext/atom.lv2/atom.h
+++ b/ext/atom.lv2/atom.h
@@ -109,8 +109,8 @@ typedef struct _LV2_Atom_Property {
The body of an atom:Resource or atom:Blank.
*/
typedef struct _LV2_Object {
- uint32_t context; /**< ID of context graph, or 0 for the default context */
- uint32_t id; /**< ID for atom:Resource or blank ID for atom:Blank */
+ uint32_t context; /**< ID of context graph, or 0 for default */
+ uint32_t id; /**< URID (for Resource) or blank ID (for Blank) */
uint8_t properties[]; /**< Sequence of LV2_Atom_Property */
} LV2_Object;
diff --git a/ext/pui.lv2/pui.h b/ext/pui.lv2/pui.h
index 257c792..9286944 100644
--- a/ext/pui.lv2/pui.h
+++ b/ext/pui.lv2/pui.h
@@ -343,7 +343,7 @@ typedef struct {
*/
LV2_PUI_Descriptor const* (*pui_descriptor)(LV2_PUI_Lib_Data lib_data,
uint32_t index);
-
+
} LV2_PUI_Lib_Descriptor;
/**
diff --git a/ext/reference.lv2/reference.h b/ext/reference.lv2/reference.h
index 427bf56..26ef4c3 100644
--- a/ext/reference.lv2/reference.h
+++ b/ext/reference.lv2/reference.h
@@ -32,11 +32,11 @@
/**
Dynamically Allocated Data.
-
+
This is an opaque piece of data of any type, dynamically allocated in memory.
Unlike an "atom", a "blob" is not necessarily POD. Non-POD data is referred
to by a "reference (a special case of atom with type 0).
-
+
This is a pointer to host data which is opaque to the plugin. Plugins MUST
NOT interpret this data in any way, except via host-provided functions in
LV2_Blob_Support.
@@ -51,7 +51,7 @@ typedef void (*LV2_Blob_Destroy)(LV2_Blob* blob);
/**
The data field of the LV2_Feature for reference:blobSupport.
-
+
A host which supports blobs must pass an LV2_Feature to the plugin's
instantiate method with 'URI' = "http://lv2plug.in/ns/ext/reference#blobSupport"
and 'data' pointing to an instance of this struct. All fields of this struct
@@ -61,7 +61,7 @@ typedef struct {
/**
Pointer to opaque host data.
-
+
The plugin MUST pass this to any call to functions in this struct.
Otherwise, the plugin MUST NOT interpret this value in any way.
*/
@@ -69,17 +69,17 @@ typedef struct {
/**
The size of a reference, in bytes.
-
+
This value is provided by the host so plugins can allocate large enough
chunks of memory to store references. Note a reference is an LV2_Reference
with type reference:Reference, hence ref_size is a uint16, like
LV2_Reference.size.
*/
uint16_t ref_size;
-
+
/**
Return the Blob referred to by @a ref.
-
+
The returned value MUST NOT be used in any way other than by calling
methods defined in LV2_Blob_Support (e.g. it MUST NOT be directly
accessed, copied, or destroyed). The actual payload of the blob can
@@ -138,10 +138,10 @@ typedef struct {
LV2_Blob_Destroy destroy,
uint32_t type,
size_t size);
-
+
/**
Get blob's type as an ID.
-
+
The return value may be any type URI, mapped to an integer with the
URI Map extension with <code>context = NULL</code>.
*/
@@ -149,13 +149,13 @@ typedef struct {
/**
Get blob's body.
-
+
Returns a pointer to the start of the blob data. The format of this
data is defined by the return value of the type method. It MUST NOT
be used in any way by code which does not understand that type.
*/
void* (*blob_data)(LV2_Blob blob);
-
+
} LV2_Blob_Support;
#endif /* LV2_REFERENCE_H */
diff --git a/wscript b/wscript
index 311a593..a2b2345 100644
--- a/wscript
+++ b/wscript
@@ -1,6 +1,8 @@
#!/usr/bin/env python
import datetime
import os
+import subprocess
+import glob
from waflib.extras import autowaf as autowaf
import waflib.Logs as Logs
@@ -87,3 +89,9 @@ def build(bld):
#for i in ['plugins/eg-amp.lv2', 'plugins/eg-sampler.lv2']:
# bld.recurse(i)
+
+def lint(ctx):
+ for i in (['core.lv2/lv2.h']
+ + glob.glob('ext/*/*.h')
+ + glob.glob('extensions/*/*.h')):
+ subprocess.call('cpplint.py --filter=+whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-whitespace/blank_line,-build/header_guard,-readability/casting,-readability/todo,-build/include ' + i, shell=True)