diff --git a/Action.h b/Action.h index 99e82be59..4a59072b6 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 f6c1868ec..08cbb1756 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 99477b6ef..828f7e6ca 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 ee0384ec9..5d77c5d4a 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 4f299d9c3..009d60872 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 ed78b59ec..8d18bab3b 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 1fefe47f2..7212aeced 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 86c2023fe..79f001c0a 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 6a031e20f..047f7afa0 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 c49e8f78d..8a36c6112 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 39503a507..8bc806eb2 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 62b382380..e71ff3746 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 2d0f97c75..a05c81bb3 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 70547ee43..da342cba4 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 f1761eeb7..d040afa68 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 f0cdacb9e..ba7c3aafa 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 a0a9d2493..c6f1a3476 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 05a306eaa..7be236e61 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 f0d28d728..9edc6d229 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 3371133cb..b653cf213 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 40080da11..41dba2166 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 92e8f1b56..7cd2fab57 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 ac1100f3e..558c7430d 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 1f95ababb..f3cf18db9 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 5c7838b45..93981c58b 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 9a3094601..8c637fdfc 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 5a92a3515..9a27fe57c 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 a4c26e208..aa899793e 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 c353f8a76..31da6e41d 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 bca5247ad..9c4f27ea4 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 90580b71f..5c5beedb7 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 47a30af5f..ccc92e19a 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"