Skip to content

Commit 43cb4a5

Browse files
committed
Merge branch 'style-header-consistency' of https://github.com/BenBE/htop into BenBE-style-header-consistency
2 parents 4103c23 + 8e4ce18 commit 43cb4a5

32 files changed

+126
-21
lines changed

CRT.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Released under the GNU GPLv2+, see the COPYING file
77
in the source distribution for its full text.
88
*/
99

10-
#include "config.h"
10+
#include "config.h" // IWYU pragma: keep
1111

1212
#include <stdbool.h>
1313

CommandScreen.c

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*
2+
htop - CommandScreen.c
3+
(C) 2017,2020 ryenus
4+
(C) 2020,2021 htop dev team
5+
Released under the GNU GPLv2+, see the COPYING file
6+
in the source distribution for its full text.
7+
*/
8+
19
#include "config.h" // IWYU pragma: keep
210

311
#include "CommandScreen.h"

CommandScreen.h

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#ifndef HEADER_CommandScreen
22
#define HEADER_CommandScreen
3+
/*
4+
htop - CommandScreen.h
5+
(C) 2017,2020 ryenus
6+
(C) 2020,2021 htop dev team
7+
Released under the GNU GPLv2+, see the COPYING file
8+
in the source distribution for its full text.
9+
*/
310

411
#include "InfoScreen.h"
512
#include "Object.h"

DynamicMeter.h

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#ifndef HEADER_DynamicMeter
22
#define HEADER_DynamicMeter
3+
/*
4+
htop - DynamicMeter.h
5+
(C) 2021 htop dev team
6+
(C) 2021 Red Hat, Inc. All Rights Reserved.
7+
Released under the GNU GPLv2+, see the COPYING file
8+
in the source distribution for its full text.
9+
*/
310

411
#include <stdbool.h>
512

EnvScreen.c

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
htop - EnvScreen.c
3+
(C) 2015,2016 Michael Klein
4+
(C) 2016,2017 Hisham H. Muhammad
5+
(C) 2020,2021 htop dev team
6+
Released under the GNU GPLv2+, see the COPYING file
7+
in the source distribution for its full text.
8+
*/
9+
110
#include "config.h" // IWYU pragma: keep
211

312
#include "EnvScreen.h"

EnvScreen.h

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#ifndef HEADER_EnvScreen
22
#define HEADER_EnvScreen
3+
/*
4+
htop - EnvScreen.h
5+
(C) 2015,2016 Michael Klein
6+
(C) 2016,2017 Hisham H. Muhammad
7+
(C) 2020,2021 htop dev team
8+
Released under the GNU GPLv2+, see the COPYING file
9+
in the source distribution for its full text.
10+
*/
311

412
#include "InfoScreen.h"
513
#include "Object.h"

InfoScreen.c

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*
2+
htop - InfoScreen.c
3+
(C) 2016 Hisham H. Muhammad
4+
(C) 2020,2022 htop dev team
5+
Released under the GNU GPLv2+, see the COPYING file
6+
in the source distribution for its full text.
7+
*/
8+
19
#include "config.h" // IWYU pragma: keep
210

311
#include "InfoScreen.h"

InfoScreen.h

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#ifndef HEADER_InfoScreen
22
#define HEADER_InfoScreen
3+
/*
4+
htop - InfoScreen.h
5+
(C) 2016 Hisham H. Muhammad
6+
(C) 2020,2022 htop dev team
7+
Released under the GNU GPLv2+, see the COPYING file
8+
in the source distribution for its full text.
9+
*/
310

411
#include <stdbool.h>
512

Macros.h

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#ifndef HEADER_Macros
22
#define HEADER_Macros
3+
/*
4+
htop - Macros.h
5+
(C) 2020-2023 htop dev team
6+
Released under the GNU GPLv2+, see the COPYING file
7+
in the source distribution for its full text.
8+
*/
39

410
#include <assert.h> // IWYU pragma: keep
511
#include <math.h>

NetworkIOMeter.c

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
htop - NetworkIOMeter.c
3+
(C) 2020-2023 htop dev team
4+
Released under the GNU GPLv2+, see the COPYING file
5+
in the source distribution for its full text.
6+
*/
7+
18
#include "NetworkIOMeter.h"
29

310
#include <stdbool.h>

