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 + #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 -#include #include #include 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 +#include #include #include #include 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 #include #include 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 #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 #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 + #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 #include +#include #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 +#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 #include #include +#include #include #include #include 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 #include #include 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 #include #include #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 +#include #include +#include -#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 #include #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 #include #include #include 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 -#include #include #include 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 #include #include +#include #include #include 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 #include #include -#include #include #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 -#include #include #include 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 #include #include +#include #include +#include +#include +#include #include +#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 - #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 #include #include #include -#include #include #include 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 +#include #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 #include #include -#include #include #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 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 #include #include @@ -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"