Skip to content

Commit

Permalink
cleaned up includes with iwyu
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurdahibhate authored and BenBE committed May 10, 2021
1 parent d9c9536 commit 1b74dfe
Show file tree
Hide file tree
Showing 71 changed files with 92 additions and 29 deletions.
1 change: 1 addition & 0 deletions AffinityPanel.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 "Panel.h"
#include "ProcessList.h"


extern const PanelClass AffinityPanel_class;

Panel* AffinityPanel_new(ProcessList* pl, const Affinity* affinity, int* width);
Expand Down
1 change: 0 additions & 1 deletion AvailableColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ in the source distribution for its full text.
#include "FunctionBar.h"
#include "ListItem.h"
#include "Object.h"
#include "Platform.h"
#include "Process.h"
#include "ProvideCurses.h"
#include "XUtils.h"
Expand Down
1 change: 1 addition & 0 deletions AvailableColumnsPanel.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 "Panel.h"


typedef struct AvailableColumnsPanel_ {
Panel super;
Panel* columns;
Expand Down
1 change: 1 addition & 0 deletions AvailableMetersPanel.h
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 "ScreenManager.h"
#include "Settings.h"


typedef struct AvailableMetersPanel_ {
Panel super;
ScreenManager* scr;
Expand Down
1 change: 1 addition & 0 deletions BatteryMeter.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This meter written by Ian P. Hands ([email protected], [email protected]).

#include "Meter.h"


typedef enum ACPresence_ {
AC_ABSENT,
AC_PRESENT,
Expand Down
1 change: 1 addition & 0 deletions CPUMeter.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 "Meter.h"


typedef enum {
CPU_METER_NICE = 0,
CPU_METER_NORMAL = 1,
Expand Down
1 change: 1 addition & 0 deletions CategoriesPanel.h
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 "ScreenManager.h"
#include "Settings.h"


typedef struct CategoriesPanel_ {
Panel super;
ScreenManager* scr;
Expand Down
2 changes: 2 additions & 0 deletions ClockMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ in the source distribution for its full text.
#include "ClockMeter.h"

#include <time.h>
#include <sys/time.h>

#include "CRT.h"
#include "Object.h"
#include "ProcessList.h"


static const int ClockMeter_attributes[] = {
Expand Down
1 change: 1 addition & 0 deletions ClockMeter.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 "Meter.h"


extern const MeterClass ClockMeter_class;

#endif
4 changes: 1 addition & 3 deletions ColorsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ in the source distribution for its full text.

#include "ColorsPanel.h"

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

#include "CRT.h"
#include "FunctionBar.h"
#include "Header.h"
#include "Object.h"
#include "OptionItem.h"
#include "ProvideCurses.h"
#include "RichString.h"
#include "Vector.h"


// TO ADD A NEW SCHEME:
Expand Down
1 change: 1 addition & 0 deletions ColorsPanel.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 "ScreenManager.h"
#include "Settings.h"


typedef struct ColorsPanel_ {
Panel super;

Expand Down
1 change: 1 addition & 0 deletions ColumnsPanel.h
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 "Panel.h"
#include "Settings.h"


typedef struct ColumnsPanel_ {
Panel super;

Expand Down
2 changes: 1 addition & 1 deletion CommandScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

#include "CommandScreen.h"

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

#include "Macros.h"
#include "Panel.h"
#include "ProvideCurses.h"
#include "XUtils.h"


static void CommandScreen_scan(InfoScreen* this) {
Expand Down
2 changes: 2 additions & 0 deletions DateMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ in the source distribution for its full text.
#include "DateMeter.h"

#include <time.h>
#include <sys/time.h>

#include "CRT.h"
#include "Object.h"
#include "ProcessList.h"


static const int DateMeter_attributes[] = {
Expand Down
1 change: 1 addition & 0 deletions DateMeter.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 "Meter.h"


extern const MeterClass DateMeter_class;

#endif
2 changes: 2 additions & 0 deletions DateTimeMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ in the source distribution for its full text.
#include "DateTimeMeter.h"

#include <time.h>
#include <sys/time.h>

#include "CRT.h"
#include "Object.h"
#include "ProcessList.h"


static const int DateTimeMeter_attributes[] = {
Expand Down
1 change: 1 addition & 0 deletions DateTimeMeter.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 "Meter.h"


extern const MeterClass DateTimeMeter_class;

#endif
2 changes: 1 addition & 1 deletion DiskIOMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ in the source distribution for its full text.

#include <stdbool.h>
#include <stdio.h>
#include <sys/time.h>

#include "CRT.h"
#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessList.h"
#include "RichString.h"
#include "XUtils.h"

Expand Down
1 change: 1 addition & 0 deletions DiskIOMeter.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 "Meter.h"


typedef struct DiskIOData_ {
uint64_t totalBytesRead;
uint64_t totalBytesWritten;
Expand Down
1 change: 1 addition & 0 deletions DisplayOptionsPanel.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 "ScreenManager.h"
#include "Settings.h"


typedef struct DisplayOptionsPanel_ {
Panel super;

Expand Down
1 change: 0 additions & 1 deletion EnvScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>

#include "CRT.h"
#include "Macros.h"
#include "Panel.h"
#include "Platform.h"
Expand Down
1 change: 1 addition & 0 deletions EnvScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Object.h"
#include "Process.h"


typedef struct EnvScreen_ {
InfoScreen super;
} EnvScreen;
Expand Down
1 change: 1 addition & 0 deletions FunctionBar.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 <stdbool.h>


typedef struct FunctionBar_ {
int size;
char** functions;
Expand Down
1 change: 0 additions & 1 deletion Hashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ in the source distribution for its full text.

#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Expand Down
4 changes: 1 addition & 3 deletions HostnameMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep

#include "HostnameMeter.h"
#include "Platform.h"

#include <unistd.h>

#include "CRT.h"
#include "Object.h"
#include "Platform.h"


static const int HostnameMeter_attributes[] = {
Expand Down
1 change: 1 addition & 0 deletions HostnameMeter.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 "Meter.h"


extern const MeterClass HostnameMeter_class;

#endif
1 change: 1 addition & 0 deletions IncSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ in the source distribution for its full text.
#include "Panel.h"
#include "Vector.h"


#define INCMODE_MAX 40

typedef enum {
Expand Down
1 change: 0 additions & 1 deletion InfoScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "CRT.h"
Expand Down
1 change: 1 addition & 0 deletions ListItem.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 "Object.h"


typedef struct ListItem_ {
Object super;
char* value;
Expand Down
1 change: 1 addition & 0 deletions LoadAverageMeter.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 "Object.h"
#include "Platform.h"
#include "ProcessList.h"
#include "RichString.h"
#include "XUtils.h"

Expand Down
1 change: 1 addition & 0 deletions LoadAverageMeter.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 "Meter.h"


extern const MeterClass LoadAverageMeter_class;

extern const MeterClass LoadMeter_class;
Expand Down
1 change: 1 addition & 0 deletions MemoryMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ in the source distribution for its full text.
#include "MemoryMeter.h"

#include <math.h>
#include <stddef.h>

#include "CRT.h"
#include "Object.h"
Expand Down
1 change: 1 addition & 0 deletions MemoryMeter.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 "Meter.h"


extern const MeterClass MemoryMeter_class;

#endif
1 change: 0 additions & 1 deletion Meter.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 "CRT.h"
#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "ProvideCurses.h"
#include "RichString.h"
#include "Settings.h"
Expand Down
1 change: 1 addition & 0 deletions Meter.h
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 "config.h" // IWYU pragma: keep

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/time.h>

Expand Down
5 changes: 3 additions & 2 deletions NetworkIOMeter.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include "NetworkIOMeter.h"

#include <stdbool.h>
#include <stddef.h>
#include <sys/time.h>
#include <stdint.h>

#include "CRT.h"
#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "Process.h"
#include "ProcessList.h"
#include "RichString.h"
#include "XUtils.h"

Expand Down
1 change: 1 addition & 0 deletions NetworkIOMeter.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "Meter.h"


typedef struct NetworkIOData_ {
uint64_t bytesReceived;
uint64_t packetsReceived;
Expand Down
1 change: 1 addition & 0 deletions OpenFilesScreen.h
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 "Object.h"
#include "Process.h"


typedef struct OpenFilesScreen_ {
InfoScreen super;
pid_t pid;
Expand Down
3 changes: 1 addition & 2 deletions Process.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/resource.h>
Expand All @@ -31,8 +32,6 @@ in the source distribution for its full text.

#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
#include <sys/sysmacros.h>
#endif


Expand Down
1 change: 0 additions & 1 deletion ProcessList.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 <assert.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>

#include "CRT.h"
#include "Hashtable.h"
Expand Down
2 changes: 2 additions & 0 deletions ProcessList.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep

#include <stdbool.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>

#include "Hashtable.h"
Expand Down
1 change: 1 addition & 0 deletions RichString.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ 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
Loading

0 comments on commit 1b74dfe

Please sign in to comment.