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

File tree

18 files changed

+28
-23
lines changed

18 files changed

+28
-23
lines changed

darwin/Platform.c

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)