From 737c316a990ae34e91222bcef21bac819b420b1c Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 15 Feb 2024 19:39:49 +0100 Subject: [PATCH] Xnest: canonicalize includes: For cleaner code, make sure every source needing something from Xdefs.h does explicitly include it (not relying on indirect including) Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xnest/Args.c | 2 ++ hw/xnest/Args.h | 2 ++ hw/xnest/Color.c | 2 ++ hw/xnest/Color.h | 2 ++ hw/xnest/Cursor.c | 2 ++ hw/xnest/Events.c | 2 ++ hw/xnest/Font.c | 6 ++++-- hw/xnest/GC.c | 2 ++ hw/xnest/GCOps.c | 4 +++- hw/xnest/Init.c | 3 ++- hw/xnest/Init.h | 2 ++ hw/xnest/Keyboard.c | 2 ++ hw/xnest/Pixmap.c | 2 ++ hw/xnest/Screen.c | 2 ++ hw/xnest/Screen.h | 2 ++ hw/xnest/Window.c | 2 ++ hw/xnest/XNCursor.h | 2 ++ hw/xnest/XNFont.h | 2 ++ hw/xnest/XNGC.h | 2 ++ hw/xnest/XNPixmap.h | 2 ++ hw/xnest/XNWindow.h | 2 ++ 21 files changed, 45 insertions(+), 4 deletions(-) diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c index f54dbd608..76544eb2d 100644 --- a/hw/xnest/Args.c +++ b/hw/xnest/Args.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "screenint.h" #include "input.h" #include "misc.h" diff --git a/hw/xnest/Args.h b/hw/xnest/Args.h index 225418d22..cce503cb2 100644 --- a/hw/xnest/Args.h +++ b/hw/xnest/Args.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTARGS_H #define XNESTARGS_H +#include + extern char *xnestDisplayName; extern Bool xnestSynchronize; extern Bool xnestFullGeneration; diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c index 3a9e42203..7a1d9333a 100644 --- a/hw/xnest/Color.c +++ b/hw/xnest/Color.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "scrnintstr.h" #include "window.h" #include "windowstr.h" diff --git a/hw/xnest/Color.h b/hw/xnest/Color.h index 2c4e0be2a..480b35cbb 100644 --- a/hw/xnest/Color.h +++ b/hw/xnest/Color.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTCOLOR_H #define XNESTCOLOR_H +#include + #define DUMB_WINDOW_MANAGERS #define MAXCMAPS 1 diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c index d8486e664..fea5a959b 100644 --- a/hw/xnest/Cursor.c +++ b/hw/xnest/Cursor.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "screenint.h" #include "input.h" #include "misc.h" diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index 517ff7998..5474f88ab 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "screenint.h" #include "input.h" #include "misc.h" diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c index 192b80f53..4a8f7d328 100644 --- a/hw/xnest/Font.c +++ b/hw/xnest/Font.c @@ -18,11 +18,13 @@ is" without express or implied warranty. #include #include +#include #include -#include "misc.h" -#include "regionstr.h" #include #include + +#include "misc.h" +#include "regionstr.h" #include "dixfontstr.h" #include "scrnintstr.h" diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index ecfa61e39..df12aee7d 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "gcstruct.h" #include "windowstr.h" #include "pixmapstr.h" diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c index e1cf9d65f..9c35d7410 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -17,9 +17,11 @@ is" without express or implied warranty. #endif #include +#include #include -#include "regionstr.h" #include + +#include "regionstr.h" #include "gcstruct.h" #include "scrnintstr.h" #include "windowstr.h" diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 1f18e335b..8bf779621 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include +#include #include "dix/screenint_priv.h" @@ -28,7 +30,6 @@ is" without express or implied warranty. #include "windowstr.h" #include "servermd.h" #include "mi.h" -#include #include "dixfontstr.h" #include "Xnest.h" diff --git a/hw/xnest/Init.h b/hw/xnest/Init.h index 7c0291ebf..0dc143904 100644 --- a/hw/xnest/Init.h +++ b/hw/xnest/Init.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTINIT_H #define XNESTINIT_H +#include + extern Bool xnestDoFullGeneration; #endif /* XNESTINIT_H */ diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c index 46f257c83..7735b9310 100644 --- a/hw/xnest/Keyboard.c +++ b/hw/xnest/Keyboard.c @@ -21,8 +21,10 @@ is" without express or implied warranty. #endif #include +#include #include #include + #include "screenint.h" #include "inputstr.h" #include "misc.h" diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index 6514f3b31..804e8a3a3 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "regionstr.h" #include "pixmapstr.h" #include "scrnintstr.h" diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 5769dd1c2..14763e0e7 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "scrnintstr.h" #include "dix.h" #include "mi.h" diff --git a/hw/xnest/Screen.h b/hw/xnest/Screen.h index 17c514af7..4ab73c41b 100644 --- a/hw/xnest/Screen.h +++ b/hw/xnest/Screen.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTSCREEN_H #define XNESTSCREEN_H +#include + extern Window xnestDefaultWindows[MAXSCREENS]; extern Window xnestScreenSaverWindows[MAXSCREENS]; diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index d6f44a25a..7b410c4a3 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -17,7 +17,9 @@ is" without express or implied warranty. #endif #include +#include #include + #include "gcstruct.h" #include "window.h" #include "windowstr.h" diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h index 24f885bf0..727f20989 100644 --- a/hw/xnest/XNCursor.h +++ b/hw/xnest/XNCursor.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTCURSOR_H #define XNESTCURSOR_H +#include + #include "mipointrst.h" typedef struct { diff --git a/hw/xnest/XNFont.h b/hw/xnest/XNFont.h index a210b1790..1c10da1ea 100644 --- a/hw/xnest/XNFont.h +++ b/hw/xnest/XNFont.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTFONT_H #define XNESTFONT_H +#include + typedef struct { XFontStruct *font_struct; } xnestPrivFont; diff --git a/hw/xnest/XNGC.h b/hw/xnest/XNGC.h index 974173e50..6a222d073 100644 --- a/hw/xnest/XNGC.h +++ b/hw/xnest/XNGC.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTGC_H #define XNESTGC_H +#include + /* This file uses the GC definition form Xlib.h as XlibGC. */ typedef struct { diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h index b7b10e907..0bd8214a5 100644 --- a/hw/xnest/XNPixmap.h +++ b/hw/xnest/XNPixmap.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTPIXMAP_H #define XNESTPIXMAP_H +#include + extern DevPrivateKeyRec xnestPixmapPrivateKeyRec; #define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec) diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index 6320ede5e..59dba01c0 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -15,6 +15,8 @@ is" without express or implied warranty. #ifndef XNESTWINDOW_H #define XNESTWINDOW_H +#include + typedef struct { Window window; Window parent;