uterm: move uterm_internal.h to uterm_input.h
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 11 Sep 2012 17:16:54 +0000 (19:16 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 11 Sep 2012 17:16:54 +0000 (19:16 +0200)
uterm_internal.h contains only input related content so we can rename it
and remove all the inclusions where it is not needed.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/uterm_input.c
src/uterm_input.h [moved from src/uterm_internal.h with 97% similarity]
src/uterm_input_plain.c
src/uterm_input_uxkb.c
src/uterm_monitor.c
src/uterm_video.c
src/uterm_video_drm.c
src/uterm_video_dumb.c
src/uterm_video_fbdev.c
src/uterm_vt.c

index 45790f5..9146937 100644 (file)
@@ -40,7 +40,7 @@
 #include "log.h"
 #include "static_misc.h"
 #include "uterm.h"
-#include "uterm_internal.h"
+#include "uterm_input.h"
 
 #define LOG_SUBSYSTEM "input"
 
similarity index 97%
rename from src/uterm_internal.h
rename to src/uterm_input.h
index 568b6e9..b5cd2df 100644 (file)
 
 /* Internal definitions */
 
-#ifndef UTERM_INTERNAL_H
-#define UTERM_INTERNAL_H
+#ifndef UTERM_INPUT_H
+#define UTERM_INPUT_H
 
 #include <inttypes.h>
-#include <libudev.h>
 #include <limits.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include "static_misc.h"
 #include "uterm.h"
 
-static inline bool input_bit_is_set(const unsigned long *array, int bit)
-{
-       return !!(array[bit / LONG_BIT] & (1LL << (bit % LONG_BIT)));
-}
-
-/* kbd API */
-
 struct kbd_desc;
 struct kbd_dev;
 
@@ -247,4 +239,9 @@ static inline int kbd_dev_process(struct kbd_dev *dev,
        return dev->ops->process(dev, key_state, code, out);
 }
 
-#endif /* UTERM_INTERNAL_H */
+static inline bool input_bit_is_set(const unsigned long *array, int bit)
+{
+       return !!(array[bit / LONG_BIT] & (1LL << (bit % LONG_BIT)));
+}
+
+#endif /* UTERM_INPUT_H */
index 40c42eb..19e138b 100644 (file)
@@ -45,7 +45,7 @@
 #include "imKStoUCS.h"
 #include "log.h"
 #include "uterm.h"
-#include "uterm_internal.h"
+#include "uterm_input.h"
 
 #define LOG_SUBSYSTEM "input_plain"
 
index 6b9a6a5..59a5b85 100644 (file)
@@ -33,7 +33,7 @@
 #include <xkbcommon/xkbcommon.h>
 #include "log.h"
 #include "uterm.h"
-#include "uterm_internal.h"
+#include "uterm_input.h"
 
 #define LOG_SUBSYSTEM "input_uxkb"
 
index b95082d..398a8a2 100644 (file)
@@ -40,7 +40,6 @@
 #include "log.h"
 #include "static_misc.h"
 #include "uterm.h"
-#include "uterm_internal.h"
 
 #ifdef UTERM_HAVE_SYSTEMD
        #include <systemd/sd-login.h>
index 652dd3a..7c3dcf3 100644 (file)
@@ -39,7 +39,6 @@
 #include "log.h"
 #include "static_misc.h"
 #include "uterm.h"
-#include "uterm_internal.h"
 #include "uterm_video.h"
 
 #define LOG_SUBSYSTEM "video"
index 4a819b8..8d23e49 100644 (file)
@@ -48,7 +48,6 @@
 #include "log.h"
 #include "static_misc.h"
 #include "uterm.h"
-#include "uterm_internal.h"
 #include "uterm_video.h"
 
 #define LOG_SUBSYSTEM "video_drm"
index b5dadc3..8da518a 100644 (file)
@@ -41,7 +41,6 @@
 #include "log.h"
 #include "static_misc.h"
 #include "uterm.h"
-#include "uterm_internal.h"
 #include "uterm_video.h"
 
 #define LOG_SUBSYSTEM "video_dumb"
index 49a7c06..e9f5c1d 100644 (file)
@@ -39,7 +39,6 @@
 #include "log.h"
 #include "static_misc.h"
 #include "uterm.h"
-#include "uterm_internal.h"
 #include "uterm_video.h"
 
 #define LOG_SUBSYSTEM "video_fbdev"
index 2e53d58..b056959 100644 (file)
@@ -45,7 +45,6 @@
 #include "log.h"
 #include "static_misc.h"
 #include "uterm.h"
-#include "uterm_internal.h"
 
 #define LOG_SUBSYSTEM "vt"