Skip to content

Commit

Permalink
IWYU update
Browse files Browse the repository at this point in the history
  • Loading branch information
cgzones authored and BenBE committed Aug 25, 2021
1 parent fecf093 commit 2bf626c
Show file tree
Hide file tree
Showing 32 changed files with 47 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Action.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions AvailableColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion AvailableColumnsPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ in the source distribution for its full text.

#include "Hashtable.h"
#include "Panel.h"
#include "ProcessList.h"


typedef struct AvailableColumnsPanel_ {
Expand Down
2 changes: 2 additions & 0 deletions AvailableMetersPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion CPUMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions CRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions CategoriesPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions ColorsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion ColorsPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ in the source distribution for its full text.
*/

#include "Panel.h"
#include "ScreenManager.h"
#include "Settings.h"


Expand Down
1 change: 1 addition & 0 deletions ColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ in the source distribution for its full text.

#include "ColumnsPanel.h"

#include <assert.h>
#include <ctype.h>
#include <stdlib.h>

Expand Down
1 change: 0 additions & 1 deletion ColumnsPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ in the source distribution for its full text.
#include <stdbool.h>

#include "Panel.h"
#include "ProcessList.h"
#include "Settings.h"


Expand Down
1 change: 0 additions & 1 deletion DynamicColumn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion DynamicColumn.h
Original file line number Diff line number Diff line change
@@ -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"


Expand Down
1 change: 1 addition & 0 deletions DynamicMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions Hashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions Header.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions HeaderLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions HeaderOptionsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
8 changes: 4 additions & 4 deletions MemorySwapMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_ {
Expand Down
3 changes: 3 additions & 0 deletions Panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions ProcessList.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion RichString.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions Settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 0 additions & 1 deletion TraceScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion linux/HugePageMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
9 changes: 9 additions & 0 deletions linux/LibSensors.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 0 additions & 4 deletions linux/LibSensors.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#ifndef HEADER_LibSensors
#define HEADER_LibSensors

#include "config.h" // IWYU pragma: keep

#include <stdio.h>

#include "linux/LinuxProcessList.h"


Expand Down
2 changes: 0 additions & 2 deletions linux/LinuxProcess.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions linux/LinuxProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions linux/LinuxProcessList.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>
Expand Down
4 changes: 4 additions & 0 deletions linux/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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"
Expand Down

0 comments on commit 2bf626c

Please sign in to comment.