summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2023-10-10 20:45:54 +1100
committerNathan Scott <nathans@redhat.com>2023-10-10 20:45:54 +1100
commit43cb4a57d6eca089358dbf974070dd7d33ccc337 (patch)
tree98908ca73d09f3a86ff74c71dae2e6f4e94a6ca3
parent4103c23327359a0bd6385c2f891554f206fec397 (diff)
parent8e4ce18ba8d1fd11c17631eff785340219136091 (diff)
Merge branch 'style-header-consistency' of https://github.com/BenBE/htop into BenBE-style-header-consistency
-rw-r--r--CRT.h2
-rw-r--r--CommandScreen.c8
-rw-r--r--CommandScreen.h7
-rw-r--r--DynamicMeter.h7
-rw-r--r--EnvScreen.c9
-rw-r--r--EnvScreen.h8
-rw-r--r--InfoScreen.c8
-rw-r--r--InfoScreen.h7
-rw-r--r--Macros.h6
-rw-r--r--NetworkIOMeter.c7
-rw-r--r--NetworkIOMeter.h6
-rw-r--r--ProvideCurses.h2
-rw-r--r--RichString.h2
-rw-r--r--SignalsPanel.h4
-rw-r--r--generic/fdstat_sysctl.c4
-rw-r--r--generic/gettime.c1
-rw-r--r--generic/hostname.c1
-rw-r--r--generic/uname.c1
-rw-r--r--linux/LibSensors.c11
-rw-r--r--linux/LibSensors.h6
-rw-r--r--linux/LinuxMachine.h2
-rw-r--r--linux/LinuxProcess.h2
-rw-r--r--linux/LinuxProcessTable.h2
-rw-r--r--linux/Platform.c5
-rw-r--r--linux/Platform.h3
-rw-r--r--linux/ZramMeter.c8
-rw-r--r--linux/ZramMeter.h7
-rw-r--r--pcp/PCPDynamicMeter.c1
-rw-r--r--pcp/PCPMachine.c2
-rw-r--r--pcp/PCPProcessTable.c2
-rw-r--r--solaris/Platform.h2
-rw-r--r--solaris/SolarisMachine.h4
32 files changed, 126 insertions, 21 deletions
diff --git a/CRT.h b/CRT.h
index f5fd9452..5361457c 100644
--- a/CRT.h
+++ b/CRT.h
@@ -7,7 +7,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>
diff --git a/CommandScreen.c b/CommandScreen.c
index ecd823bd..465e4c2f 100644
--- a/CommandScreen.c
+++ b/CommandScreen.c
@@ -1,3 +1,11 @@
+/*
+htop - CommandScreen.c
+(C) 2017,2020 ryenus
+(C) 2020,2021 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
#include "config.h" // IWYU pragma: keep
#include "CommandScreen.h"
diff --git a/CommandScreen.h b/CommandScreen.h
index e56982b2..2eef5e55 100644
--- a/CommandScreen.h
+++ b/CommandScreen.h
@@ -1,5 +1,12 @@
#ifndef HEADER_CommandScreen
#define HEADER_CommandScreen
+/*
+htop - CommandScreen.h
+(C) 2017,2020 ryenus
+(C) 2020,2021 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include "InfoScreen.h"
#include "Object.h"
diff --git a/DynamicMeter.h b/DynamicMeter.h
index 3ef0176a..2bc3cba1 100644
--- a/DynamicMeter.h
+++ b/DynamicMeter.h
@@ -1,5 +1,12 @@
#ifndef HEADER_DynamicMeter
#define HEADER_DynamicMeter
+/*
+htop - DynamicMeter.h
+(C) 2021 htop dev team
+(C) 2021 Red Hat, Inc. All Rights Reserved.
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include <stdbool.h>
diff --git a/EnvScreen.c b/EnvScreen.c
index b27155e6..4a36b318 100644
--- a/EnvScreen.c
+++ b/EnvScreen.c
@@ -1,3 +1,12 @@
+/*
+htop - EnvScreen.c
+(C) 2015,2016 Michael Klein
+(C) 2016,2017 Hisham H. Muhammad
+(C) 2020,2021 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
#include "config.h" // IWYU pragma: keep
#include "EnvScreen.h"
diff --git a/EnvScreen.h b/EnvScreen.h
index 4d44c81c..118c271c 100644
--- a/EnvScreen.h
+++ b/EnvScreen.h
@@ -1,5 +1,13 @@
#ifndef HEADER_EnvScreen
#define HEADER_EnvScreen
+/*
+htop - EnvScreen.h
+(C) 2015,2016 Michael Klein
+(C) 2016,2017 Hisham H. Muhammad
+(C) 2020,2021 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include "InfoScreen.h"
#include "Object.h"
diff --git a/InfoScreen.c b/InfoScreen.c
index 105d9c34..e9f06f27 100644
--- a/InfoScreen.c
+++ b/InfoScreen.c
@@ -1,3 +1,11 @@
+/*
+htop - InfoScreen.c
+(C) 2016 Hisham H. Muhammad
+(C) 2020,2022 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
#include "config.h" // IWYU pragma: keep
#include "InfoScreen.h"
diff --git a/InfoScreen.h b/InfoScreen.h
index d7497bed..469c2707 100644
--- a/InfoScreen.h
+++ b/InfoScreen.h
@@ -1,5 +1,12 @@
#ifndef HEADER_InfoScreen
#define HEADER_InfoScreen
+/*
+htop - InfoScreen.h
+(C) 2016 Hisham H. Muhammad
+(C) 2020,2022 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include <stdbool.h>
diff --git a/Macros.h b/Macros.h
index 459102a3..054e7d3b 100644
--- a/Macros.h
+++ b/Macros.h
@@ -1,5 +1,11 @@
#ifndef HEADER_Macros
#define HEADER_Macros
+/*
+htop - Macros.h
+(C) 2020-2023 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include <assert.h> // IWYU pragma: keep
#include <math.h>
diff --git a/NetworkIOMeter.c b/NetworkIOMeter.c
index 90991590..6408244b 100644
--- a/NetworkIOMeter.c
+++ b/NetworkIOMeter.c
@@ -1,3 +1,10 @@
+/*
+htop - NetworkIOMeter.c
+(C) 2020-2023 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
#include "NetworkIOMeter.h"
#include <stdbool.h>
diff --git a/NetworkIOMeter.h b/NetworkIOMeter.h
index 18c23ce2..d112a745 100644
--- a/NetworkIOMeter.h
+++ b/NetworkIOMeter.h
@@ -1,5 +1,11 @@
#ifndef HEADER_NetworkIOMeter
#define HEADER_NetworkIOMeter
+/*
+htop - NetworkIOMeter.h
+(C) 2020-2023 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include "Meter.h"
diff --git a/ProvideCurses.h b/ProvideCurses.h
index 6fbc8ebb..7ae99e62 100644
--- a/ProvideCurses.h
+++ b/ProvideCurses.h
@@ -8,7 +8,7 @@ in the source distribution for its full text.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
// IWYU pragma: begin_exports
diff --git a/RichString.h b/RichString.h
index 9a09166c..ee54e055 100644
--- a/RichString.h
+++ b/RichString.h
@@ -7,7 +7,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 "ProvideCurses.h"
diff --git a/SignalsPanel.h b/SignalsPanel.h
index 529043a1..d8676622 100644
--- a/SignalsPanel.h
+++ b/SignalsPanel.h
@@ -9,12 +9,12 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep
+#include "Panel.h"
+
#ifndef HTOP_SOLARIS
#include <signal.h>
#endif
-#include "Panel.h"
-
typedef struct SignalItem_ {
const char* name;
diff --git a/generic/fdstat_sysctl.c b/generic/fdstat_sysctl.c
index 432114c2..ea374fb2 100644
--- a/generic/fdstat_sysctl.c
+++ b/generic/fdstat_sysctl.c
@@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
+#include "config.h" // IWYU pragma: keep
+
#include "generic/fdstat_sysctl.h"
#include <math.h>
@@ -14,8 +16,6 @@ in the source distribution for its full text.
#include <sys/types.h> // Shitty FreeBSD upstream headers
#include <sys/sysctl.h>
-#include "config.h"
-
static void Generic_getFileDescriptors_sysctl_internal(
const char* sysctlname_maxfiles,
diff --git a/generic/gettime.c b/generic/gettime.c
index b7c4885e..209f5232 100644
--- a/generic/gettime.c
+++ b/generic/gettime.c
@@ -4,6 +4,7 @@ htop - generic/gettime.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 "generic/gettime.h"
diff --git a/generic/hostname.c b/generic/hostname.c
index 69a41468..e3275828 100644
--- a/generic/hostname.c
+++ b/generic/hostname.c
@@ -4,6 +4,7 @@ htop - generic/hostname.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 "generic/hostname.h"
diff --git a/generic/uname.c b/generic/uname.c
index 2a734dc1..b5bb5834 100644
--- a/generic/uname.c
+++ b/generic/uname.c
@@ -4,6 +4,7 @@ htop - generic/uname.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 "generic/uname.h"
diff --git a/linux/LibSensors.c b/linux/LibSensors.c
index 891dd01a..53734161 100644
--- a/linux/LibSensors.c
+++ b/linux/LibSensors.c
@@ -1,6 +1,13 @@
-#include "linux/LibSensors.h"
+/*
+htop - linux/LibSensors.c
+(C) 2020-2023 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
+#include "config.h" // IWYU pragma: keep
-#include "config.h"
+#include "linux/LibSensors.h"
#ifdef HAVE_SENSORS_SENSORS_H
diff --git a/linux/LibSensors.h b/linux/LibSensors.h
index 2b9801bc..6f054489 100644
--- a/linux/LibSensors.h
+++ b/linux/LibSensors.h
@@ -1,5 +1,11 @@
#ifndef HEADER_LibSensors
#define HEADER_LibSensors
+/*
+htop - linux/LibSensors.h
+(C) 2020-2023 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include "linux/LinuxMachine.h"
diff --git a/linux/LinuxMachine.h b/linux/LinuxMachine.h
index c3076a30..764223c1 100644
--- a/linux/LinuxMachine.h
+++ b/linux/LinuxMachine.h
@@ -7,7 +7,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>
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 1cd0eaaf..081fef9c 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -13,10 +13,10 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <sys/types.h>
-#include "linux/IOPriority.h"
#include "Machine.h"
#include "Object.h"
#include "Process.h"
+#include "linux/IOPriority.h"
#define PROCESS_FLAG_LINUX_IOPRIO 0x00000100
diff --git a/linux/LinuxProcessTable.h b/linux/LinuxProcessTable.h
index f97afd38..3fea2523 100644
--- a/linux/LinuxProcessTable.h
+++ b/linux/LinuxProcessTable.h
@@ -7,7 +7,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>
diff --git a/linux/Platform.c b/linux/Platform.c
index 325f92ed..65f7558e 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -5,8 +5,7 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
-#include "ZramMeter.h"
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include "linux/Platform.h"
@@ -47,7 +46,6 @@ in the source distribution for its full text.
#include "Panel.h"
#include "PressureStallMeter.h"
#include "ProvideCurses.h"
-#include "linux/SELinuxMeter.h"
#include "Settings.h"
#include "SwapMeter.h"
#include "SysArchMeter.h"
@@ -58,6 +56,7 @@ in the source distribution for its full text.
#include "linux/IOPriorityPanel.h"
#include "linux/LinuxMachine.h"
#include "linux/LinuxProcess.h"
+#include "linux/SELinuxMeter.h"
#include "linux/SystemdMeter.h"
#include "linux/ZramMeter.h"
#include "linux/ZramStats.h"
diff --git a/linux/Platform.h b/linux/Platform.h
index 763edadd..5435f192 100644
--- a/linux/Platform.h
+++ b/linux/Platform.h
@@ -7,7 +7,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 <limits.h>
#include <stdbool.h>
@@ -32,6 +32,7 @@ in the source distribution for its full text.
#include "generic/hostname.h"
#include "generic/uname.h"
+
/* GNU/Hurd does not have PATH_MAX in limits.h */
#ifndef PATH_MAX
#define PATH_MAX 4096
diff --git a/linux/ZramMeter.c b/linux/ZramMeter.c
index a1a98b34..f24aaed7 100644
--- a/linux/ZramMeter.c
+++ b/linux/ZramMeter.c
@@ -1,3 +1,11 @@
+/*
+htop - linux/ZramMeter.c
+(C) 2020 Murloc Knight
+(C) 2020-2023 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
#include "linux/ZramMeter.h"
#include <stddef.h>
diff --git a/linux/ZramMeter.h b/linux/ZramMeter.h
index db27d0b3..14a52155 100644
--- a/linux/ZramMeter.h
+++ b/linux/ZramMeter.h
@@ -1,5 +1,12 @@
#ifndef HEADER_ZramMeter
#define HEADER_ZramMeter
+/*
+htop - linux/ZramMeter.h
+(C) 2020 Murloc Knight
+(C) 2020-2023 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
#include "Meter.h"
diff --git a/pcp/PCPDynamicMeter.c b/pcp/PCPDynamicMeter.c
index 87e51700..241153a0 100644
--- a/pcp/PCPDynamicMeter.c
+++ b/pcp/PCPDynamicMeter.c
@@ -5,6 +5,7 @@ htop - PCPDynamicMeter.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 "pcp/PCPDynamicMeter.h"
diff --git a/pcp/PCPMachine.c b/pcp/PCPMachine.c
index 16403247..5f24a284 100644
--- a/pcp/PCPMachine.c
+++ b/pcp/PCPMachine.c
@@ -18,8 +18,8 @@ in the source distribution for its full text.
#include <string.h>
#include <sys/time.h>
-#include "Macros.h"
#include "Machine.h"
+#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "Settings.h"
diff --git a/pcp/PCPProcessTable.c b/pcp/PCPProcessTable.c
index 3c7cb475..0355e25a 100644
--- a/pcp/PCPProcessTable.c
+++ b/pcp/PCPProcessTable.c
@@ -18,8 +18,8 @@ in the source distribution for its full text.
#include <string.h>
#include <sys/time.h>
-#include "Macros.h"
#include "Machine.h"
+#include "Macros.h"
#include "Object.h"
#include "Platform.h"
#include "Process.h"
diff --git a/solaris/Platform.h b/solaris/Platform.h
index 96feeebe..88ea417d 100644
--- a/solaris/Platform.h
+++ b/solaris/Platform.h
@@ -30,12 +30,12 @@ in the source distribution for its full text.
#include "Action.h"
#include "BatteryMeter.h"
+#include "CommandLine.h"
#include "DiskIOMeter.h"
#include "Hashtable.h"
#include "NetworkIOMeter.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
-#include "CommandLine.h"
#include "generic/gettime.h"
#include "generic/hostname.h"
#include "generic/uname.h"
diff --git a/solaris/SolarisMachine.h b/solaris/SolarisMachine.h
index da091c6e..3f0050f5 100644
--- a/solaris/SolarisMachine.h
+++ b/solaris/SolarisMachine.h
@@ -14,11 +14,11 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <stdint.h>
#include <sys/param.h>
-#include <sys/uio.h>
#include <sys/resource.h>
+#include <sys/swap.h>
#include <sys/sysconf.h>
#include <sys/sysinfo.h>
-#include <sys/swap.h>
+#include <sys/uio.h>
#include "Hashtable.h"
#include "UsersTable.h"

© 2014-2024 Faster IT GmbH | imprint | privacy policy