aboutsummaryrefslogtreecommitdiffstats
path: root/unsupported
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:01:17 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:01:17 +0200
commit8c82a38002ce09db2a0b83dab8b598cf1ab0596c (patch)
tree596b13ab61b4454e347ff476a84c14c2c9dc3441 /unsupported
parentff9409b1737627857eb47f64f536a3f66b6a09a4 (diff)
downloaddebian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.tar.gz
debian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.tar.bz2
debian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.zip
Imported Upstream version 2.0.1upstream/2.0.1
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Platform.c44
-rw-r--r--unsupported/Platform.h12
2 files changed, 29 insertions, 27 deletions
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);

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