commit 1bd1820
Michael Forney
·
2014-12-25 08:52:55 +0000 UTC
parent 192d691
launch: Drop swc_ prefix from non-public functions/structures
7 files changed,
+17,
-17
+1,
-1
1@@ -769,7 +769,7 @@ static void handle_switch_vt(void * data, uint32_t time,
2 uint8_t vt = value - XKB_KEY_XF86Switch_VT_1 + 1;
3
4 if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
5- swc_launch_activate_vt(vt);
6+ launch_activate_vt(vt);
7 }
8
9 static void handle_swc_event(struct wl_listener * listener, void * data)
+1,
-1
1@@ -289,7 +289,7 @@ bool swc_drm_initialize()
2 }
3
4 drm.taken_ids = 0;
5- swc.drm->fd = swc_launch_open_device(drm.path, O_RDWR | O_CLOEXEC);
6+ swc.drm->fd = launch_open_device(drm.path, O_RDWR | O_CLOEXEC);
7
8 if (swc.drm->fd == -1)
9 {
+3,
-3
1@@ -204,7 +204,7 @@ struct swc_evdev_device * swc_evdev_device_new
2 if (!(device = malloc(sizeof *device)))
3 goto error0;
4
5- device->fd = swc_launch_open_device(path, O_RDWR | O_NONBLOCK | O_CLOEXEC);
6+ device->fd = launch_open_device(path, O_RDWR | O_NONBLOCK | O_CLOEXEC);
7
8 if (device->fd == -1)
9 {
10@@ -282,8 +282,8 @@ bool swc_evdev_device_reopen(struct swc_evdev_device * device)
11 if (device->source)
12 close_device(device);
13
14- device->fd = swc_launch_open_device(device->path,
15- O_RDWR | O_NONBLOCK | O_CLOEXEC);
16+ device->fd = launch_open_device(device->path,
17+ O_RDWR | O_NONBLOCK | O_CLOEXEC);
18
19 if (device->fd == -1)
20 {
+4,
-4
1@@ -64,7 +64,7 @@ static int handle_data(int fd, uint32_t mask, void * data)
2 return 1;
3 }
4
5-bool swc_launch_initialize()
6+bool launch_initialize()
7 {
8 char * socket_string, * end;
9
10@@ -85,7 +85,7 @@ bool swc_launch_initialize()
11 return true;
12 }
13
14-void swc_launch_finalize()
15+void launch_finalize()
16 {
17 wl_event_source_remove(launch.source);
18 close(launch.socket);
19@@ -114,7 +114,7 @@ static bool send_request(struct swc_launch_request * request, size_t size,
20 return false;
21 }
22
23-int swc_launch_open_device(const char * path, int flags)
24+int launch_open_device(const char * path, int flags)
25 {
26 size_t path_size = strlen(path);
27 char buffer[sizeof(struct swc_launch_request) + path_size + 1];
28@@ -132,7 +132,7 @@ int swc_launch_open_device(const char * path, int flags)
29 return fd;
30 }
31
32-bool swc_launch_activate_vt(unsigned vt)
33+bool launch_activate_vt(unsigned vt)
34 {
35 struct swc_launch_request request;
36 struct swc_launch_event response;
+4,
-4
1@@ -27,11 +27,11 @@
2 #include <stdbool.h>
3 #include <wayland-server.h>
4
5-bool swc_launch_initialize();
6-void swc_launch_finalize();
7+bool launch_initialize();
8+void launch_finalize();
9
10-int swc_launch_open_device(const char * path, int flags);
11-bool swc_launch_activate_vt(unsigned vt);
12+int launch_open_device(const char * path, int flags);
13+bool launch_activate_vt(unsigned vt);
14
15 #endif
16
+1,
-1
1@@ -233,7 +233,7 @@ static void update_capabilities(uint32_t capabilities)
2 #ifdef ENABLE_LIBINPUT
3 static int open_restricted(const char * path, int flags, void * user_data)
4 {
5- return swc_launch_open_device(path, flags);
6+ return launch_open_device(path, flags);
7 }
8
9 static void close_restricted(int fd, void * user_data)
+3,
-3
1@@ -121,7 +121,7 @@ bool swc_initialize(struct wl_display * display,
2 const char * default_seat = "seat0";
3 wl_signal_init(&swc.event_signal);
4
5- if (!(swc_launch_initialize()))
6+ if (!(launch_initialize()))
7 {
8 ERROR("Could not connect to swc-launch\n");
9 goto error0;
10@@ -222,7 +222,7 @@ bool swc_initialize(struct wl_display * display,
11 error2:
12 swc_drm_finalize();
13 error1:
14- swc_launch_finalize();
15+ launch_finalize();
16 error0:
17 return false;
18 }
19@@ -242,6 +242,6 @@ void swc_finalize()
20 swc_bindings_finalize();
21 swc_shm_finalize();
22 swc_drm_finalize();
23- swc_launch_finalize();
24+ launch_finalize();
25 }
26