summaryrefslogtreecommitdiffstats
path: root/freebsd
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2014-11-27 19:33:37 -0200
committerHisham Muhammad <hisham@gobolinux.org>2014-11-27 19:33:37 -0200
commita9f05c2a8bc259a6da0be4004d28c75a9cfe7838 (patch)
treecc3d3d67eaae42e230d1c6c459d76b30b7d70031 /freebsd
parent79662291fa9b81984032d3389e6b0d0b20efb704 (diff)
Uptime meter for FreeBSD.
This will produce too much replicated code. I think I'll use a lighter abstraction in things like this.
Diffstat (limited to 'freebsd')
-rw-r--r--freebsd/Platform.c33
-rw-r--r--freebsd/Platform.h4
2 files changed, 35 insertions, 2 deletions
diff --git a/freebsd/Platform.c b/freebsd/Platform.c
index b65fec40..acc69595 100644
--- a/freebsd/Platform.c
+++ b/freebsd/Platform.c
@@ -1,11 +1,21 @@
/*
-htop - unsupported/Platform.c
+htop - freebsd/Platform.c
(C) 2014 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "Platform.h"
+#include "Meter.h"
+#include "CPUMeter.h"
+#include "MemoryMeter.h"
+#include "SwapMeter.h"
+#include "TasksMeter.h"
+#include "LoadAverageMeter.h"
+#include "UptimeMeter.h"
+#include "BatteryMeter.h"
+#include "ClockMeter.h"
+#include "HostnameMeter.h"
/*{
#include "Action.h"
@@ -15,3 +25,24 @@ void Platform_setBindings(Htop_Action* keys) {
(void) keys;
}
+MeterClass* Platform_meterTypes[] = {
+ &CPUMeter_class,
+ &ClockMeter_class,
+ &LoadAverageMeter_class,
+ &LoadMeter_class,
+ &MemoryMeter_class,
+ &SwapMeter_class,
+ &TasksMeter_class,
+ &UptimeMeter_class,
+ &BatteryMeter_class,
+ &HostnameMeter_class,
+ &AllCPUsMeter_class,
+ &AllCPUs2Meter_class,
+ &LeftCPUsMeter_class,
+ &RightCPUsMeter_class,
+ &LeftCPUs2Meter_class,
+ &RightCPUs2Meter_class,
+ &BlankMeter_class,
+ NULL
+};
+
diff --git a/freebsd/Platform.h b/freebsd/Platform.h
index 65a31993..dc468b81 100644
--- a/freebsd/Platform.h
+++ b/freebsd/Platform.h
@@ -3,7 +3,7 @@
#ifndef HEADER_Platform
#define HEADER_Platform
/*
-htop - unsupported/Platform.h
+htop - freebsd/Platform.h
(C) 2014 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
@@ -13,5 +13,7 @@ in the source distribution for its full text.
void Platform_setBindings(Htop_Action* keys);
+extern MeterClass* Platform_meterTypes[];
+
#endif

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