summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorben <benjaminfranzke@googlemail.com>2010-07-23 03:48:47 +0200
committerben <benjaminfranzke@googlemail.com>2010-07-23 03:48:47 +0200
commit376e048b40007bf24adffa2317ebb3e9903a3c86 (patch)
treeceb168b19eb81fac23ad52c6429df5667fdc58be /src
parentf72c2d3cc60b64dba38ec1f12871fc0e6ab47c1c (diff)
downloadpa-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.c1
-rw-r--r--src/pa-sink-ctl.c2
-rw-r--r--src/sink.c5
-rw-r--r--src/sink.h6
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;
diff --git a/src/sink.c b/src/sink.c
index 8da3048..9f36f3e 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -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
diff --git a/src/sink.h b/src/sink.h
index 4e46045..cccbe1b 100644
--- a/src/sink.h
+++ b/src/sink.h
@@ -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>