mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Make all required includes explicit
Information as seen by IWYU 0.12 + clang 9 on Linux
This commit is contained in:
@ -13,13 +13,17 @@ Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "BatteryMeter.h"
|
||||
#include "Macros.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
|
||||
|
@ -11,6 +11,7 @@ Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat
|
||||
|
||||
#include "BatteryMeter.h"
|
||||
|
||||
|
||||
void Battery_getData(double* level, ACPresence* isOnAC);
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,12 @@ in the source distribution for its full text.
|
||||
|
||||
#include "IOPriorityPanel.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "FunctionBar.h"
|
||||
#include "ListItem.h"
|
||||
#include "Object.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
|
||||
|
@ -9,7 +9,6 @@ in the source distribution for its full text.
|
||||
|
||||
#include "Panel.h"
|
||||
#include "IOPriority.h"
|
||||
#include "ListItem.h"
|
||||
|
||||
Panel* IOPriorityPanel_new(IOPriority currPrio);
|
||||
|
||||
|
@ -6,19 +6,19 @@ Released under the GNU GPLv2, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
#include "Process.h"
|
||||
#include "ProcessList.h"
|
||||
#include "LinuxProcess.h"
|
||||
#include "CRT.h"
|
||||
#include "Platform.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "CRT.h"
|
||||
#include "Process.h"
|
||||
#include "ProvideCurses.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
|
||||
/* semi-global */
|
||||
|
@ -8,6 +8,17 @@ Released under the GNU GPLv2, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "IOPriority.h"
|
||||
#include "Object.h"
|
||||
#include "Process.h"
|
||||
#include "RichString.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#define PROCESS_FLAG_LINUX_IOPRIO 0x0100
|
||||
#define PROCESS_FLAG_LINUX_OPENVZ 0x0200
|
||||
#define PROCESS_FLAG_LINUX_VSERVER 0x0400
|
||||
@ -87,8 +98,6 @@ typedef enum LinuxProcessFields {
|
||||
LAST_PROCESSFIELD = 124,
|
||||
} LinuxProcessField;
|
||||
|
||||
#include "IOPriority.h"
|
||||
|
||||
typedef struct LinuxProcess_ {
|
||||
Process super;
|
||||
bool isKernelThread;
|
||||
|
@ -5,43 +5,51 @@ Released under the GNU GPLv2, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include "LinuxProcessList.h"
|
||||
#include "LinuxProcess.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_DELAYACCT
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/taskstats.h>
|
||||
#include <netlink/attr.h>
|
||||
#include <netlink/handlers.h>
|
||||
#include <netlink/msg.h>
|
||||
#include <netlink/netlink.h>
|
||||
#include <netlink/socket.h>
|
||||
#include <netlink/genl/genl.h>
|
||||
#include <netlink/genl/ctrl.h>
|
||||
#endif
|
||||
|
||||
#include "CRT.h"
|
||||
#include "LinuxProcess.h"
|
||||
#include "Macros.h"
|
||||
#include "Object.h"
|
||||
#include "Process.h"
|
||||
#include "Settings.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef MAJOR_IN_MKDEV
|
||||
#include <sys/mkdev.h>
|
||||
#elif defined(MAJOR_IN_SYSMACROS)
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DELAYACCT
|
||||
#include <netlink/attr.h>
|
||||
#include <netlink/netlink.h>
|
||||
#include <netlink/genl/genl.h>
|
||||
#include <netlink/genl/ctrl.h>
|
||||
#include <netlink/socket.h>
|
||||
#include <netlink/msg.h>
|
||||
#include <linux/taskstats.h>
|
||||
#endif
|
||||
|
||||
static ssize_t xread(int fd, void *buf, size_t count) {
|
||||
// Read some bytes. Retry on EINTR and when we don't get as many bytes as we requested.
|
||||
|
@ -7,7 +7,14 @@ Released under the GNU GPLv2, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "Hashtable.h"
|
||||
#include "ProcessList.h"
|
||||
#include "UsersTable.h"
|
||||
#include "zfs/ZfsArcStats.h"
|
||||
|
||||
typedef struct CPUData_ {
|
||||
|
@ -5,39 +5,48 @@ Released under the GNU GPLv2, see the COPYING file
|
||||
in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "BatteryMeter.h"
|
||||
#include "ClockMeter.h"
|
||||
#include "CPUMeter.h"
|
||||
#include "DateMeter.h"
|
||||
#include "DateTimeMeter.h"
|
||||
#include "DiskIOMeter.h"
|
||||
#include "HostnameMeter.h"
|
||||
#include "IOPriority.h"
|
||||
#include "IOPriorityPanel.h"
|
||||
#include "LinuxProcess.h"
|
||||
#include "LinuxProcessList.h"
|
||||
#include "Battery.h"
|
||||
|
||||
#include "LoadAverageMeter.h"
|
||||
#include "Macros.h"
|
||||
#include "MainPanel.h"
|
||||
#include "Meter.h"
|
||||
#include "CPUMeter.h"
|
||||
#include "DiskIOMeter.h"
|
||||
#include "MemoryMeter.h"
|
||||
#include "NetworkIOMeter.h"
|
||||
#include "Object.h"
|
||||
#include "Panel.h"
|
||||
#include "PressureStallMeter.h"
|
||||
#include "ProcessList.h"
|
||||
#include "ProvideCurses.h"
|
||||
#include "SELinuxMeter.h"
|
||||
#include "Settings.h"
|
||||
#include "SwapMeter.h"
|
||||
#include "TasksMeter.h"
|
||||
#include "LoadAverageMeter.h"
|
||||
#include "UptimeMeter.h"
|
||||
#include "PressureStallMeter.h"
|
||||
#include "ClockMeter.h"
|
||||
#include "DateMeter.h"
|
||||
#include "DateTimeMeter.h"
|
||||
#include "HostnameMeter.h"
|
||||
#include "NetworkIOMeter.h"
|
||||
#include "zfs/ZfsArcMeter.h"
|
||||
#include "zfs/ZfsCompressedArcMeter.h"
|
||||
#include "LinuxProcess.h"
|
||||
#include "SELinuxMeter.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "zfs/ZfsArcMeter.h"
|
||||
#include "zfs/ZfsArcStats.h"
|
||||
#include "zfs/ZfsCompressedArcMeter.h"
|
||||
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, (int)M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
@ -7,10 +7,12 @@ 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 "Action.h"
|
||||
#include "MainPanel.h"
|
||||
#include "BatteryMeter.h"
|
||||
#include "LinuxProcess.h"
|
||||
#include "Meter.h"
|
||||
#include "Process.h"
|
||||
#include "SignalsPanel.h"
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
|
@ -8,10 +8,14 @@ in the source distribution for its full text.
|
||||
|
||||
#include "PressureStallMeter.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "CRT.h"
|
||||
#include "Meter.h"
|
||||
#include "Object.h"
|
||||
#include "Platform.h"
|
||||
#include "RichString.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
|
||||
|
@ -10,12 +10,16 @@ in the source distribution for its full text.
|
||||
#include "CRT.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <linux/magic.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/magic.h>
|
||||
#include <sys/statfs.h>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
#include "Macros.h"
|
||||
#include "Object.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
|
||||
static const int SELinuxMeter_attributes[] = {
|
||||
|
Reference in New Issue
Block a user