Commit a9f05c2a authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Uptime meter for FreeBSD.

This will produce too much replicated code.
I think I'll use a lighter abstraction in things like this.
parent 79662291
......@@ -45,10 +45,12 @@ endif
if HTOP_FREEBSD
myhtopplatsources = freebsd/Platform.c freebsd/FreeBSDProcessList.c \
freebsd/FreeBSDCRT.c
freebsd/FreeBSDCRT.c \
freebsd/UptimeMeter.c
myhtopplatheaders = freebsd/Platform.h freebsd/FreeBSDProcessList.h \
freebsd/FreeBSDCRT.h
freebsd/FreeBSDCRT.h \
freebsd/UptimeMeter.h
endif
if HTOP_UNSUPPORTED
......
/*
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
};
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment