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
ef318930
Commit
ef318930
authored
Feb 22, 2010
by
Hisham Muhammad
Browse files
minor tweak
parent
c9e59b4a
Changes
3
Show whitespace changes
Inline
Side-by-side
ChangeLog
View file @
ef318930
What's new in version 0.8.4
What's new in version 0.8.3
* BUGFIX: Fix crash on F6 key
...
...
Process.c
View file @
ef318930
...
...
@@ -43,6 +43,10 @@ in the source distribution for its full text.
/*{
#ifndef Process_isThread
#define Process_isThread(_process) (_process->pid != _process->tgid || _process->m_size == 0)
#endif
typedef enum ProcessField_ {
PID = 1, COMM, STATE, PPID, PGRP, SESSION, TTY_NR, TPGID, FLAGS, MINFLT, CMINFLT, MAJFLT, CMAJFLT, UTIME,
STIME, CUTIME, CSTIME, PRIORITY, NICE, ITREALVALUE, STARTTIME, VSIZE, RSS, RLIM, STARTCODE, ENDCODE,
...
...
@@ -303,7 +307,7 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
case
PROCESSOR
:
snprintf
(
buffer
,
n
,
"%3d "
,
this
->
processor
+
1
);
break
;
case
NLWP
:
snprintf
(
buffer
,
n
,
"%4ld "
,
this
->
nlwp
);
break
;
case
COMM
:
{
if
(
this
->
pl
->
highlightThreads
&&
(
this
->
pid
!=
this
->
tgid
||
this
->
m_size
==
0
))
{
if
(
this
->
pl
->
highlightThreads
&&
Process_isThread
(
this
))
{
attr
=
CRT_colors
[
PROCESS_THREAD
];
baseattr
=
CRT_colors
[
PROCESS_THREAD_BASENAME
];
}
...
...
Process.h
View file @
ef318930
...
...
@@ -45,6 +45,10 @@ in the source distribution for its full text.
#define PROCESS_COMM_LEN 300
#ifndef Process_isThread
#define Process_isThread(process) (process->pid != process->tgid || process->m_size == 0)
#endif
typedef
enum
ProcessField_
{
PID
=
1
,
COMM
,
STATE
,
PPID
,
PGRP
,
SESSION
,
TTY_NR
,
TPGID
,
FLAGS
,
MINFLT
,
CMINFLT
,
MAJFLT
,
CMAJFLT
,
UTIME
,
STIME
,
CUTIME
,
CSTIME
,
PRIORITY
,
NICE
,
ITREALVALUE
,
STARTTIME
,
VSIZE
,
RSS
,
RLIM
,
STARTCODE
,
ENDCODE
,
...
...
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