From e3fb954aeb4a0eb43f53f8fd3d13fe8e2d5318e5 Mon Sep 17 00:00:00 2001 From: Hadeed Ahmad Date: Fri, 8 Sep 2023 21:51:30 +0500 Subject: [PATCH] Fix inludes using IWYU --- src/input.c | 2 -- src/kilo.c | 6 ++++-- src/terminal.c | 8 +++++++- src/ui.c | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/input.c b/src/input.c index 7812aee..bc5c75c 100644 --- a/src/input.c +++ b/src/input.c @@ -1,5 +1,3 @@ -#include - #include "commands.h" #include "input.h" #include "kilo.h" diff --git a/src/kilo.c b/src/kilo.c index 3ac8f0f..7d6a60f 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -3,13 +3,15 @@ #include #include #include +#include #include #include "buffer.h" -#include "kilo.h" -#include "ui.h" #include "input.h" +#include "kilo.h" #include "terminal.h" +#include "ui.h" +#include "utils.h" void editor_init(char *filename); diff --git a/src/terminal.c b/src/terminal.c index d65398a..7166b24 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1,12 +1,18 @@ +// IWYU pragma: no_include +// IWYU pragma: no_include +// IWYU pragma: no_include +// IWYU pragma: no_include + #include #include #include #include #include +#include "input.h" #include "kilo.h" -#include "utils.h" #include "terminal.h" +#include "utils.h" ERRCODE terminal_enable_raw(void) { if (tcgetattr(STDIN_FILENO, &E.orig_termios) == -1) diff --git a/src/ui.c b/src/ui.c index 571ab38..f000d6b 100644 --- a/src/ui.c +++ b/src/ui.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "buffer.h"