Skip to content

Commit

Permalink
Update includes based on IWYU
Browse files Browse the repository at this point in the history
  • Loading branch information
BenBE committed Dec 26, 2023
1 parent 20bd784 commit e56089e
Show file tree
Hide file tree
Showing 67 changed files with 113 additions and 83 deletions.
7 changes: 6 additions & 1 deletion Action.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ in the source distribution for its full text.

#include "Action.h"

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

#include "CRT.h"
#include "CategoriesPanel.h"
Expand All @@ -27,13 +29,16 @@ in the source distribution for its full text.
#include "MainPanel.h"
#include "OpenFilesScreen.h"
#include "Process.h"
#include "ProcessTable.h"
#include "ProcessLocksScreen.h"
#include "ProvideCurses.h"
#include "Row.h"
#include "RowField.h"
#include "Scheduling.h"
#include "ScreenManager.h"
#include "SignalsPanel.h"
#include "Table.h"
#include "TraceScreen.h"
#include "UsersTable.h"
#include "Vector.h"
#include "XUtils.h"

Expand Down
1 change: 0 additions & 1 deletion Action.h
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 "Panel.h"
#include "Process.h"
#include "Settings.h"
#include "UsersTable.h"


typedef enum {
Expand Down
1 change: 1 addition & 0 deletions Affinity.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 "Affinity.h"

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

#include "Process.h"
Expand Down
1 change: 1 addition & 0 deletions AvailableColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ in the source distribution for its full text.
#include "Platform.h"
#include "Process.h"
#include "ProvideCurses.h"
#include "RowField.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 "Settings.h"


typedef struct AvailableColumnsPanel_ {
Expand Down
1 change: 1 addition & 0 deletions AvailableMetersPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ in the source distribution for its full text.
#include "Object.h"
#include "Platform.h"
#include "ProvideCurses.h"
#include "Settings.h"
#include "XUtils.h"


Expand Down
4 changes: 3 additions & 1 deletion CPUMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ in the source distribution for its full text.

#include "CPUMeter.h"

#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>

#include "CRT.h"
#include "Machine.h"
#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "Settings.h"
#include "XUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion CategoriesPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <stdlib.h>

#include "AvailableColumnsPanel.h"
#include "AvailableMetersPanel.h"
#include "ColorsPanel.h"
#include "DisplayOptionsPanel.h"
Expand All @@ -28,6 +27,7 @@ in the source distribution for its full text.
#include "ProvideCurses.h"
#include "ScreensPanel.h"
#include "ScreenTabsPanel.h"
#include "Settings.h"
#include "Vector.h"
#include "XUtils.h"

Expand Down
2 changes: 1 addition & 1 deletion ClockMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ in the source distribution for its full text.
#include <sys/time.h>

#include "CRT.h"
#include "Machine.h"
#include "Object.h"
#include "ProcessTable.h"


static const int ClockMeter_attributes[] = {
Expand Down
1 change: 0 additions & 1 deletion ColorsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ 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: 1 addition & 0 deletions ColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ in the source distribution for its full text.
#include "Object.h"
#include "Process.h"
#include "ProvideCurses.h"
#include "RowField.h"
#include "XUtils.h"


Expand Down
1 change: 1 addition & 0 deletions ColumnsPanel.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>

#include "Hashtable.h"
#include "Panel.h"
#include "Settings.h"

Expand Down
3 changes: 2 additions & 1 deletion CommandLine.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ in the source distribution for its full text.
#include "Hashtable.h"
#include "Header.h"
#include "IncSet.h"
#include "Machine.h"
#include "MainPanel.h"
#include "MetersPanel.h"
#include "Panel.h"
#include "Platform.h"
#include "Process.h"
#include "ProcessTable.h"
#include "ProvideCurses.h"
#include "ScreenManager.h"
#include "Settings.h"
#include "Table.h"
#include "UsersTable.h"
#include "XUtils.h"

Expand Down
2 changes: 1 addition & 1 deletion DateMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ in the source distribution for its full text.
#include <sys/time.h>

#include "CRT.h"
#include "Machine.h"
#include "Object.h"
#include "ProcessTable.h"


static const int DateMeter_attributes[] = {
Expand Down
2 changes: 1 addition & 1 deletion DateTimeMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ in the source distribution for its full text.
#include <sys/time.h>

#include "CRT.h"
#include "Machine.h"
#include "Object.h"
#include "ProcessTable.h"


static const int DateTimeMeter_attributes[] = {
Expand Down
5 changes: 2 additions & 3 deletions DiskIOMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ in the source distribution for its full text.
#include "DiskIOMeter.h"

#include <stdbool.h>
#include <stdio.h>

#include "CRT.h"
#include "Machine.h"
#include "Macros.h"
#include "Meter.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "Row.h"
#include "XUtils.h"


Expand Down
2 changes: 2 additions & 0 deletions DiskIOMeter.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 <stdint.h>

#include "Meter.h"


Expand Down
1 change: 1 addition & 0 deletions DisplayOptionsPanel.c
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 <stdbool.h>
#include <stdlib.h>
#include <string.h>

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

#include <stddef.h>
#include <stdlib.h>

#include "Platform.h"
#include "RichString.h"
Expand Down
3 changes: 2 additions & 1 deletion DynamicMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ in the source distribution for its full text.
#include <string.h>

#include "CRT.h"
#include "Machine.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "Settings.h"
#include "XUtils.h"


Expand Down
1 change: 1 addition & 0 deletions DynamicScreen.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 <stdlib.h>

#include "Hashtable.h"
#include "Platform.h"
Expand Down
1 change: 0 additions & 1 deletion DynamicScreen.h
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 "Hashtable.h"
#include "Panel.h"
#include "Settings.h"


typedef struct DynamicScreen_ {
Expand Down
2 changes: 0 additions & 2 deletions FileDescriptorMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ in the source distribution for its full text.
#include "FileDescriptorMeter.h"

#include <math.h>
#include <stdbool.h>
#include <string.h>

#include "CRT.h"
#include "Macros.h"
Expand Down
1 change: 1 addition & 0 deletions Header.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ in the source distribution for its full text.
#include "Object.h"
#include "Platform.h"
#include "ProvideCurses.h"
#include "Settings.h"
#include "XUtils.h"


Expand Down
2 changes: 2 additions & 0 deletions Header.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 "HeaderLayout.h"
#include "Machine.h"
#include "Meter.h"
Expand Down
1 change: 1 addition & 0 deletions ListItem.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 <stdbool.h>

#include "Object.h"
#include "RichString.h"


typedef struct ListItem_ {
Expand Down
2 changes: 1 addition & 1 deletion LoadAverageMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ in the source distribution for its full text.
#include "LoadAverageMeter.h"

#include "CRT.h"
#include "Machine.h"
#include "Object.h"
#include "Platform.h"
#include "ProcessTable.h"
#include "RichString.h"
#include "XUtils.h"

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

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

#include "CRT.h"
#include "Hashtable.h"
#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "Row.h"
#include "XUtils.h"
Expand Down
2 changes: 0 additions & 2 deletions Machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ in the source distribution for its full text.
#include <sys/time.h>
#include <sys/types.h>

#include "Hashtable.h"
#include "Panel.h"
#include "Settings.h"
#include "Table.h"
#include "UsersTable.h"
#include "Vector.h"

#ifdef HAVE_LIBHWLOC
#include <hwloc.h>
Expand Down
2 changes: 2 additions & 0 deletions Macros.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 <assert.h> // IWYU pragma: keep
#include <math.h>
#include <stdbool.h>
#include <string.h> // IWYU pragma: keep


#ifndef MINIMUM
#define MINIMUM(a, b) ((a) < (b) ? (a) : (b))
Expand Down
3 changes: 3 additions & 0 deletions MainPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ in the source distribution for its full text.

#include <ctype.h>
#include <stdlib.h>
#include <sys/types.h>

#include "CRT.h"
#include "FunctionBar.h"
#include "Machine.h"
#include "Platform.h"
#include "ProvideCurses.h"
#include "Row.h"
#include "RowField.h"
#include "Settings.h"
#include "Table.h"
#include "XUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion MainPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep

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

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

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

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

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

Expand Down
3 changes: 1 addition & 2 deletions Meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ in the source distribution for its full text.
#include "Meter.h"

#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Expand All @@ -21,6 +19,7 @@ in the source distribution for its full text.
#include "Object.h"
#include "ProvideCurses.h"
#include "RichString.h"
#include "Row.h"
#include "Settings.h"
#include "XUtils.h"

Expand Down
Loading

0 comments on commit e56089e

Please sign in to comment.