[PATCH weston 1/4] Remove redundant #include path component.

Jon A. Cruz jonc at osg.samsung.com
Fri Jun 12 21:25:02 PDT 2015


Using the parent '../' path component in #include statements makes
the codebase more rigid and is redundant due to proper -I use.

Signed-off-by: Jon A. Cruz <jonc at osg.samsung.com>
---
 clients/calibrator.c               | 2 +-
 clients/desktop-shell.c            | 4 ++--
 clients/dnd.c                      | 2 +-
 clients/image.c                    | 2 +-
 clients/ivi-shell-user-interface.c | 6 +++---
 clients/multi-resource.c           | 2 +-
 clients/presentation-shm.c         | 2 +-
 clients/screenshot.c               | 2 +-
 clients/simple-damage.c            | 2 +-
 clients/simple-egl.c               | 2 +-
 clients/simple-shm.c               | 2 +-
 clients/simple-touch.c             | 2 +-
 clients/terminal.c                 | 2 +-
 clients/weston-info.c              | 2 +-
 clients/window.c                   | 4 ++--
 clients/window.h                   | 6 +++---
 desktop-shell/shell.c              | 2 +-
 ivi-shell/ivi-layout.c             | 2 +-
 src/compositor-wayland.c           | 6 +++---
 src/compositor-x11.c               | 4 ++--
 src/compositor.c                   | 2 +-
 src/input.c                        | 2 +-
 src/screen-share.c                 | 2 +-
 src/screenshooter.c                | 2 +-
 tests/bad-buffer-test.c            | 2 +-
 tests/buffer-count-test.c          | 2 +-
 tests/ivi_layout-internal-test.c   | 4 ++--
 tests/ivi_layout-test-plugin.c     | 4 ++--
 tests/matrix-test.c                | 2 +-
 tests/surface-global-test.c        | 2 +-
 tests/surface-test.c               | 2 +-
 tests/vertex-clip-test.c           | 2 +-
 tests/weston-test-client-helper.c  | 2 +-
 tests/weston-test.c                | 4 ++--
 34 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/clients/calibrator.c b/clients/calibrator.c
index 1eb117f..4865095 100644
--- a/clients/calibrator.c
+++ b/clients/calibrator.c
@@ -34,7 +34,7 @@
 #include <wayland-client.h>
 
 #include "window.h"
-#include "../shared/matrix.h"
+#include "shared/matrix.h"
 
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
 
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 777a50a..70e9dfe 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -42,8 +42,8 @@
 
 #include <wayland-client.h>
 #include "window.h"
-#include "../shared/cairo-util.h"
-#include "../shared/config-parser.h"
+#include "shared/cairo-util.h"
+#include "shared/config-parser.h"
 
 #include "desktop-shell-client-protocol.h"
 
diff --git a/clients/dnd.c b/clients/dnd.c
index b5a7d41..00e87a5 100644
--- a/clients/dnd.c
+++ b/clients/dnd.c
@@ -39,7 +39,7 @@
 #include <wayland-cursor.h>
 
 #include "window.h"
-#include "../shared/cairo-util.h"
+#include "shared/cairo-util.h"
 
 struct dnd_drag;
 
diff --git a/clients/image.c b/clients/image.c
index aee8112..bc9e223 100644
--- a/clients/image.c
+++ b/clients/image.c
@@ -40,7 +40,7 @@
 #include <wayland-client.h>
 
 #include "window.h"
