From 58d9d991f488dc8fc6e9019f629fc1175bedbc14 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Mon, 5 Dec 2022 14:42:20 +0800 Subject: [PATCH] headers: make headers self-contained each header should include the dependency headers in order to make the headers self-contained. this is allows clangd based IDEs to parse the headers and populate the code model correctly --- include/conf.h | 3 +++ include/control.h | 5 +++++ include/control_plugin.h | 2 ++ include/error.h | 2 ++ include/hwdep.h | 3 +++ include/input.h | 2 ++ include/mixer.h | 3 +++ include/mixer_abst.h | 2 ++ include/output.h | 1 + include/pcm.h | 3 +++ include/pcm_ioplug.h | 2 ++ include/pcm_plugin.h | 2 ++ include/pcm_rate.h | 2 ++ include/rawmidi.h | 3 +++ include/seq.h | 6 ++++++ include/seq_midi_event.h | 3 +++ include/timer.h | 2 ++ include/topology.h | 1 + 18 files changed, 47 insertions(+) diff --git a/include/conf.h b/include/conf.h index 800707d9..120c90fa 100644 --- a/include/conf.h +++ b/include/conf.h @@ -28,6 +28,9 @@ #ifndef __ALSA_CONF_H #define __ALSA_CONF_H +#include "input.h" +#include "output.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/control.h b/include/control.h index e386ecec..279e0159 100644 --- a/include/control.h +++ b/include/control.h @@ -28,6 +28,11 @@ #ifndef __ALSA_CONTROL_H #define __ALSA_CONTROL_H +#include +#include +#include "conf.h" +#include "global.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/control_plugin.h b/include/control_plugin.h index 65146869..dc1c64d6 100644 --- a/include/control_plugin.h +++ b/include/control_plugin.h @@ -31,6 +31,8 @@ #ifndef __ALSA_CONTROL_PLUGIN_H #define __ALSA_CONTROL_PLUGIN_H +#include "control.h" + /** * \defgroup Control_Plugins Primitive Control Plugins * \ingroup Control diff --git a/include/error.h b/include/error.h index 7239db85..4d06f2ea 100644 --- a/include/error.h +++ b/include/error.h @@ -28,6 +28,8 @@ #ifndef __ALSA_ERROR_H #define __ALSA_ERROR_H +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/hwdep.h b/include/hwdep.h index 46ed1f78..a07ee3ee 100644 --- a/include/hwdep.h +++ b/include/hwdep.h @@ -28,6 +28,9 @@ #ifndef __ALSA_HWDEP_H #define __ALSA_HWDEP_H +#include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/input.h b/include/input.h index f84954a9..8a6db162 100644 --- a/include/input.h +++ b/include/input.h @@ -29,6 +29,8 @@ #define __ALSA_INPUT_H #include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/mixer.h b/include/mixer.h index 51b6f04a..6a018676 100644 --- a/include/mixer.h +++ b/include/mixer.h @@ -28,6 +28,9 @@ #ifndef __ALSA_MIXER_H #define __ALSA_MIXER_H +#include "control.h" +#include "pcm.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/mixer_abst.h b/include/mixer_abst.h index ea8c096e..49d9165e 100644 --- a/include/mixer_abst.h +++ b/include/mixer_abst.h @@ -26,6 +26,8 @@ #ifndef __ALSA_MIXER_ABST_H #define __ALSA_MIXER_ABST_H +#include "mixer.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/output.h b/include/output.h index 5e16420b..53c21b6d 100644 --- a/include/output.h +++ b/include/output.h @@ -29,6 +29,7 @@ #define __ALSA_OUTPUT_H #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/pcm.h b/include/pcm.h index b5a514fa..39c6a702 100644 --- a/include/pcm.h +++ b/include/pcm.h @@ -29,6 +29,9 @@ #ifndef __ALSA_PCM_H #define __ALSA_PCM_H +#include "conf.h" +#include "global.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/pcm_ioplug.h b/include/pcm_ioplug.h index 81ac8613..791e7581 100644 --- a/include/pcm_ioplug.h +++ b/include/pcm_ioplug.h @@ -31,6 +31,8 @@ #ifndef __ALSA_PCM_IOPLUG_H #define __ALSA_PCM_IOPLUG_H +#include "pcm.h" + /** * \defgroup PCM_IOPlug External I/O plugin SDK * \ingroup Plugin_SDK diff --git a/include/pcm_plugin.h b/include/pcm_plugin.h index 2d014394..e1c6ad4e 100644 --- a/include/pcm_plugin.h +++ b/include/pcm_plugin.h @@ -32,6 +32,8 @@ #ifndef __ALSA_PCM_PLUGIN_H #define __ALSA_PCM_PLUGIN_H +#include "pcm.h" + /** * \defgroup PCM_Plugins PCM Plugins * \ingroup PCM diff --git a/include/pcm_rate.h b/include/pcm_rate.h index 48473ed4..b530f018 100644 --- a/include/pcm_rate.h +++ b/include/pcm_rate.h @@ -31,6 +31,8 @@ #ifndef __ALSA_PCM_RATE_H #define __ALSA_PCM_RATE_H +#include "pcm.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rawmidi.h b/include/rawmidi.h index 71681053..755227a2 100644 --- a/include/rawmidi.h +++ b/include/rawmidi.h @@ -28,6 +28,9 @@ #ifndef __ALSA_RAWMIDI_H #define __ALSA_RAWMIDI_H +#include "conf.h" +#include "global.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/seq.h b/include/seq.h index 123a1057..de453f04 100644 --- a/include/seq.h +++ b/include/seq.h @@ -29,6 +29,12 @@ #ifndef __ALSA_SEQ_H #define __ALSA_SEQ_H +#include +#include +#include "conf.h" +#include "seq_event.h" +#include "timer.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/seq_midi_event.h b/include/seq_midi_event.h index 4cfb15c4..30849fc7 100644 --- a/include/seq_midi_event.h +++ b/include/seq_midi_event.h @@ -28,6 +28,9 @@ #ifndef __ALSA_SEQ_MIDI_EVENT_H #define __ALSA_SEQ_MIDI_EVENT_H +#include +#include "seq_event.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/timer.h b/include/timer.h index dc5ca69e..26f5c648 100644 --- a/include/timer.h +++ b/include/timer.h @@ -28,6 +28,8 @@ #ifndef __ALSA_TIMER_H #define __ALSA_TIMER_H +#include "conf.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/topology.h b/include/topology.h index d1feee4d..61d67c57 100644 --- a/include/topology.h +++ b/include/topology.h @@ -21,6 +21,7 @@ #ifndef __ALSA_TOPOLOGY_H #define __ALSA_TOPOLOGY_H +#include #include #ifdef __cplusplus