Various code tidyups based on review commentary from BenBE

This commit is contained in:
Nathan Scott 2021-04-14 11:34:47 +10:00
parent b232119e4b
commit 9ce9557e69
5 changed files with 129 additions and 123 deletions

View File

@ -101,7 +101,7 @@ esac
AC_ARG_ENABLE([pcp],
[AS_HELP_STRING([--enable-pcp],
[build a pcp htop binary @<:@default=no@:>@])],
[build a pcp-htop binary @<:@default=no@:>@])],
[],
[enable_pcp=no])
case "$enable_pcp" in

View File

@ -9,7 +9,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h"
#include "config.h" // IWYU pragma: keep
#include <stdbool.h>
#include <sys/types.h>
@ -19,6 +19,7 @@ in the source distribution for its full text.
#include "RichString.h"
#include "Settings.h"
#define PROCESS_FLAG_LINUX_CGROUP 0x0800
#define PROCESS_FLAG_LINUX_OOM 0x1000
#define PROCESS_FLAG_LINUX_SMAPS 0x2000

View File

@ -7,17 +7,19 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h"
#include "config.h" // IWYU pragma: keep
#include <stdbool.h>
#include <sys/types.h>
#include "Hashtable.h"
#include "ProcessList.h"
#include "pcp/Platform.h"
#include "UsersTable.h"
#include "pcp/Platform.h"
#include "zfs/ZfsArcStats.h"
typedef enum CPUMetric_ {
CPU_TOTAL_TIME,
CPU_USER_TIME,

View File

@ -7,7 +7,9 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h"
#include "config.h" // IWYU pragma: keep
#include "Platform.h"
#include <math.h>
@ -29,7 +31,6 @@ in the source distribution for its full text.
#include "Panel.h"
#include "PCPProcess.h"
#include "PCPProcessList.h"
#include "Platform.h"
#include "ProcessList.h"
#include "ProvideCurses.h"
#include "Settings.h"
@ -38,6 +39,7 @@ in the source distribution for its full text.
#include "TasksMeter.h"
#include "UptimeMeter.h"
#include "XUtils.h"
#include "linux/PressureStallMeter.h"
#include "linux/ZramMeter.h"
#include "linux/ZramStats.h"

View File

@ -13,6 +13,7 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <pcp/pmapi.h>
/* use htop config.h values for these macros, not pcp values */
#undef PACKAGE_URL
#undef PACKAGE_NAME
#undef PACKAGE_STRING