summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-09-19 13:55:23 +0200
committerBenny Baumann <BenBE@geshi.org>2020-10-18 20:09:05 +0200
commit0f5262917fab34b44b43f63946fdf6bb0621875a (patch)
tree07e449767f00310ef038d786688f891600a01b4d
parent29346d05616ce69e5988b3f1257c340f91299602 (diff)
Make all required includes explicit
Information as seen by IWYU 0.12 + clang 9 on Linux
-rw-r--r--Action.c22
-rw-r--r--Action.h5
-rw-r--r--Affinity.c3
-rw-r--r--Affinity.h5
-rw-r--r--AffinityPanel.c11
-rw-r--r--AvailableColumnsPanel.c9
-rw-r--r--AvailableMetersPanel.c13
-rw-r--r--AvailableMetersPanel.h1
-rw-r--r--BatteryMeter.c9
-rw-r--r--CPUMeter.c13
-rw-r--r--CRT.c18
-rw-r--r--CRT.h6
-rw-r--r--CategoriesPanel.c20
-rw-r--r--CategoriesPanel.h1
-rw-r--r--CheckItem.c5
-rw-r--r--CheckItem.h2
-rw-r--r--ClockMeter.c7
-rw-r--r--ColorsPanel.c14
-rw-r--r--ColumnsPanel.c17
-rw-r--r--ColumnsPanel.h2
-rw-r--r--CommandScreen.c15
-rw-r--r--CommandScreen.h3
-rw-r--r--DateMeter.c7
-rw-r--r--DateTimeMeter.c7
-rw-r--r--DiskIOMeter.c6
-rw-r--r--DisplayOptionsPanel.c9
-rw-r--r--EnvScreen.c16
-rw-r--r--EnvScreen.h2
-rw-r--r--FunctionBar.c11
-rw-r--r--Hashtable.h5
-rw-r--r--Header.c12
-rw-r--r--Header.h1
-rw-r--r--HostnameMeter.c7
-rw-r--r--IncSet.c12
-rw-r--r--IncSet.h2
-rw-r--r--InfoScreen.c17
-rw-r--r--InfoScreen.h24
-rw-r--r--ListItem.c10
-rw-r--r--ListItem.h2
-rw-r--r--LoadAverageMeter.c2
-rw-r--r--Macros.h2
-rw-r--r--MainPanel.c14
-rw-r--r--MainPanel.h6
-rw-r--r--Makefile.am1
-rw-r--r--MemoryMeter.c8
-rw-r--r--Meter.c20
-rw-r--r--Meter.h9
-rw-r--r--MetersPanel.c8
-rw-r--r--MetersPanel.h5
-rw-r--r--NetworkIOMeter.c7
-rw-r--r--Object.c3
-rw-r--r--Object.h6
-rw-r--r--OpenFilesScreen.c22
-rw-r--r--OpenFilesScreen.h4
-rw-r--r--Panel.c17
-rw-r--r--Panel.h5
-rw-r--r--Process.c35
-rw-r--r--Process.h12
-rw-r--r--ProcessList.c7
-rw-r--r--ProcessList.h8
-rw-r--r--ProvideCurses.h34
-rw-r--r--RichString.c6
-rw-r--r--RichString.h20
-rw-r--r--ScreenManager.c15
-rw-r--r--ScreenManager.h3
-rw-r--r--Settings.c12
-rw-r--r--Settings.h5
-rw-r--r--SignalsPanel.c9
-rw-r--r--SignalsPanel.h2
-rw-r--r--SwapMeter.c8
-rw-r--r--TasksMeter.c6
-rw-r--r--TraceScreen.c28
-rw-r--r--TraceScreen.h2
-rw-r--r--UptimeMeter.c1
-rw-r--r--UsersTable.c9
-rw-r--r--Vector.c3
-rw-r--r--Vector.h2
-rw-r--r--XUtils.c3
-rw-r--r--XUtils.h7
-rw-r--r--freebsd/FreeBSDProcess.h8
-rw-r--r--freebsd/FreeBSDProcessList.c25
-rw-r--r--freebsd/FreeBSDProcessList.h10
-rw-r--r--htop.c30
-rw-r--r--linux/Battery.c10
-rw-r--r--linux/Battery.h1
-rw-r--r--linux/IOPriorityPanel.c6
-rw-r--r--linux/IOPriorityPanel.h1
-rw-r--r--linux/LinuxProcess.c18
-rw-r--r--linux/LinuxProcess.h13
-rw-r--r--linux/LinuxProcessList.c56
-rw-r--r--linux/LinuxProcessList.h7
-rw-r--r--linux/Platform.c51
-rw-r--r--linux/Platform.h8
-rw-r--r--linux/PressureStallMeter.c4
-rw-r--r--linux/SELinuxMeter.c12
-rw-r--r--zfs/ZfsArcMeter.c13
-rw-r--r--zfs/ZfsCompressedArcMeter.c15
97 files changed, 642 insertions, 373 deletions
diff --git a/Action.c b/Action.c
index f53acf7b..b5bd5b54 100644
--- a/Action.c
+++ b/Action.c
@@ -8,28 +8,32 @@ in the source distribution for its full text.
#include "config.h"
#include "Action.h"
+
+#include <pwd.h>
+#include <stdbool.h>
+#include <stdlib.h>
+
#include "Affinity.h"
#include "AffinityPanel.h"
#include "CategoriesPanel.h"
+#include "CommandScreen.h"
#include "CRT.h"
#include "EnvScreen.h"
-#include "CommandScreen.h"
+#include "FunctionBar.h"
+#include "IncSet.h"
+#include "InfoScreen.h"
+#include "ListItem.h"
+#include "Macros.h"
#include "MainPanel.h"
#include "OpenFilesScreen.h"
#include "Process.h"
+#include "ProvideCurses.h"
#include "ScreenManager.h"
#include "SignalsPanel.h"
#include "TraceScreen.h"
-#include "Platform.h"
+#include "Vector.h"
#include "XUtils.h"
-#include <ctype.h>
-#include <math.h>
-#include <pwd.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <sys/param.h>
-#include <sys/time.h>
Object* Action_pickFromVector(State* st, Panel* list, int x, bool followProcess) {
Panel* panel = st->panel;
diff --git a/Action.h b/Action.h
index 40300ed4..e63b6810 100644
--- a/Action.h
+++ b/Action.h
@@ -7,8 +7,13 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include <stdbool.h>
+#include <sys/types.h>
+
#include "Header.h"
+#include "Object.h"
#include "Panel.h"
+#include "Process.h"
#include "ProcessList.h"
#include "Settings.h"
#include "UsersTable.h"
diff --git a/Affinity.c b/Affinity.c
index 852d4d5f..4d78944c 100644
--- a/Affinity.c
+++ b/Affinity.c
@@ -12,8 +12,11 @@ in the source distribution for its full text.
#include <stdlib.h>
+#include "XUtils.h"
+
#ifdef HAVE_LIBHWLOC
#include <hwloc.h>
+#include <hwloc/bitmap.h>
#ifdef __linux__
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_THREAD
#else
diff --git a/Affinity.h b/Affinity.h
index 6d744dde..0797b366 100644
--- a/Affinity.h
+++ b/Affinity.h
@@ -8,6 +8,11 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include "config.h"
+
+#include <stdbool.h>
+
+#include "Object.h"
#include "Process.h"
#include "ProcessList.h"
diff --git a/AffinityPanel.c b/AffinityPanel.c
index ab17b420..a8cb66ee 100644
--- a/AffinityPanel.c
+++ b/AffinityPanel.c
@@ -5,21 +5,30 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include "AffinityPanel.h"
#include <assert.h>
+#include <stdbool.h>
+#include <stdlib.h>
#include <string.h>
#include "CRT.h"
+#include "FunctionBar.h"
+#include "Object.h"
+#include "ProvideCurses.h"
+#include "RichString.h"
+#include "Settings.h"
#include "Vector.h"
#include "XUtils.h"
#ifdef HAVE_LIBHWLOC
#include <hwloc.h>
+#include <hwloc/bitmap.h>
#endif
+
typedef struct MaskItem_ {
Object super;
char* text;
diff --git a/AvailableColumnsPanel.c b/AvailableColumnsPanel.c
index 32bb470e..feea5786 100644
--- a/AvailableColumnsPanel.c
+++ b/AvailableColumnsPanel.c
@@ -7,14 +7,17 @@ in the source distribution for its full text.
#include "AvailableColumnsPanel.h"
-#include <assert.h>
#include <ctype.h>
+#include <stdbool.h>
#include <stdlib.h>
-#include <string.h>
#include "ColumnsPanel.h"
-#include "Header.h"
+#include "FunctionBar.h"
+#include "ListItem.h"
+#include "Object.h"
#include "Platform.h"
+#include "Process.h"
+#include "ProvideCurses.h"
#include "XUtils.h"
diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c
index faa69a8f..33006e94 100644
--- a/AvailableMetersPanel.c
+++ b/AvailableMetersPanel.c
@@ -6,17 +6,22 @@ in the source distribution for its full text.
*/
#include "AvailableMetersPanel.h"
-#include "MetersPanel.h"
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdlib.h>
#include "CPUMeter.h"
+#include "FunctionBar.h"
#include "Header.h"
#include "ListItem.h"
+#include "Meter.h"
+#include "MetersPanel.h"
+#include "Object.h"
#include "Platform.h"
+#include "ProvideCurses.h"
#include "XUtils.h"
-#include <assert.h>
-#include <stdlib.h>
-
static void AvailableMetersPanel_delete(Object* object) {
Panel* super = (Panel*) object;
diff --git a/AvailableMetersPanel.h b/AvailableMetersPanel.h
index f168869d..f7359365 100644
--- a/AvailableMetersPanel.h
+++ b/AvailableMetersPanel.h
@@ -7,6 +7,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include "Header.h"
#include "Panel.h"
#include "ProcessList.h"
#include "ScreenManager.h"
diff --git a/BatteryMeter.c b/BatteryMeter.c
index 22a63c7a..c91ae997 100644
--- a/BatteryMeter.c
+++ b/BatteryMeter.c
@@ -9,16 +9,13 @@ This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
#include "BatteryMeter.h"
+#include <math.h>
+
#include "Battery.h"
-#include "ProcessList.h"
#include "CRT.h"
-#include "Platform.h"
+#include "Object.h"
#include "XUtils.h"
-#include <math.h>
-#include <string.h>
-#include <stdlib.h>
-
static const int BatteryMeter_attributes[] = {
BATTERY
diff --git a/CPUMeter.c b/CPUMeter.c
index 7e70f454..10635478 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -7,15 +7,18 @@ in the source distribution for its full text.
#include "CPUMeter.h"
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "CRT.h"
-#include "Settings.h"
+#include "Object.h"
#include "Platform.h"
+#include "ProcessList.h"
+#include "RichString.h"
+#include "Settings.h"
#include "XUtils.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
static const int CPUMeter_attributes[] = {
CPU_NICE,
diff --git a/CRT.c b/CRT.c
index 2f9eb2b6..d3afd0ec 100644
--- a/CRT.c
+++ b/CRT.c
@@ -5,28 +5,26 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "config.h"
-#include "CRT.h"
+#include "config.h" // IWYU pragma: keep
-#include "RichString.h"
-#include "XUtils.h"
+#include "CRT.h"
-#include <stdio.h>
#include <errno.h>
+#include <langinfo.h>
+#include <locale.h>
#include <signal.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <locale.h>
-#include <langinfo.h>
#include <unistd.h>
+#include "ProvideCurses.h"
+#include "XUtils.h"
+
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
-#ifdef HAVE_SETUID_ENABLED
-#include <sys/types.h>
-#endif
#define ColorIndex(i,j) ((7-(i))*8+(j))
diff --git a/CRT.h b/CRT.h
index fa2f6de7..83cb34e6 100644
--- a/CRT.h
+++ b/CRT.h
@@ -7,10 +7,14 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "Macros.h"
+#include "config.h"
#include <stdbool.h>
+#include "Macros.h"
+#include "ProvideCurses.h"
+
+
typedef enum TreeStr_ {
TREE_STR_HORZ,
TREE_STR_VERT,
diff --git a/CategoriesPanel.c b/CategoriesPanel.c
index 8adf14f6..d6c25a69 100644
--- a/CategoriesPanel.c
+++ b/CategoriesPanel.c
@@ -7,15 +7,21 @@ in the source distribution for its full text.
#include "CategoriesPanel.h"
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdlib.h>
+
+#include "AvailableColumnsPanel.h"
#include "AvailableMetersPanel.h"
-#include "MetersPanel.h"
-#include "DisplayOptionsPanel.h"
-#include "ColumnsPanel.h"
#include "ColorsPanel.h"
-#include "AvailableColumnsPanel.h"
-
-#include <assert.h>
-#include <stdlib.h>
+#include "ColumnsPanel.h"
+#include "DisplayOptionsPanel.h"
+#include "FunctionBar.h"
+#include "ListItem.h"
+#include "MetersPanel.h"
+#include "Object.h"
+#include "ProvideCurses.h"
+#include "Vector.h"
static const char* const CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
diff --git a/CategoriesPanel.h b/CategoriesPanel.h
index 1f17bd2e..0582c642 100644
--- a/CategoriesPanel.h
+++ b/CategoriesPanel.h
@@ -7,6 +7,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include "Header.h"
#include "Panel.h"
#include "ProcessList.h"
#include "ScreenManager.h"
diff --git a/CheckItem.c b/CheckItem.c
index d1f11963..5c79ab13 100644
--- a/CheckItem.c
+++ b/CheckItem.c
@@ -7,11 +7,12 @@ in the source distribution for its full text.
#include "CheckItem.h"
-#include "CRT.h"
-
#include <assert.h>
#include <stdlib.h>
+#include "CRT.h"
+#include "RichString.h"
+
static void CheckItem_delete(Object* cast) {
CheckItem* this = (CheckItem*)cast;
diff --git a/CheckItem.h b/CheckItem.h
index b4300db4..a357111f 100644
--- a/CheckItem.h
+++ b/CheckItem.h
@@ -7,6 +7,8 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include <stdbool.h>
+
#include "Object.h"
typedef struct CheckItem_ {
diff --git a/ClockMeter.c b/ClockMeter.c
index 51fbed63..c6f2ab33 100644
--- a/ClockMeter.c
+++ b/ClockMeter.c
@@ -5,12 +5,15 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "ClockMeter.h"
+#include "config.h" // IWYU pragma: keep
-#include "CRT.h"
+#include "ClockMeter.h"
#include <time.h>
+#include "CRT.h"
+#include "Object.h"
+
static const int ClockMeter_attributes[] = {
CLOCK
diff --git a/ColorsPanel.c b/ColorsPanel.c
index 5b189ea3..24e63b0e 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -7,13 +7,19 @@ in the source distribution for its full text.
#include "ColorsPanel.h"