diff options
author | ben <benjaminfranzke@googlemail.com> | 2010-07-23 03:48:47 +0200 |
---|---|---|
committer | ben <benjaminfranzke@googlemail.com> | 2010-07-23 03:48:47 +0200 |
commit | 376e048b40007bf24adffa2317ebb3e9903a3c86 (patch) | |
tree | ceb168b19eb81fac23ad52c6429df5667fdc58be /src | |
parent | f72c2d3cc60b64dba38ec1f12871fc0e6ab47c1c (diff) | |
download | pa-sink-ctl-376e048b40007bf24adffa2317ebb3e9903a3c86.tar.gz pa-sink-ctl-376e048b40007bf24adffa2317ebb3e9903a3c86.tar.bz2 pa-sink-ctl-376e048b40007bf24adffa2317ebb3e9903a3c86.zip |
move sink_list var to sink.c (included from sink.h)
other c-files than sink.c get the extern definition
via sink.h, only sink.c receives the non-extern one
Diffstat (limited to 'src')
-rw-r--r-- | src/interface.c | 1 | ||||
-rw-r--r-- | src/pa-sink-ctl.c | 2 | ||||
-rw-r--r-- | src/sink.c | 5 | ||||
-rw-r--r-- | src/sink.h | 6 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/interface.c b/src/interface.c index c545bf9..3c02e78 100644 --- a/src/interface.c +++ b/src/interface.c @@ -14,7 +14,6 @@ #define VOLUME_BAR_LEN 50 #define H_MSG_BOX 3 -extern GArray *sink_list; extern pa_context* context; static WINDOW *menu_win; diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c index 3d9421d..767a5a6 100644 --- a/src/pa-sink-ctl.c +++ b/src/pa-sink-ctl.c @@ -7,8 +7,6 @@ #include "interface.h" #include "pa-sink-ctl.h" -GArray *sink_list = NULL; - pa_context *context = NULL; static gboolean info_callbacks_finished = TRUE; @@ -1,9 +1,8 @@ #include <glib.h> -#include "sink_input.h" +#define SINK_C #include "sink.h" - -extern GArray *sink_list; +#include "sink_input.h" /* * init a sink list @@ -1,6 +1,12 @@ #ifndef SINK_H #define SINK_H +#ifdef SINK_C +GArray *sink_list; +#else +extern GArray *sink_list; +#endif + #include <glib.h> #include <pulse/pulseaudio.h> |