dragonflybsd, freebsd, openbsd: fixes for htop 3.0 branch

This commit is contained in:
Hisham Muhammad 2018-04-10 10:22:44 -03:00
parent b8bfe60d2b
commit f78f658eed
3 changed files with 6 additions and 6 deletions

View File

@ -138,14 +138,14 @@ void DragonFlyBSDProcess_writeField(Process* this, RichString* str, ProcessField
long DragonFlyBSDProcess_compare(const void* v1, const void* v2) {
DragonFlyBSDProcess *p1, *p2;
Settings *settings = ((Process*)v1)->settings;
if (settings->direction == 1) {
if (settings->ss->direction == 1) {
p1 = (DragonFlyBSDProcess*)v1;
p2 = (DragonFlyBSDProcess*)v2;
} else {
p2 = (DragonFlyBSDProcess*)v1;
p1 = (DragonFlyBSDProcess*)v2;
}
switch ((int) settings->sortKey) {
switch ((int) settings->ss->sortKey) {
// add Platform-specific fields here
case JID:
return (p1->jid - p2->jid);

View File

@ -136,14 +136,14 @@ void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
long FreeBSDProcess_compare(const void* v1, const void* v2) {
FreeBSDProcess *p1, *p2;
Settings *settings = ((Process*)v1)->settings;
if (settings->direction == 1) {
if (settings->ss->direction == 1) {
p1 = (FreeBSDProcess*)v1;
p2 = (FreeBSDProcess*)v2;
} else {
p2 = (FreeBSDProcess*)v1;
p1 = (FreeBSDProcess*)v2;
}
switch ((int) settings->sortKey) {
switch ((int) settings->ss->sortKey) {
// add FreeBSD-specific fields here
case JID:
return (p1->jid - p2->jid);

View File

@ -215,14 +215,14 @@ void OpenBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
long OpenBSDProcess_compare(const void* v1, const void* v2) {
OpenBSDProcess *p1, *p2;
Settings *settings = ((Process*)v1)->settings;
if (settings->direction == 1) {
if (settings->ss->direction == 1) {
p1 = (OpenBSDProcess*)v1;
p2 = (OpenBSDProcess*)v2;
} else {
p2 = (OpenBSDProcess*)v1;
p1 = (OpenBSDProcess*)v2;
}
switch (settings->sortKey) {
switch (settings->ss->sortKey) {
// add OpenBSD-specific fields here
default:
return Process_compare(v1, v2);