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

Jon A. Cruz jonc at osg.samsung.com
Mon Jun 15 15:37:07 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 5b64258..c5ecbe9 100644
--- a/clients/calibrator.c
+++ b/clients/calibrator.c
@@ -35,7 +35,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 9b1bd87..03b1b19 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -43,8 +43,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 cff7804..1ab2033 100644
--- a/clients/dnd.c
+++ b/clients/dnd.c
@@ -40,7 +40,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 a0a40f9..d28f221 100644
--- a/clients/image.c
+++ b/clients/image.c
@@ -41,7 +41,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 5a5c733..cff7664 100644
--- a/clients/ivi-shell-user-interface.c
+++ b/clients/ivi-shell-user-interface.c
@@ -33,9 +33,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 a6c96c6..c30d38a 100644
--- a/clients/multi-resource.c
+++ b/clients/multi-resource.c
@@ -39,7 +39,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 5fb1f08..e81f5f4 100644
--- a/clients/presentation-shm.c
+++ b/clients/presentation-shm.c
@@ -36,7 +36,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 040a438..f11e3ba 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -37,7 +37,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 71098c2..13e220a 100644
--- a/clients/simple-damage.c
+++ b/clients/simple-damage.c
@@ -36,7 +36,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 12d5f14..4c2e43b 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -47,7 +47,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 348ebca..b2253c0 100644
--- a/clients/simple-shm.c
+++ b/clients/simple-shm.c
@@ -34,7 +34,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 fefdd47..7864394 100644
--- a/clients/simple-touch.c
+++ b/clients/simple-touch.c
@@ -33,7 +33,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 0d484bc..67e8d1d 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -43,7 +43,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 3921f06..0eb589d 100644
--- a/clients/weston-info.c
+++ b/clients/weston-info.c
@@ -32,7 +32,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 f94be46..67afabd 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -66,11 +66,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 3863144..dc089a2 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -29,9 +29,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 925a676..3793614 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -38,7 +38,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 cf3fa68..6186821 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -63,7 +63,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 7cf61c9..4610552 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -42,9 +42,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 1446517..c5dcfb9 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -52,8 +52,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 1d61dde..2f7864f 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -61,7 +61,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 e2d33d6..65d2d09 100644
--- a/src/input.c
+++ b/src/input.c
@@ -34,7 +34,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 1a9a599..92c4e02 100644
--- a/src/screen-share.c
+++ b/src/screen-share.c
@@ -40,7 +40,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 e099a37..ecf2fdd 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -36,7 +36,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 d8328fa..ee7b223 100644
--- a/tests/bad-buffer-test.c
+++ b/tests/bad-buffer-test.c
@@ -28,7 +28,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 6025cd3..065249d 100644
--- a/tests/buffer-count-test.c
+++ b/tests/buffer-count-test.c
@@ -32,7 +32,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 0b1e144..3fb5148 100644
--- a/tests/ivi_layout-internal-test.c
+++ b/tests/ivi_layout-internal-test.c
@@ -31,8 +31,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 d329558..c39a714 100644
--- a/tests/ivi_layout-test-plugin.c
+++ b/tests/ivi_layout-test-plugin.c
@@ -31,10 +31,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 f8f9d95..520e12e 100644
--- a/tests/matrix-test.c
+++ b/tests/matrix-test.c
@@ -32,7 +32,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 919e9ef..11b2455 100644
--- a/tests/surface-global-test.c
+++ b/tests/surface-global-test.c
@@ -27,7 +27,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 9a91e74..55c324b 100644
--- a/tests/surface-test.c
+++ b/tests/surface-test.c
@@ -28,7 +28,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 347dc33..2a5ec10 100644
--- a/tests/vertex-clip-test.c
+++ b/tests/vertex-clip-test.c
@@ -30,7 +30,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 0d372d8..130d2b4 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -32,7 +32,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 e939350..f4fa5ce 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -31,13 +31,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