cleaned up includes with iwyu

This commit is contained in:
mayurdahibhate 2021-04-29 20:42:43 +05:30 committed by BenBE
parent d9c95369bc
commit 1b74dfe187
71 changed files with 92 additions and 29 deletions

View File

@ -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);

View File

@ -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"

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Panel.h"
typedef struct AvailableColumnsPanel_ {
Panel super;
Panel* columns;

View File

@ -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;

View File

@ -11,6 +11,7 @@ This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
#include "Meter.h"
typedef enum ACPresence_ {
AC_ABSENT,
AC_PRESENT,

View File

@ -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,

View File

@ -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;

View File

@ -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[] = {

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass ClockMeter_class;
#endif

View File

@ -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:

View File

@ -11,6 +11,7 @@ in the source distribution for its full text.
#include "ScreenManager.h"
#include "Settings.h"
typedef struct ColorsPanel_ {
Panel super;

View File

@ -12,6 +12,7 @@ in the source distribution for its full text.
#include "Panel.h"
#include "Settings.h"
typedef struct ColumnsPanel_ {
Panel super;

View File

@ -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) {

View File

@ -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[] = {

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass DateMeter_class;
#endif

View File

@ -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[] = {

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass DateTimeMeter_class;
#endif

View File

@ -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"

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
typedef struct DiskIOData_ {
uint64_t totalBytesRead;
uint64_t totalBytesWritten;

View File

@ -11,6 +11,7 @@ in the source distribution for its full text.
#include "ScreenManager.h"
#include "Settings.h"
typedef struct DisplayOptionsPanel_ {
Panel super;

View File

@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>
#include "CRT.h"
#include "Macros.h"
#include "Panel.h"
#include "Platform.h"

View File

@ -5,6 +5,7 @@
#include "Object.h"
#include "Process.h"
typedef struct EnvScreen_ {
InfoScreen super;
} EnvScreen;

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include <stdbool.h>
typedef struct FunctionBar_ {
int size;
char** functions;

View File

@ -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>

View File

@ -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[] = {

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass HostnameMeter_class;
#endif

View File

@ -14,6 +14,7 @@ in the source distribution for its full text.
#include "Panel.h"
#include "Vector.h"
#define INCMODE_MAX 40
typedef enum {

View File

@ -4,7 +4,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "CRT.h"

View File

@ -11,6 +11,7 @@ in the source distribution for its full text.
#include "Object.h"
typedef struct ListItem_ {
Object super;
char* value;

View File

@ -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"

View File

@ -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;

View File

@ -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"

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass MemoryMeter_class;
#endif

View File

@ -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"

View File

@ -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>

View File

@ -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"

View File

@ -3,6 +3,7 @@
#include "Meter.h"
typedef struct NetworkIOData_ {
uint64_t bytesReceived;
uint64_t packetsReceived;

View File

@ -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;

View File

@ -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>
@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Panel.h"
typedef struct SignalItem_ {
const char* name;
int number;

View File

@ -5,8 +5,12 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "SwapMeter.h"
#include <stddef.h>
#include "CRT.h"
#include "Object.h"
#include "Platform.h"

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass SwapMeter_class;
#endif

View File

@ -4,11 +4,16 @@ htop - SysArchMeter.c
Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "Platform.h"
#include "SysArchMeter.h"
#include <stddef.h>
#include "CRT.h"
#include "Object.h"
#include "Platform.h"
#include "XUtils.h"

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass TasksMeter_class;
#endif

View File

@ -23,7 +23,6 @@ in the source distribution for its full text.
#include "CRT.h"
#include "FunctionBar.h"
#include "IncSet.h"
#include "Panel.h"
#include "ProvideCurses.h"
#include "XUtils.h"

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass UptimeMeter_class;
#endif

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Hashtable.h"
typedef struct UsersTable_ {
Hashtable* users;
} UsersTable;

View File

@ -9,7 +9,6 @@ in the source distribution for its full text.
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
void Generic_gettime_realtime(struct timeval* tvp, uint64_t* msec);

View File

@ -6,15 +6,18 @@ in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "Macros.h"
#include "XUtils.h"
#include "generic/uname.h"
#include <stdio.h>
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#include "XUtils.h"
#ifndef OSRELEASEFILE
#define OSRELEASEFILE "/etc/os-release"

View File

@ -7,15 +7,19 @@ in the source distribution for its full text.
#include "HugePageMeter.h"
#include "LinuxProcessList.h"
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include "CRT.h"
#include "LinuxProcessList.h"
#include "Macros.h"
#include "Object.h"
#include "ProcessList.h"
#include "RichString.h"
static const char *HugePageMeter_active_labels[4] = { NULL, NULL, NULL, NULL };
static const int HugePageMeter_attributes[] = {

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass HugePageMeter_class;
#endif /* HEADER_HugePageMeter */

View File

@ -8,6 +8,7 @@ in the source distribution for its full text.
#include "LinuxProcess.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -20,6 +20,7 @@ in the source distribution for its full text.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>

View File

@ -12,7 +12,6 @@ in the source distribution for its full text.
#include <assert.h>
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <math.h>
@ -63,6 +62,7 @@ in the source distribution for its full text.
#include "zfs/ZfsCompressedArcMeter.h"
#ifdef HAVE_LIBCAP
#include <errno.h>
#include <sys/capability.h>
#endif

View File

@ -9,6 +9,9 @@ in the source distribution for its full text.
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#include "Action.h"

View File

@ -12,6 +12,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass PressureStallCPUSomeMeter_class;
extern const MeterClass PressureStallIOSomeMeter_class;

View File

@ -10,12 +10,12 @@ in the source distribution for its full text.
#include "CRT.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
#include "Macros.h"
#include "Object.h"
#include "XUtils.h"

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass SELinuxMeter_class;
#endif /* HEADER_SELinuxMeter */

View File

@ -19,6 +19,7 @@ in the source distribution for its full text.
#include "Macros.h"
#include "Object.h"
#include "RichString.h"
#include "Settings.h"
#include "XUtils.h"
#if defined(BUILD_STATIC) && defined(HAVE_LIBSYSTEMD)

View File

@ -10,6 +10,7 @@ in the source distribution for its full text.
#include "Meter.h"
extern const MeterClass SystemdMeter_class;
#endif /* HEADER_SystemdMeter */

View File

@ -1,5 +1,7 @@
#include "ZramMeter.h"
#include <stddef.h>
#include "CRT.h"
#include "Meter.h"
#include "Object.h"

View File

@ -3,6 +3,7 @@
#include "Meter.h"
extern const MeterClass ZramMeter_class;
#endif

View File

@ -24,6 +24,7 @@ in the source distribution for its full text.
#include "CRT.h"
#define MAXCMDLINE 255
static int pageSize;

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "Settings.h"
typedef struct UnsupportedProcess_ {
Process super;

View File

@ -8,6 +8,8 @@ in the source distribution for its full text.
#include "ZfsArcMeter.h"
#include "ZfsArcStats.h"
#include <stddef.h>
#include "CRT.h"
#include "Object.h"
#include "Platform.h"

View File

@ -11,6 +11,7 @@ in the source distribution for its full text.
#include "Meter.h"
void ZfsArcMeter_readStats(Meter* this, const ZfsArcStats* stats);
extern const MeterClass ZfsArcMeter_class;

View File

@ -7,13 +7,14 @@ in the source distribution for its full text.
#include "ZfsCompressedArcMeter.h"
#include <stddef.h>
#include "CRT.h"
#include "Meter.h"
#include "Object.h"
#include "Platform.h"
#include "RichString.h"
#include "XUtils.h"
#include "zfs/ZfsArcStats.h"

View File

@ -11,6 +11,7 @@ in the source distribution for its full text.
#include "Meter.h"
void ZfsCompressedArcMeter_readStats(Meter* this, const ZfsArcStats* stats);
extern const MeterClass ZfsCompressedArcMeter_class;