Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
f78f658e
Commit
f78f658e
authored
Apr 10, 2018
by
Hisham Muhammad
Browse files
dragonflybsd, freebsd, openbsd: fixes for htop 3.0 branch
parent
b8bfe60d
Changes
3
Hide whitespace changes
Inline
Side-by-side
dragonflybsd/DragonFlyBSDProcess.c
View file @
f78f658e
...
@@ -138,14 +138,14 @@ void DragonFlyBSDProcess_writeField(Process* this, RichString* str, ProcessField
...
@@ -138,14 +138,14 @@ void DragonFlyBSDProcess_writeField(Process* this, RichString* str, ProcessField
long
DragonFlyBSDProcess_compare
(
const
void
*
v1
,
const
void
*
v2
)
{
long
DragonFlyBSDProcess_compare
(
const
void
*
v1
,
const
void
*
v2
)
{
DragonFlyBSDProcess
*
p1
,
*
p2
;
DragonFlyBSDProcess
*
p1
,
*
p2
;
Settings
*
settings
=
((
Process
*
)
v1
)
->
settings
;
Settings
*
settings
=
((
Process
*
)
v1
)
->
settings
;
if
(
settings
->
direction
==
1
)
{
if
(
settings
->
ss
->
direction
==
1
)
{
p1
=
(
DragonFlyBSDProcess
*
)
v1
;
p1
=
(
DragonFlyBSDProcess
*
)
v1
;
p2
=
(
DragonFlyBSDProcess
*
)
v2
;
p2
=
(
DragonFlyBSDProcess
*
)
v2
;
}
else
{
}
else
{
p2
=
(
DragonFlyBSDProcess
*
)
v1
;
p2
=
(
DragonFlyBSDProcess
*
)
v1
;
p1
=
(
DragonFlyBSDProcess
*
)
v2
;
p1
=
(
DragonFlyBSDProcess
*
)
v2
;
}
}
switch
((
int
)
settings
->
sortKey
)
{
switch
((
int
)
settings
->
ss
->
sortKey
)
{
// add Platform-specific fields here
// add Platform-specific fields here
case
JID
:
case
JID
:
return
(
p1
->
jid
-
p2
->
jid
);
return
(
p1
->
jid
-
p2
->
jid
);
...
...
freebsd/FreeBSDProcess.c
View file @
f78f658e
...
@@ -136,14 +136,14 @@ void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
...
@@ -136,14 +136,14 @@ void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
long
FreeBSDProcess_compare
(
const
void
*
v1
,
const
void
*
v2
)
{
long
FreeBSDProcess_compare
(
const
void
*
v1
,
const
void
*
v2
)
{
FreeBSDProcess
*
p1
,
*
p2
;
FreeBSDProcess
*
p1
,
*
p2
;
Settings
*
settings
=
((
Process
*
)
v1
)
->
settings
;
Settings
*
settings
=
((
Process
*
)
v1
)
->
settings
;
if
(
settings
->
direction
==
1
)
{
if
(
settings
->
ss
->
direction
==
1
)
{
p1
=
(
FreeBSDProcess
*
)
v1
;
p1
=
(
FreeBSDProcess
*
)
v1
;
p2
=
(
FreeBSDProcess
*
)
v2
;
p2
=
(
FreeBSDProcess
*
)
v2
;
}
else
{
}
else
{
p2
=
(
FreeBSDProcess
*
)
v1
;
p2
=
(
FreeBSDProcess
*
)
v1
;
p1
=
(
FreeBSDProcess
*
)
v2
;
p1
=
(
FreeBSDProcess
*
)
v2
;
}
}
switch
((
int
)
settings
->
sortKey
)
{
switch
((
int
)
settings
->
ss
->
sortKey
)
{
// add FreeBSD-specific fields here
// add FreeBSD-specific fields here
case
JID
:
case
JID
:
return
(
p1
->
jid
-
p2
->
jid
);
return
(
p1
->
jid
-
p2
->
jid
);
...
...
openbsd/OpenBSDProcess.c
View file @
f78f658e
...
@@ -215,14 +215,14 @@ void OpenBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
...
@@ -215,14 +215,14 @@ void OpenBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
long
OpenBSDProcess_compare
(
const
void
*
v1
,
const
void
*
v2
)
{
long
OpenBSDProcess_compare
(
const
void
*
v1
,
const
void
*
v2
)
{
OpenBSDProcess
*
p1
,
*
p2
;
OpenBSDProcess
*
p1
,
*
p2
;
Settings
*
settings
=
((
Process
*
)
v1
)
->
settings
;
Settings
*
settings
=
((
Process
*
)
v1
)
->
settings
;
if
(
settings
->
direction
==
1
)
{
if
(
settings
->
ss
->
direction
==
1
)
{
p1
=
(
OpenBSDProcess
*
)
v1
;
p1
=
(
OpenBSDProcess
*
)
v1
;
p2
=
(
OpenBSDProcess
*
)
v2
;
p2
=
(
OpenBSDProcess
*
)
v2
;
}
else
{
}
else
{
p2
=
(
OpenBSDProcess
*
)
v1
;
p2
=
(
OpenBSDProcess
*
)
v1
;
p1
=
(
OpenBSDProcess
*
)
v2
;
p1
=
(
OpenBSDProcess
*
)
v2
;
}
}
switch
(
settings
->
sortKey
)
{
switch
(
settings
->
ss
->
sortKey
)
{
// add OpenBSD-specific fields here
// add OpenBSD-specific fields here
default:
default:
return
Process_compare
(
v1
,
v2
);
return
Process_compare
(
v1
,
v2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment