summaryrefslogtreecommitdiffstats
path: root/pcp/PCPProcess.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-08-13 15:56:01 +1000
committerNathan Scott <nathans@redhat.com>2021-08-13 15:56:01 +1000
commitf839095e3b29668d080c89f3b32fb6dccff54030 (patch)
tree7ef2d9359dea6e171c882f5b6ec5620eb4555396 /pcp/PCPProcess.c
parent6974ce8e7982d061f26dbbe7c5ca48d7aa6f4dbc (diff)
parent6f2021f3d95e02fc54e59fdeeb006e34c209b9c3 (diff)
Merge branch 'dynamic-columns' of https://github.com/smalinux/htop into smalinux-dynamic-columns
Diffstat (limited to 'pcp/PCPProcess.c')
-rw-r--r--pcp/PCPProcess.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/pcp/PCPProcess.c b/pcp/PCPProcess.c
index de709110..5407a021 100644
--- a/pcp/PCPProcess.c
+++ b/pcp/PCPProcess.c
@@ -1,8 +1,8 @@
/*
htop - PCPProcess.c
(C) 2014 Hisham H. Muhammad
-(C) 2020 htop dev team
-(C) 2020-2021 Red Hat, Inc. All Rights Reserved.
+(C) 2020-2021 htop dev team
+(C) 2020-2021 Red Hat, Inc.
Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
@@ -12,15 +12,18 @@ in the source distribution for its full text.
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <syscall.h>
-#include <unistd.h>
#include "CRT.h"
+#include "Macros.h"
+#include "Platform.h"
#include "Process.h"
#include "ProvideCurses.h"
+#include "RichString.h"
#include "XUtils.h"
+#include "pcp/PCPDynamicColumn.h"
+
+
const ProcessFieldData Process_fields[] = {
[0] = { .name = "", .title = NULL, .description = NULL, .flags = 0, },
[PID] = { .name = "PID", .title = "PID", .description = "Process/thread ID", .flags = 0, .pidColumn = true, },
@@ -271,7 +274,9 @@ static int PCPProcess_compareByKey(const Process* v1, const Process* v2, Process
case AUTOGROUP_NICE:
return SPACESHIP_NUMBER(p1->autogroup_nice, p2->autogroup_nice);
default:
- return Process_compareByKey_Base(v1, v2, key);
+ if (key < LAST_PROCESSFIELD)
+ return Process_compareByKey_Base(v1, v2, key);
+ return PCPDynamicColumn_compareByKey(p1, p2, key);
}
}

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