summaryrefslogtreecommitdiff
path: root/lib/open.c
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>2000-01-13 00:00:04 +0000
committerMartin Baulig <martin@src.gnome.org>2000-01-13 00:00:04 +0000
commitdd8c31ebda2444c46b0870bd222b766165c520c3 (patch)
treea272e06bbf0bea971f2be7f34b67a304929ead6c /lib/open.c
parent4d402ecc14f085907d28c1e33f9732a10f2d8ab3 (diff)
downloadlibgtop-dd8c31ebda2444c46b0870bd222b766165c520c3.tar.gz
Call glibtop_init_backend () and _glibtop_open_sysdeps () here.
2000-01-13 Martin Baulig <martin@home-of-linux.org> * lib/open.c (glibtop_open_l): Call glibtop_init_backend () and _glibtop_open_sysdeps () here.
Diffstat (limited to 'lib/open.c')
-rw-r--r--lib/open.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/open.c b/lib/open.c
index 1e0386ff..9e5a2c4c 100644
--- a/lib/open.c
+++ b/lib/open.c
@@ -25,13 +25,17 @@
#include <glibtop.h>
#include <glibtop/open.h>
-#include <glibtop/sysdeps.h>
-#include <glibtop/xmalloc.h>
-
-#include <glibtop/gnuserv.h>
+#include <glibtop/backend.h>
void
glibtop_open_l (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags)
{
+ if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
+ glibtop_init_backends ();
+
+ _glibtop_open_sysdeps (server, "glibtop", features, flags);
+
+ server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
+ }
}