summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-08-24 17:27:43 +0200
committerBenBE <BenBE@geshi.org>2021-08-25 09:54:30 +0200
commit2bf626c4e4c827397d40c0b84a5023c308aeec73 (patch)
tree391a6c42965af343cf9b356eb9a22c9d81171194
parentfecf09336755582cf1c64ecb89fcb2181c87c681 (diff)
IWYU update
-rw-r--r--Action.h2
-rw-r--r--AvailableColumnsPanel.c2
-rw-r--r--AvailableColumnsPanel.h1
-rw-r--r--AvailableMetersPanel.h2
-rw-r--r--CPUMeter.c1
-rw-r--r--CRT.c1
-rw-r--r--CategoriesPanel.c3
-rw-r--r--ColorsPanel.c1
-rw-r--r--ColorsPanel.h1
-rw-r--r--ColumnsPanel.c1
-rw-r--r--ColumnsPanel.h1
-rw-r--r--DynamicColumn.c1
-rw-r--r--DynamicColumn.h3
-rw-r--r--DynamicMeter.c1
-rw-r--r--Hashtable.c4
-rw-r--r--Header.c2
-rw-r--r--Header.h1
-rw-r--r--HeaderLayout.h2
-rw-r--r--HeaderOptionsPanel.c4
-rw-r--r--MemorySwapMeter.c8
-rw-r--r--Panel.h3
-rw-r--r--ProcessList.h1
-rw-r--r--RichString.c1
-rw-r--r--Settings.c1
-rw-r--r--TraceScreen.c1
-rw-r--r--linux/HugePageMeter.c1
-rw-r--r--linux/LibSensors.c9
-rw-r--r--linux/LibSensors.h4
-rw-r--r--linux/LinuxProcess.c2
-rw-r--r--linux/LinuxProcess.h1
-rw-r--r--linux/LinuxProcessList.c3
-rw-r--r--linux/Platform.h4
32 files changed, 47 insertions, 26 deletions
diff --git a/Action.h b/Action.h
index 99e82be5..4a59072b 100644
--- a/Action.h
+++ b/Action.h
@@ -33,7 +33,7 @@ typedef enum {
HTOP_RESIZE = 0x80 | HTOP_REFRESH | HTOP_REDRAW_BAR | HTOP_UPDATE_PANELHDR,
} Htop_Reaction;
-struct MainPanel_;
+struct MainPanel_; // IWYU pragma: keep
typedef struct State_ {
Settings* settings;
diff --git a/AvailableColumnsPanel.c b/AvailableColumnsPanel.c
index f6c1868e..08cbb175 100644
--- a/AvailableColumnsPanel.c
+++ b/AvailableColumnsPanel.c
@@ -17,10 +17,8 @@ in the source distribution for its full text.
#include "FunctionBar.h"
#include "Hashtable.h"
#include "ListItem.h"
-#include "Macros.h"
#include "Object.h"
#include "Process.h"
-#include "ProcessList.h"
#include "ProvideCurses.h"
#include "XUtils.h"
diff --git a/AvailableColumnsPanel.h b/AvailableColumnsPanel.h
index 99477b6e..828f7e6c 100644
--- a/AvailableColumnsPanel.h
+++ b/AvailableColumnsPanel.h
@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "Hashtable.h"
#include "Panel.h"
-#include "ProcessList.h"
typedef struct AvailableColumnsPanel_ {
diff --git a/AvailableMetersPanel.h b/AvailableMetersPanel.h
index ee0384ec..5d77c5d4 100644
--- a/AvailableMetersPanel.h
+++ b/AvailableMetersPanel.h
@@ -7,6 +7,8 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include <stddef.h>
+
#include "Header.h"
#include "MetersPanel.h"
#include "Panel.h"
diff --git a/CPUMeter.c b/CPUMeter.c
index 4f299d9c..009d6087 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -10,7 +10,6 @@ in the source distribution for its full text.
#include "CPUMeter.h"
#include <math.h>
-#include <stdint.h>
#include <stdlib.h>
#include <string.h>
diff --git a/CRT.c b/CRT.c
index ed78b59e..8d18bab3 100644
--- a/CRT.c
+++ b/CRT.c
@@ -10,6 +10,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include <errno.h>
+#include <fcntl.h>
#include <langinfo.h>
#include <signal.h>
#include <stdio.h>
diff --git a/CategoriesPanel.c b/CategoriesPanel.c
index 1fefe47f..7212aece 100644
--- a/CategoriesPanel.c
+++ b/CategoriesPanel.c
@@ -18,12 +18,15 @@ in the source distribution for its full text.
#include "DisplayOptionsPanel.h"
#include "FunctionBar.h"
#include "Header.h"
+#include "HeaderLayout.h"
#include "HeaderOptionsPanel.h"
#include "ListItem.h"
+#include "Macros.h"
#include "MetersPanel.h"
#include "Object.h"
#include "ProvideCurses.h"
#include "Vector.h"
+#include "XUtils.h"
static const char* const CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
diff --git a/ColorsPanel.c b/ColorsPanel.c
index 86c2023f..79f001c0 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -13,6 +13,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "FunctionBar.h"
+#include "Macros.h"
#include "Object.h"
#include "OptionItem.h"
#include "ProvideCurses.h"
diff --git a/ColorsPanel.h b/ColorsPanel.h
index 6a031e20..047f7afa 100644
--- a/ColorsPanel.h
+++ b/ColorsPanel.h
@@ -8,7 +8,6 @@ in the source distribution for its full text.
*/
#include "Panel.h"
-#include "ScreenManager.h"
#include "Settings.h"
diff --git a/ColumnsPanel.c b/ColumnsPanel.c
index c49e8f78..8a36c611 100644
--- a/ColumnsPanel.c
+++ b/ColumnsPanel.c
@@ -7,6 +7,7 @@ in the source distribution for its full text.
#include "ColumnsPanel.h"
+#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
diff --git a/ColumnsPanel.h b/ColumnsPanel.h
index 39503a50..8bc806eb 100644
--- a/ColumnsPanel.h
+++ b/ColumnsPanel.h
@@ -10,7 +10,6 @@ in the source distribution for its full text.
#include <stdbool.h>
#include "Panel.h"
-#include "ProcessList.h"
#include "Settings.h"
diff --git a/DynamicColumn.c b/DynamicColumn.c
index 62b38238..e71ff374 100644
--- a/DynamicColumn.c
+++ b/DynamicColumn.c
@@ -14,7 +14,6 @@ in the source distribution for its full text.
#include <stddef.h>
#include "Platform.h"
-#include "ProcessList.h"
#include "RichString.h"
#include "XUtils.h"
diff --git a/DynamicColumn.h b/DynamicColumn.h
index 2d0f97c7..a05c81bb 100644
--- a/DynamicColumn.h
+++ b/DynamicColumn.h
@@ -1,9 +1,10 @@
#ifndef HEADER_DynamicColumn
#define HEADER_DynamicColumn
+#include <stdbool.h>
+
#include "Hashtable.h"
#include "Process.h"
-#include "ProcessList.h"
#include "RichString.h"
diff --git a/DynamicMeter.c b/DynamicMeter.c
index 70547ee4..da342cba 100644
--- a/DynamicMeter.c
+++ b/DynamicMeter.c
@@ -12,6 +12,7 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <stddef.h>
+#include <string.h>
#include "CRT.h"
#include "Object.h"
diff --git a/Hashtable.c b/Hashtable.c
index f1761eeb..d040afa6 100644
--- a/Hashtable.c
+++ b/Hashtable.c
@@ -18,6 +18,10 @@ in the source distribution for its full text.
#include "Macros.h"
#include "XUtils.h"
+#ifndef NDEBUG
+#include <stdio.h>
+#endif
+
typedef struct HashtableItem_ {
ht_key_t key;
diff --git a/Header.c b/Header.c
index f0cdacb9..ba7c3aaf 100644
--- a/Header.c
+++ b/Header.c
@@ -7,8 +7,10 @@ in the source distribution for its full text.
#include "Header.h"
+#include <assert.h>
#include <math.h>
#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Header.h b/Header.h
index a0a9d249..c6f1a347 100644
--- a/Header.h
+++ b/Header.h
@@ -7,6 +7,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include "HeaderLayout.h"
#include "Meter.h"
#include "ProcessList.h"
#include "Settings.h"
diff --git a/HeaderLayout.h b/HeaderLayout.h
index 05a306ea..7be236e6 100644
--- a/HeaderLayout.h
+++ b/HeaderLayout.h
@@ -7,6 +7,8 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include "config.h" // IWYU pragma: keep
+
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
diff --git a/HeaderOptionsPanel.c b/HeaderOptionsPanel.c
index f0d28d72..9edc6d22 100644
--- a/HeaderOptionsPanel.c
+++ b/HeaderOptionsPanel.c
@@ -7,17 +7,17 @@ in the source distribution for its full text.
#include "HeaderOptionsPanel.h"
+#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include "CRT.h"
#include "FunctionBar.h"
#include "Header.h"
+#include "HeaderLayout.h"
#include "Object.h"
#include "OptionItem.h"
#include "ProvideCurses.h"
-#include "RichString.h"
-#include "Vector.h"
static const char* const HeaderOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
diff --git a/MemorySwapMeter.c b/MemorySwapMeter.c
index 3371133c..b653cf21 100644
--- a/MemorySwapMeter.c
+++ b/MemorySwapMeter.c
@@ -7,15 +7,15 @@ in the source distribution for its full text.
#include "MemorySwapMeter.h"
-#include <math.h>
+#include <assert.h>
#include <stddef.h>
+#include <stdlib.h>
-#include "CRT.h"
+#include "Macros.h"
#include "MemoryMeter.h"
#include "Object.h"
-#include "Platform.h"
-#include "RichString.h"
#include "SwapMeter.h"
+#include "XUtils.h"
typedef struct MemorySwapMeterData_ {
diff --git a/Panel.h b/Panel.h
index 40080da1..41dba216 100644
--- a/Panel.h
+++ b/Panel.h
@@ -7,6 +7,9 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include "config.h" // IWYU pragma: keep
+
+#include <assert.h>
#include <stdbool.h>
#include "CRT.h"
diff --git a/ProcessList.h b/ProcessList.h
index 92e8f1b5..7cd2fab5 100644
--- a/ProcessList.h
+++ b/ProcessList.h
@@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep
+#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/time.h>
diff --git a/RichString.c b/RichString.c
index ac1100f3..558c7430 100644
--- a/RichString.c
+++ b/RichString.c
@@ -8,7 +8,6 @@ in the source distribution for its full text.
#include "RichString.h"
#include <ctype.h>
-#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --git a/Settings.c b/Settings.c
index 1f95abab..f3cf18db 100644
--- a/Settings.c
+++ b/Settings.c
@@ -12,6 +12,7 @@ in the source distribution for its full text.
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
diff --git a/TraceScreen.c b/TraceScreen.c
index 5c7838b4..93981c58 100644
--- a/TraceScreen.c
+++ b/TraceScreen.c
@@ -18,7 +18,6 @@ in the source distribution for its full text.
#include <string.h>
#include <unistd.h>
#include <sys/select.h>
-#include <sys/time.h>
#include <sys/wait.h>
#include "CRT.h"
diff --git a/linux/HugePageMeter.c b/linux/HugePageMeter.c
index 9a309460..8c637fdf 100644
--- a/linux/HugePageMeter.c
+++ b/linux/HugePageMeter.c
@@ -8,7 +8,6 @@ in the source distribution for its full text.
#include "linux/HugePageMeter.h"
#include <assert.h>
-#include <limits.h>
#include <math.h>
#include <stddef.h>
diff --git a/linux/LibSensors.c b/linux/LibSensors.c
index 5a92a351..9a27fe57 100644
--- a/linux/LibSensors.c
+++ b/linux/LibSensors.c
@@ -1,13 +1,22 @@
#include "linux/LibSensors.h"
+#include "config.h"
+
#ifdef HAVE_SENSORS_SENSORS_H
+#include <assert.h>
#include <dlfcn.h>
#include <errno.h>
+#include <limits.h>
#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include <sensors/sensors.h>
+#include "Macros.h"
#include "XUtils.h"
+#include "linux/LinuxProcessList.h"
#ifdef BUILD_STATIC
diff --git a/linux/LibSensors.h b/linux/LibSensors.h
index a4c26e20..aa899793 100644
--- a/linux/LibSensors.h
+++ b/linux/LibSensors.h
@@ -1,10 +1,6 @@
#ifndef HEADER_LibSensors
#define HEADER_LibSensors
-#include "config.h" // IWYU pragma: keep
-
-#include <stdio.h>
-
#include "linux/LinuxProcessList.h"
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index c353f8a7..31da6e41 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -8,11 +8,9 @@ in the source distribution for its full text.
#include "linux/LinuxProcess.h"
-#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <syscall.h>
#include <unistd.h>
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index bca5247a..9c4f27ea 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -11,6 +11,7 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep
#include <stdbool.h>
+#include <sys/types.h>
#include "linux/IOPriority.h"
#include "Object.h"
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 90580b71..5c5beedb 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -24,7 +24,6 @@ in the source distribution for its full text.
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
-#include <sys/time.h>
#include <sys/types.h>
#ifdef HAVE_DELAYACCT
@@ -47,7 +46,7 @@ in the source distribution for its full text.
#include "Settings.h"
#include "XUtils.h"
#include "linux/LinuxProcess.h"
-#include "linux/Platform.h" // needed for GNU/hurd to get PATH_MAX
+#include "linux/Platform.h" // needed for GNU/hurd to get PATH_MAX // IWYU pragma: keep
#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
diff --git a/linux/Platform.h b/linux/Platform.h
index 47a30af5..ccc92e19 100644
--- a/linux/Platform.h
+++ b/linux/Platform.h
@@ -7,6 +7,8 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include "config.h"
+
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
@@ -18,10 +20,12 @@ in the source distribution for its full text.
#include "BatteryMeter.h"
#include "DiskIOMeter.h"
#include "Hashtable.h"
+#include "Macros.h"
#include "Meter.h"
#include "NetworkIOMeter.h"
#include "Process.h"
#include "ProcessLocksScreen.h"
+#include "RichString.h"
#include "SignalsPanel.h"
#include "generic/gettime.h"
#include "generic/hostname.h"

© 2014-2024 Faster IT GmbH | imprint | privacy policy