]> mj.ucw.cz Git - osdd.git/commitdiff
Split osd.h and util.h
authorMartin Mares <mj@ucw.cz>
Sat, 12 Oct 2013 20:49:31 +0000 (22:49 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 12 Oct 2013 20:49:31 +0000 (22:49 +0200)
client.c
osd-alsa.c
osd-batt.c
osd.h
osdc.c
osdd.c
util.h [new file with mode: 0644]

index b55a630a813e24e66d0270a24f496cb943ecdc26..331c201fab83e495f660fcb655091f2b529d3156 100644 (file)
--- a/client.c
+++ b/client.c
@@ -13,6 +13,7 @@
 #include <X11/Xatom.h>
 
 #undef DEBUG
+#include "util.h"
 #include "osd.h"
 
 static Display *dpy;
index 3d7bc2731c91eec80c47f2ca5355c2af342786bd..0a6429d468edf394ea934bfc78c8632473024c68 100644 (file)
@@ -12,6 +12,7 @@
 #include <getopt.h>
 #include <alsa/asoundlib.h>
 
+#include "util.h"
 #include "osd.h"
 
 static char *alsa_device = "default";
index 33ec7216fb403bb5e5b5b9a0d1c40abfe4db4352..2d36aa0ddf3bd4a5389c9574d0d89f01f8ed6cc4 100644 (file)
@@ -14,6 +14,7 @@
 #include <getopt.h>
 #include <fcntl.h>
 
+#include "util.h"
 #include "osd.h"
 
 static int check_mode;
diff --git a/osd.h b/osd.h
index 3c7c5b74cbe89bf535ebb6bee40411a6875ae341..ead489f9a038f5aa5ebd1bb47bc0aa3079e0633e 100644 (file)
--- a/osd.h
+++ b/osd.h
@@ -1,31 +1,9 @@
 /*
- *     On-screen Display Daemon -- Utility Functions
+ *     On-screen Display Daemon -- Client Interface
  *
  *     (c) 2010 Martin Mares <mj@ucw.cz>
  */
 
-#include <inttypes.h>
-
-#define NONRET __attribute__((noreturn))
-#define FORMAT_CHECK(func,i,j) __attribute__((format(func,i,j)))
-
-typedef uint64_t timestamp_t;
-
-/* util.c */
-
-void NONRET FORMAT_CHECK(printf,1,2) die(char *fmt, ...);
-
-#ifdef DEBUG
-#define DBG(f...) printf(f)
-#else
-#define DBG(f...) do { } while(0)
-#endif
-
-void *xmalloc(int size);
-void *xrealloc(void *ptr, int size);
-
-timestamp_t get_current_time(void);
-
 /* client.c */
 
 void osd_init(void);
diff --git a/osdc.c b/osdc.c
index f3251d02f7a513c9e52985489ca796cadc3b1be5..8979de3298141f03db4ad148cf562ad50c71b805 100644 (file)
--- a/osdc.c
+++ b/osdc.c
@@ -11,6 +11,7 @@
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 
+#include "util.h"
 #include "osd.h"
 
 static struct osd_msg *msg;
diff --git a/osdd.c b/osdd.c
index ba279b292816f88fffdb26fe45d666c26f077664..f37efde933c234ff680ac57f0e804ad000a75847 100644 (file)
--- a/osdd.c
+++ b/osdd.c
@@ -16,7 +16,8 @@
 #include <X11/Xatom.h>
 
 #undef DEBUG
-#include "osd.h"
+#include "util.h"
+#include "display.h"
 
 static xosd *osd;
 
diff --git a/util.h b/util.h
new file mode 100644 (file)
index 0000000..f1674ac
--- /dev/null
+++ b/util.h
@@ -0,0 +1,27 @@
+/*
+ *     On-screen Display Daemon -- Utility Functions
+ *
+ *     (c) 2010--2013 Martin Mares <mj@ucw.cz>
+ */
+
+#include <inttypes.h>
+
+#define NONRET __attribute__((noreturn))
+#define FORMAT_CHECK(func,i,j) __attribute__((format(func,i,j)))
+
+typedef uint64_t timestamp_t;
+
+/* util.c */
+
+void NONRET FORMAT_CHECK(printf,1,2) die(char *fmt, ...);
+
+#ifdef DEBUG
+#define DBG(f...) printf(f)
+#else
+#define DBG(f...) do { } while(0)
+#endif
+
+void *xmalloc(int size);
+void *xrealloc(void *ptr, int size);
+
+timestamp_t get_current_time(void);