-#include "../shared/cairo-util.h"
+#include "shared/cairo-util.h"
 
 struct image {
 	struct window *window;
diff --git a/clients/ivi-shell-user-interface.c b/clients/ivi-shell-user-interface.c
index a83f9ad..1b8a45d 100644
--- a/clients/ivi-shell-user-interface.c
+++ b/clients/ivi-shell-user-interface.c
@@ -32,9 +32,9 @@
 #include <sys/mman.h>
 #include <getopt.h>
 #include <wayland-cursor.h>
-#include "../shared/cairo-util.h"
-#include "../shared/config-parser.h"
-#include "../shared/os-compatibility.h"
+#include "shared/cairo-util.h"
+#include "shared/config-parser.h"
+#include "shared/os-compatibility.h"
 #include "ivi-application-client-protocol.h"
 #include "ivi-hmi-controller-client-protocol.h"
 
diff --git a/clients/multi-resource.c b/clients/multi-resource.c
index 0dc2c74..12c2cd8 100644
--- a/clients/multi-resource.c
+++ b/clients/multi-resource.c
@@ -38,7 +38,7 @@
 #include <math.h>
 
 #include <wayland-client.h>
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 
 struct device {
 	enum { KEYBOARD, POINTER } type;
diff --git a/clients/presentation-shm.c b/clients/presentation-shm.c
index e791b2b..0d62872 100644
--- a/clients/presentation-shm.c
+++ b/clients/presentation-shm.c
@@ -35,7 +35,7 @@
 #include <time.h>
 
 #include <wayland-client.h>
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "presentation_timing-client-protocol.h"
 
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
diff --git a/clients/screenshot.c b/clients/screenshot.c
index 2a6d9b3..de57197 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -36,7 +36,7 @@
 
 #include <wayland-client.h>
 #include "screenshooter-client-protocol.h"
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 
 /* The screenshooter is a good example of a custom object exposed by
  * the compositor and serves as a test bed for implementing client
diff --git a/clients/simple-damage.c b/clients/simple-damage.c
index c9dbc32..96f8e59 100644
--- a/clients/simple-damage.c
+++ b/clients/simple-damage.c
@@ -35,7 +35,7 @@
 #include <signal.h>
 
 #include <wayland-client.h>
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "xdg-shell-client-protocol.h"
 #include "fullscreen-shell-client-protocol.h"
 #include "scaler-client-protocol.h"
diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index c6a95eb..68444df 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -46,7 +46,7 @@
 #include "protocol/ivi-application-client-protocol.h"
 #define IVI_SURFACE_ID 9000
 
-#include "../shared/platform.h"
+#include "shared/platform.h"
 
 #ifndef EGL_EXT_swap_buffers_with_damage
 #define EGL_EXT_swap_buffers_with_damage 1
diff --git a/clients/simple-shm.c b/clients/simple-shm.c
index 1df08be..b0261a5 100644
--- a/clients/simple-shm.c
+++ b/clients/simple-shm.c
@@ -33,7 +33,7 @@
 #include <signal.h>
 
 #include <wayland-client.h>
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "xdg-shell-client-protocol.h"
 #include "fullscreen-shell-client-protocol.h"
 
diff --git a/clients/simple-touch.c b/clients/simple-touch.c
index d8439ac..e187bcf 100644
--- a/clients/simple-touch.c
+++ b/clients/simple-touch.c
@@ -32,7 +32,7 @@
 #include <sys/mman.h>
 
 #include <wayland-client.h>
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
 
diff --git a/clients/terminal.c b/clients/terminal.c
index d7345d3..77f9bd6 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -42,7 +42,7 @@
 
 #include <wayland-client.h>
 
-#include "../shared/config-parser.h"
+#include "shared/config-parser.h"
 #include "window.h"
 
 static int option_fullscreen;
diff --git a/clients/weston-info.c b/clients/weston-info.c
index f777982..10924a9 100644
--- a/clients/weston-info.c
+++ b/clients/weston-info.c
@@ -31,7 +31,7 @@
 
 #include <wayland-client.h>
 
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "presentation_timing-client-protocol.h"
 
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
diff --git a/clients/window.c b/clients/window.c
index 45b0ec5..f2100fb 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -65,11 +65,11 @@ typedef void *EGLContext;
 
 #include <linux/input.h>
 #include <wayland-client.h>
-#include "../shared/cairo-util.h"
+#include "shared/cairo-util.h"
 #include "xdg-shell-client-protocol.h"
 #include "text-cursor-position-client-protocol.h"
 #include "workspaces-client-protocol.h"
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 
 #include "window.h"
 
diff --git a/clients/window.h b/clients/window.h
index 34a5ef3..5d33997 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -28,9 +28,9 @@
 #include <xkbcommon/xkbcommon.h>
 #include <wayland-client.h>
 #include <cairo.h>
-#include "../shared/config-parser.h"
-#include "../shared/zalloc.h"
-#include "../shared/platform.h"
+#include "shared/config-parser.h"
+#include "shared/zalloc.h"
+#include "shared/platform.h"
 
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
 
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index acd7e68..89d730c 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -37,7 +37,7 @@
 #include "shell.h"
 #include "desktop-shell-server-protocol.h"
 #include "workspaces-server-protocol.h"
-#include "../shared/config-parser.h"
+#include "shared/config-parser.h"
 #include "xdg-shell-server-protocol.h"
 
 #define DEFAULT_NUM_WORKSPACES 1
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index abfba70..297b033 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -60,7 +60,7 @@
 #include "ivi-layout-export.h"
 #include "ivi-layout-private.h"
 
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 
 struct link_layer {
 	struct ivi_layout_layer *ivilayer;
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 935701a..cf2777c 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -39,9 +39,9 @@
 #include "compositor.h"
 #include "gl-renderer.h"
 #include "pixman-renderer.h"
-#include "../shared/image-loader.h"
-#include "../shared/os-compatibility.h"
-#include "../shared/cairo-util.h"
+#include "shared/image-loader.h"
+#include "shared/os-compatibility.h"
+#include "shared/cairo-util.h"
 #include "fullscreen-shell-client-protocol.h"
 #include "presentation_timing-server-protocol.h"
 
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 1c9c2f1..a7ca8d4 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -49,8 +49,8 @@
 #include "compositor.h"
 #include "gl-renderer.h"
 #include "pixman-renderer.h"
-#include "../shared/config-parser.h"
-#include "../shared/image-loader.h"
+#include "shared/config-parser.h"
+#include "shared/image-loader.h"
 #include "presentation_timing-server-protocol.h"
 
 #define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)
diff --git a/src/compositor.c b/src/compositor.c
index 38c0775..5d5df16 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -58,7 +58,7 @@
 #include "compositor.h"
 #include "scaler-server-protocol.h"
 #include "presentation_timing-server-protocol.h"
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "git-version.h"
 #include "version.h"
 
diff --git a/src/input.c b/src/input.c
index dee3ca9..8b2dfcc 100644
--- a/src/input.c
+++ b/src/input.c
@@ -31,7 +31,7 @@
 #include <fcntl.h>
 #include <limits.h>
 
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "compositor.h"
 
 static void
diff --git a/src/screen-share.c b/src/screen-share.c
index 524a0ca..a5e3ab8 100644
--- a/src/screen-share.c
+++ b/src/screen-share.c
@@ -37,7 +37,7 @@
 #include <wayland-client.h>
 
 #include "compositor.h"
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "fullscreen-shell-client-protocol.h"
 
 struct shared_output {
diff --git a/src/screenshooter.c b/src/screenshooter.c
index fc648a1..cceafde 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -33,7 +33,7 @@
 #include "compositor.h"
 #include "screenshooter-server-protocol.h"
 
-#include "../wcap/wcap-decode.h"
+#include "wcap/wcap-decode.h"
 
 struct screenshooter {
 	struct weston_compositor *ec;
diff --git a/tests/bad-buffer-test.c b/tests/bad-buffer-test.c
index 5175731..f1e04b8 100644
--- a/tests/bad-buffer-test.c
+++ b/tests/bad-buffer-test.c
@@ -25,7 +25,7 @@
 
 #include <unistd.h>
 
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "weston-test-client-helper.h"
 
 /* tests, that attempt to crash the compositor on purpose */
diff --git a/tests/buffer-count-test.c b/tests/buffer-count-test.c
index 693cfc5..202e1c0 100644
--- a/tests/buffer-count-test.c
+++ b/tests/buffer-count-test.c
@@ -29,7 +29,7 @@
 #include <GLES2/gl2.h>
 
 #include "weston-test-client-helper.h"
-#include "../shared/platform.h"
+#include "shared/platform.h"
 
 #define fail(msg) { fprintf(stderr, "%s failed\n", msg); return -1; }
 
diff --git a/tests/ivi_layout-internal-test.c b/tests/ivi_layout-internal-test.c
index f8ffdee..27130b6 100644
--- a/tests/ivi_layout-internal-test.c
+++ b/tests/ivi_layout-internal-test.c
@@ -28,8 +28,8 @@
 #include <string.h>
 #include <stdbool.h>
 
-#include "../src/compositor.h"
-#include "../ivi-shell/ivi-layout-export.h"
+#include "src/compositor.h"
+#include "ivi-shell/ivi-layout-export.h"
 
 struct test_context {
 	struct weston_compositor *compositor;
diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c
index e681bd7..d838dfc 100644
--- a/tests/ivi_layout-test-plugin.c
+++ b/tests/ivi_layout-test-plugin.c
@@ -28,10 +28,10 @@
 #include <signal.h>
 #include <string.h>
 
-#include "../src/compositor.h"
+#include "src/compositor.h"
 #include "weston-test-server-protocol.h"
 #include "ivi-test.h"
-#include "../ivi-shell/ivi-layout-export.h"
+#include "ivi-shell/ivi-layout-export.h"
 
 struct test_context;
 
diff --git a/tests/matrix-test.c b/tests/matrix-test.c
index 6bf4ba3..b37e17b 100644
--- a/tests/matrix-test.c
+++ b/tests/matrix-test.c
@@ -29,7 +29,7 @@
 #include <signal.h>
 #include <time.h>
 
-#include "../shared/matrix.h"
+#include "shared/matrix.h"
 
 struct inverse_matrix {
 	double LU[16];		/* column-major */
diff --git a/tests/surface-global-test.c b/tests/surface-global-test.c
index edc5d9f..40767df 100644
--- a/tests/surface-global-test.c
+++ b/tests/surface-global-test.c
@@ -24,7 +24,7 @@
 
 #include <assert.h>
 
-#include "../src/compositor.h"
+#include "src/compositor.h"
 
 static void
 surface_to_from_global(void *data)
diff --git a/tests/surface-test.c b/tests/surface-test.c
index d466a44..8bbf081 100644
--- a/tests/surface-test.c
+++ b/tests/surface-test.c
@@ -25,7 +25,7 @@
 #include <stdio.h>
 #include <assert.h>
 
-#include "../src/compositor.h"
+#include "src/compositor.h"
 
 static void
 surface_transform(void *data)
diff --git a/tests/vertex-clip-test.c b/tests/vertex-clip-test.c
index f706a04..a1623a8 100644
--- a/tests/vertex-clip-test.c
+++ b/tests/vertex-clip-test.c
@@ -27,7 +27,7 @@
 
 #include "weston-test-runner.h"
 
-#include "../src/vertex-clipping.h"
+#include "src/vertex-clipping.h"
 
 #define BOUNDING_BOX_TOP_Y 100.0f
 #define BOUNDING_BOX_LEFT_X 50.0f
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
index fda0ce7..40741ce 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -29,7 +29,7 @@
 #include <errno.h>
 #include <sys/mman.h>
 
-#include "../shared/os-compatibility.h"
+#include "shared/os-compatibility.h"
 #include "weston-test-client-helper.h"
 
 #define max(a, b) (((a) > (b)) ? (a) : (b))
diff --git a/tests/weston-test.c b/tests/weston-test.c
index 8f8781f..911ee6d 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -28,13 +28,13 @@
 #include <unistd.h>
 #include <string.h>
 
-#include "../src/compositor.h"
+#include "src/compositor.h"
 #include "weston-test-server-protocol.h"
 
 #ifdef ENABLE_EGL
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
-#include "../src/weston-egl-ext.h"
+#include "src/weston-egl-ext.h"
 #endif /* ENABLE_EGL */
 
 struct weston_test {
-- 
2.1.0



More information about the wayland-devel mailing list