diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-09-19 13:55:23 +0200 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2020-10-18 20:09:05 +0200 |
commit | 0f5262917fab34b44b43f63946fdf6bb0621875a (patch) | |
tree | 07e449767f00310ef038d786688f891600a01b4d | |
parent | 29346d05616ce69e5988b3f1257c340f91299602 (diff) |
Make all required includes explicit
Information as seen by IWYU 0.12 + clang 9 on Linux
97 files changed, 642 insertions, 373 deletions
@@ -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; @@ -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" @@ -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 @@ -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 @@ -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, @@ -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)) @@ -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" |