Skip to content

Commit 55f08c2

Browse files
committed
Update all Platforms to support FlexMeter
Signed-off-by: Stoyan Bogdanov <[email protected]>
1 parent 3ff3a68 commit 55f08c2

18 files changed

+28
-23
lines changed

darwin/Platform.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ in the source distribution for its full text.
3838
#include "DateMeter.h"
3939
#include "DateTimeMeter.h"
4040
#include "FileDescriptorMeter.h"
41+
#include "FlexMeter.h"
4142
#include "HostnameMeter.h"
4243
#include "LoadAverageMeter.h"
4344
#include "Macros.h"
@@ -112,7 +113,7 @@ const SignalItem Platform_signals[] = {
112113

113114
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
114115

115-
const MeterClass* const Platform_meterTypes[] = {
116+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
116117
&CPUMeter_class,
117118
&ClockMeter_class,
118119
&DateMeter_class,

darwin/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern const SignalItem Platform_signals[];
3434

3535
extern const unsigned int Platform_numberOfSignals;
3636

37-
extern const MeterClass* const Platform_meterTypes[];
37+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
3838

3939
bool Platform_init(void);
4040

dragonflybsd/Platform.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ in the source distribution for its full text.
2727
#include "DateMeter.h"
2828
#include "DateTimeMeter.h"
2929
#include "FileDescriptorMeter.h"
30+
#include "FlexMeter.h"
3031
#include "HostnameMeter.h"
3132
#include "LoadAverageMeter.h"
3233
#include "Macros.h"
@@ -43,7 +44,6 @@ in the source distribution for its full text.
4344
#include "dragonflybsd/DragonFlyBSDProcessTable.h"
4445
#include "generic/fdstat_sysctl.h"
4546

46-
4747
const ScreenDefaults Platform_defaultScreens[] = {
4848
{
4949
.name = "Main",
@@ -93,7 +93,7 @@ const SignalItem Platform_signals[] = {
9393

9494
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
9595

96-
const MeterClass* const Platform_meterTypes[] = {
96+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
9797
&CPUMeter_class,
9898
&ClockMeter_class,
9999
&DateMeter_class,

dragonflybsd/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern const SignalItem Platform_signals[];
3737

3838
extern const unsigned int Platform_numberOfSignals;
3939

40-
extern const MeterClass* const Platform_meterTypes[];
40+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
4141

4242
bool Platform_init(void);
4343

freebsd/Platform.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ in the source distribution for its full text.
3232
#include "DateTimeMeter.h"
3333
#include "DiskIOMeter.h"
3434
#include "FileDescriptorMeter.h"
35+
#include "FlexMeter.h"
3536
#include "HostnameMeter.h"
3637
#include "LoadAverageMeter.h"
3738
#include "Machine.h"
@@ -100,7 +101,7 @@ const SignalItem Platform_signals[] = {
100101

101102
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
102103

103-
const MeterClass* const Platform_meterTypes[] = {
104+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
104105
&CPUMeter_class,
105106
&ClockMeter_class,
106107
&DateMeter_class,

freebsd/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern const SignalItem Platform_signals[];
3333

3434
extern const unsigned int Platform_numberOfSignals;
3535

36-
extern const MeterClass* const Platform_meterTypes[];
36+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
3737

3838
bool Platform_init(void);
3939

linux/Platform.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ in the source distribution for its full text.
3131
#include "DateTimeMeter.h"
3232
#include "DiskIOMeter.h"
3333
#include "FileDescriptorMeter.h"
34+
#include "FlexMeter.h"
3435
#include "HostnameMeter.h"
3536
#include "HugePageMeter.h"
3637
#include "LoadAverageMeter.h"
@@ -209,7 +210,7 @@ void Platform_setBindings(Htop_Action* keys) {
209210
keys[KEY_F(20)] = Platform_actionHigherAutogroupPriority; // Shift-F8
210211
}
211212

212-
const MeterClass* const Platform_meterTypes[] = {
213+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
213214
&CPUMeter_class,
214215
&ClockMeter_class,
215216
&DateMeter_class,

linux/Platform.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ extern const SignalItem Platform_signals[];
4747

4848
extern const unsigned int Platform_numberOfSignals;
4949

50-
extern const MeterClass* const Platform_meterTypes[];
50+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
51+
5152

5253
bool Platform_init(void);
5354
void Platform_done(void);

netbsd/Platform.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ in the source distribution for its full text.
4141
#include "DateMeter.h"
4242
#include "DateTimeMeter.h"
4343
#include "FileDescriptorMeter.h"
44+
#include "FlexMeter.h"
4445
#include "HostnameMeter.h"
4546
#include "LoadAverageMeter.h"
4647
#include "Macros.h"
@@ -152,7 +153,7 @@ const SignalItem Platform_signals[] = {
152153

153154
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
154155

155-
const MeterClass* const Platform_meterTypes[] = {
156+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
156157
&CPUMeter_class,
157158
&ClockMeter_class,
158159
&DateMeter_class,

netbsd/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern const SignalItem Platform_signals[];
4343

4444
extern const unsigned int Platform_numberOfSignals;
4545

46-
extern const MeterClass* const Platform_meterTypes[];
46+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
4747

4848
bool Platform_init(void);
4949

openbsd/Platform.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ in the source distribution for its full text.
3131
#include "DateMeter.h"
3232
#include "DateTimeMeter.h"
3333
#include "FileDescriptorMeter.h"
34+
#include "FlexMeter.h"
3435
#include "HostnameMeter.h"
3536
#include "LoadAverageMeter.h"
3637
#include "Macros.h"
@@ -47,7 +48,6 @@ in the source distribution for its full text.
4748
#include "openbsd/OpenBSDMachine.h"
4849
#include "openbsd/OpenBSDProcess.h"
4950

50-
5151
const ScreenDefaults Platform_defaultScreens[] = {
5252
{
5353
.name = "Main",
@@ -100,7 +100,7 @@ const SignalItem Platform_signals[] = {
100100

101101
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
102102

103-
const MeterClass* const Platform_meterTypes[] = {
103+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
104104
&CPUMeter_class,
105105
&ClockMeter_class,
106106
&DateMeter_class,

openbsd/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern const SignalItem Platform_signals[];
3535

3636
extern const unsigned int Platform_numberOfSignals;
3737

38-
extern const MeterClass* const Platform_meterTypes[];
38+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
3939

4040
bool Platform_init(void);
4141

pcp/Platform.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ in the source distribution for its full text.
2727
#include "DynamicMeter.h"
2828
#include "DynamicScreen.h"
2929
#include "FileDescriptorMeter.h"
30+
#include "FlexMeter.h"
3031
#include "HostnameMeter.h"
3132
#include "LoadAverageMeter.h"
3233
#include "Macros.h"
@@ -55,7 +56,6 @@ in the source distribution for its full text.
5556
#include "zfs/ZfsArcStats.h"
5657
#include "zfs/ZfsCompressedArcMeter.h"
5758

58-
5959
Platform* pcp;
6060

6161
const ScreenDefaults Platform_defaultScreens[] = {
@@ -79,7 +79,7 @@ const SignalItem Platform_signals[] = {
7979

8080
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
8181

82-
const MeterClass* const Platform_meterTypes[] = {
82+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
8383
&CPUMeter_class,
8484
&DynamicMeter_class,
8585
&ClockMeter_class,

pcp/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extern const SignalItem Platform_signals[];
6868

6969
extern const unsigned int Platform_numberOfSignals;
7070

71-
extern const MeterClass* const Platform_meterTypes[];
71+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
7272

7373
bool Platform_init(void);
7474

solaris/Platform.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ in the source distribution for its full text.
3333
#include "ClockMeter.h"
3434
#include "DateMeter.h"
3535
#include "DateTimeMeter.h"
36+
#include "FlexMeter.h"
3637
#include "HostnameMeter.h"
3738
#include "SysArchMeter.h"
3839
#include "UptimeMeter.h"
@@ -43,7 +44,6 @@ in the source distribution for its full text.
4344
#include "zfs/ZfsArcMeter.h"
4445
#include "zfs/ZfsCompressedArcMeter.h"
4546

46-
4747
const ScreenDefaults Platform_defaultScreens[] = {
4848
{
4949
.name = "Default",
@@ -101,7 +101,7 @@ const SignalItem Platform_signals[] = {
101101

102102
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
103103

104-
const MeterClass* const Platform_meterTypes[] = {
104+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
105105
&CPUMeter_class,
106106
&ClockMeter_class,
107107
&DateMeter_class,

solaris/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extern const SignalItem Platform_signals[];
5858

5959
extern const unsigned int Platform_numberOfSignals;
6060

61-
extern const MeterClass* const Platform_meterTypes[];
61+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
6262

6363
bool Platform_init(void);
6464

unsupported/Platform.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ in the source distribution for its full text.
1717
#include "DateMeter.h"
1818
#include "DateTimeMeter.h"
1919
#include "FileDescriptorMeter.h"
20+
#include "FlexMeter.h"
2021
#include "HostnameMeter.h"
2122
#include "LoadAverageMeter.h"
2223
#include "Macros.h"
@@ -27,7 +28,6 @@ in the source distribution for its full text.
2728
#include "TasksMeter.h"
2829
#include "UptimeMeter.h"
2930

30-
3131
const ScreenDefaults Platform_defaultScreens[] = {
3232
{
3333
.name = "Main",
@@ -44,7 +44,7 @@ const SignalItem Platform_signals[] = {
4444

4545
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
4646

47-
const MeterClass* const Platform_meterTypes[] = {
47+
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
4848
&CPUMeter_class,
4949
&ClockMeter_class,
5050
&DateMeter_class,

unsupported/Platform.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern const SignalItem Platform_signals[];
3131

3232
extern const unsigned int Platform_numberOfSignals;
3333

34-
extern const MeterClass* const Platform_meterTypes[];
34+
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];
3535

3636
bool Platform_init(void);
3737

0 commit comments

Comments
 (0)