aboutsummaryrefslogtreecommitdiffstats
path: root/src/input_registry.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-06-12 23:22:03 +0200
committerMax Kellermann <max@duempel.org>2012-06-12 23:22:03 +0200
commit4eb57e1e9a1718ce93eced6bd4fb06d8abb26477 (patch)
tree2355c6d77273cf614822f5a144005ab1d353863b /src/input_registry.h
parentd662c4c0cc089a6a493a7463e440f0f7e7959b48 (diff)
parent1d52e2cc7727d93e65d557c322b5dd7dc149651c (diff)
downloadmpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.tar.gz
mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.tar.xz
mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.zip
Merge branch 'v0.16.x'
Conflicts: src/cmdline.c src/decoder/wildmidi_decoder_plugin.c src/gcc.h src/glib_compat.h src/input_stream.c src/output_list.c src/output_thread.c valgrind.suppressions
Diffstat (limited to 'src/input_registry.h')
-rw-r--r--src/input_registry.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/input_registry.h b/src/input_registry.h
index a1b057469..4f5fff8da 100644
--- a/src/input_registry.h
+++ b/src/input_registry.h
@@ -32,4 +32,14 @@ extern const struct input_plugin *const input_plugins[];
extern bool input_plugins_enabled[];
+#define input_plugins_for_each(plugin) \
+ for (const struct input_plugin *plugin, \
+ *const*input_plugin_iterator = &input_plugins[0]; \
+ (plugin = *input_plugin_iterator) != NULL; \
+ ++input_plugin_iterator)
+
+#define input_plugins_for_each_enabled(plugin) \
+ input_plugins_for_each(plugin) \
+ if (input_plugins_enabled[input_plugin_iterator - input_plugins])
+
#endif