NetworkIOMeter.h

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#ifndef HEADER_NetworkIOMeter
22
#define HEADER_NetworkIOMeter
3+
/*
4+
htop - NetworkIOMeter.h
5+
(C) 2020-2023 htop dev team
6+
Released under the GNU GPLv2+, see the COPYING file
7+
in the source distribution for its full text.
8+
*/
39

410
#include "Meter.h"
511

ProvideCurses.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ in the source distribution for its full text.
88
*/
99

1010

11-
#include "config.h"
11+
#include "config.h" // IWYU pragma: keep
1212

1313
// IWYU pragma: begin_exports
1414

RichString.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Released under the GNU GPLv2+, see the COPYING file
77
in the source distribution for its full text.
88
*/
99

10-
#include "config.h"
10+
#include "config.h" // IWYU pragma: keep
1111

1212
#include "ProvideCurses.h"
1313

SignalsPanel.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ in the source distribution for its full text.
99

1010
#include "config.h" // IWYU pragma: keep
1111

12+
#include "Panel.h"
13+
1214
#ifndef HTOP_SOLARIS
1315
#include <signal.h>
1416
#endif
1517

16-
#include "Panel.h"
17-
1818

1919
typedef struct SignalItem_ {
2020
const char* name;

generic/fdstat_sysctl.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
55
in the source distribution for its full text.
66
*/
77

8+
#include "config.h" // IWYU pragma: keep
9+
810
#include "generic/fdstat_sysctl.h"
911

1012
#include <math.h>
@@ -14,8 +16,6 @@ in the source distribution for its full text.
1416
#include <sys/types.h> // Shitty FreeBSD upstream headers
1517
#include <sys/sysctl.h>
1618

17-
#include "config.h"
18-
1919

2020
static void Generic_getFileDescriptors_sysctl_internal(
2121
const char* sysctlname_maxfiles,

generic/gettime.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ htop - generic/gettime.c
44
Released under the GNU GPLv2+, see the COPYING file
55
in the source distribution for its full text.
66
*/
7+
78
#include "config.h" // IWYU pragma: keep
89

910
#include "generic/gettime.h"

generic/hostname.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ htop - generic/hostname.c
44
Released under the GNU GPLv2+, see the COPYING file
55
in the source distribution for its full text.
66
*/
7+
78
#include "config.h" // IWYU pragma: keep
89

910
#include "generic/hostname.h"

generic/uname.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ htop - generic/uname.c
44
Released under the GNU GPLv2+, see the COPYING file
55
in the source distribution for its full text.
66
*/
7+
78
#include "config.h" // IWYU pragma: keep
89

910
#include "generic/uname.h"

linux/LibSensors.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
#include "linux/LibSensors.h"
1+
/*
2+
htop - linux/LibSensors.c
3+
(C) 2020-2023 htop dev team
4+
Released under the GNU GPLv2+, see the COPYING file
5+
in the source distribution for its full text.
6+
*/
7+
8+
#include "config.h" // IWYU pragma: keep
29

3-
#include "config.h"
10+
#include "linux/LibSensors.h"
411

512
#ifdef HAVE_SENSORS_SENSORS_H
613

linux/LibSensors.h

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#ifndef HEADER_LibSensors
22
#define HEADER_LibSensors
3+
/*
4+
htop - linux/LibSensors.h
5+
(C) 2020-2023 htop dev team
6+
Released under the GNU GPLv2+, see the COPYING file
7+
in the source distribution for its full text.
8+
*/
39

410
#include "linux/LinuxMachine.h"
511

linux/LinuxMachine.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Released under the GNU GPLv2+, see the COPYING file
77
in the source distribution for its full text.
88
*/
99

10-
#include "config.h"
10+
#include "config.h" // IWYU pragma: keep
1111

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

linux/LinuxProcess.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ in the source distribution for its full text.
1313
#include <stdbool.h>
1414
#include <sys/types.h>
1515

16-
#include "linux/IOPriority.h"
1716
#include "Machine.h"
1817
#include "Object.h"
1918
#include "Process.h"
19+
#include "linux/IOPriority.h"
2020

2121

2222
#define PROCESS_FLAG_LINUX_IOPRIO 0x00000100

linux/LinuxProcessTable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Released under the GNU GPLv2+, see the COPYING file
77
in the source distribution for its full text.
88
*/
99

10-
#include "config.h"
10+
#include "config.h" // IWYU pragma: keep
1111

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

linux/Platform.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Released under the GNU GPLv2+, see the COPYING file
55
in the source distribution for its full text.
66
*/
77

8-
#include "ZramMeter.h"
9-
#include "config.h"
8+
#include "config.h" // IWYU pragma: keep
109

1110
#include "linux/Platform.h"
1211

@@ -47,7 +46,6 @@ in the source distribution for its full text.
4746
#include "Panel.h"
4847
#include "PressureStallMeter.h"
4948
#include "ProvideCurses.h"
50-
#include "linux/SELinuxMeter.h"
5149
#include "Settings.h"
5250
#include "SwapMeter.h"
5351
#include "SysArchMeter.h"
@@ -58,6 +56,7 @@ in the source distribution for its full text.
5856
#include "linux/IOPriorityPanel.h"
5957
#include "linux/LinuxMachine.h"
6058
#include "linux/LinuxProcess.h"
59+
#include "linux/SELinuxMeter.h"
6160
#include "linux/SystemdMeter.h"
6261
#include "linux/ZramMeter.h"
6362
#include "linux/ZramStats.h"

linux/Platform.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Released under the GNU GPLv2+, see the COPYING file
77
in the source distribution for its full text.
88
*/
99

10-
#include "config.h"
10+
#include "config.h" // IWYU pragma: keep
1111

1212
#include <limits.h>
1313
#include <stdbool.h>
@@ -32,6 +32,7 @@ in the source distribution for its full text.
3232
#include "generic/hostname.h"
3333
#include "generic/uname.h"
3434

35+
3536
/* GNU/Hurd does not have PATH_MAX in limits.h */
3637
#ifndef PATH_MAX
3738
#define PATH_MAX 4096

linux/ZramMeter.c

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*
2+
htop - linux/ZramMeter.c
3+
(C) 2020 Murloc Knight
4+
(C) 2020-2023 htop dev team
5+
Released under the GNU GPLv2+, see the COPYING file
6+
in the source distribution for its full text.
7+
*/
8+
19
#include "linux/ZramMeter.h"
210

311
#include <stddef.h>

linux/ZramMeter.h

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#ifndef HEADER_ZramMeter
22
#define HEADER_ZramMeter
3+
/*
4+
htop - linux/ZramMeter.h
5+
(C) 2020 Murloc Knight
6+
(C) 2020-2023 htop dev team
7+
Released under the GNU GPLv2+, see the COPYING file
8+
in the source distribution for its full text.
9+
*/
310

411
#include "Meter.h"
512

pcp/PCPDynamicMeter.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ htop - PCPDynamicMeter.c
55
Released under the GNU GPLv2+, see the COPYING file
66
in the source distribution for its full text.
77
*/
8+
89
#include "config.h" // IWYU pragma: keep
910

1011
#include "pcp/PCPDynamicMeter.h"

pcp/PCPMachine.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ in the source distribution for its full text.
1818
#include <string.h>
1919
#include <sys/time.h>
2020

21-
#include "Macros.h"
2221
#include "Machine.h"
22+
#include "Macros.h"
2323
#include "Object.h"
2424
#include "Platform.h"
2525
#include "Settings.h"

pcp/PCPProcessTable.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ in the source distribution for its full text.
1818
#include <string.h>
1919
#include <sys/time.h>
2020

21-
#include "Macros.h"
2221
#include "Machine.h"
22+
#include "Macros.h"
2323
#include "Object.h"
2424
#include "Platform.h"
2525
#include "Process.h"

solaris/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ in the source distribution for its full text.
3030

3131
#include "Action.h"
3232
#include "BatteryMeter.h"
33+
#include "CommandLine.h"
3334
#include "DiskIOMeter.h"
3435
#include "Hashtable.h"
3536
#include "NetworkIOMeter.h"
3637
#include "ProcessLocksScreen.h"
3738
#include "SignalsPanel.h"
38-
#include "CommandLine.h"
3939
#include "generic/gettime.h"
4040
#include "generic/hostname.h"
4141
#include "generic/uname.h"

solaris/SolarisMachine.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ in the source distribution for its full text.
1414
#include <stdbool.h>
1515
#include <stdint.h>
1616
#include <sys/param.h>
17-
#include <sys/uio.h>
1817
#include <sys/resource.h>
18+
#include <sys/swap.h>
1919
#include <sys/sysconf.h>
2020
#include <sys/sysinfo.h>
21-
#include <sys/swap.h>
21+
#include <sys/uio.h>
2222

2323
#include "Hashtable.h"
2424
#include "UsersTable.h"

0 commit comments

Comments
 (0)