From 8c82a38002ce09db2a0b83dab8b598cf1ab0596c Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:01:17 +0200 Subject: Imported Upstream version 2.0.1 --- unsupported/Platform.c | 44 ++++++++++++++++++++------------------------ unsupported/Platform.h | 12 +++++++++--- 2 files changed, 29 insertions(+), 27 deletions(-) (limited to 'unsupported') diff --git a/unsupported/Platform.c b/unsupported/Platform.c index 0f1ba97..04e8b4e 100644 --- a/unsupported/Platform.c +++ b/unsupported/Platform.c @@ -19,9 +19,16 @@ in the source distribution for its full text. /*{ #include "Action.h" #include "BatteryMeter.h" +#include "SignalsPanel.h" #include "UnsupportedProcess.h" }*/ +SignalItem Platform_signals[] = { + { .name = " 0 Cancel", .number = 0 }, +}; + +unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem); + ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 }; ProcessFieldData Process_fields[] = { @@ -79,7 +86,12 @@ void Platform_setBindings(Htop_Action* keys) { } int Platform_numberOfFields = 100; -char* Process_pidFormat = "%7u "; + +extern char Process_pidFormat[20]; + +ProcessPidColumn Process_pidColumns[] = { + { .id = 0, .label = NULL }, +}; int Platform_getUptime() { return 0; @@ -95,42 +107,26 @@ int Platform_getMaxPid() { return 1; } -void Process_setupColumnWidths() { - int maxPid = Platform_getMaxPid(); - if (maxPid == -1) return; - if (maxPid > 99999) { - Process_fields[PID].title = " PID "; - Process_fields[PPID].title = " PPID "; - Process_fields[TPGID].title = " TPGID "; - Process_fields[TGID].title = " TGID "; - Process_fields[PGRP].title = " PGRP "; - Process_fields[SESSION].title = " SESN "; - Process_pidFormat = "%7u "; - } else { - Process_fields[PID].title = " PID "; - Process_fields[PPID].title = " PPID "; - Process_fields[TPGID].title = "TPGID "; - Process_fields[TGID].title = " TGID "; - Process_fields[PGRP].title = " PGRP "; - Process_fields[SESSION].title = " SESN "; - Process_pidFormat = "%5u "; - } -} - double Platform_setCPUValues(Meter* this, int cpu) { - return 0.0; + (void) this; + (void) cpu; + return 0.0; } void Platform_setMemoryValues(Meter* this) { + (void) this; } void Platform_setSwapValues(Meter* this) { + (void) this; } bool Process_isThread(Process* this) { + (void) this; return false; } char* Platform_getProcessEnv(pid_t pid) { + (void) pid; return NULL; } diff --git a/unsupported/Platform.h b/unsupported/Platform.h index ec1649d..b1fa91d 100644 --- a/unsupported/Platform.h +++ b/unsupported/Platform.h @@ -12,8 +12,13 @@ in the source distribution for its full text. #include "Action.h" #include "BatteryMeter.h" +#include "SignalsPanel.h" #include "UnsupportedProcess.h" +extern SignalItem Platform_signals[]; + +extern unsigned int Platform_numberOfSignals; + extern ProcessField Platform_defaultFields[]; extern ProcessFieldData Process_fields[]; @@ -23,7 +28,10 @@ extern MeterClass* Platform_meterTypes[]; void Platform_setBindings(Htop_Action* keys); extern int Platform_numberOfFields; -extern char* Process_pidFormat; + +extern char Process_pidFormat[20]; + +extern ProcessPidColumn Process_pidColumns[]; int Platform_getUptime(); @@ -31,8 +39,6 @@ void Platform_getLoadAverage(double* one, double* five, double* fifteen); int Platform_getMaxPid(); -void Process_setupColumnWidths(); - double Platform_setCPUValues(Meter* this, int cpu); void Platform_setMemoryValues(Meter* this); -- cgit v1.2.3