Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
0a184b76
Commit
0a184b76
authored
10 years ago
by
Hisham Muhammad
Browse files
Options
Download
Email Patches
Plain Diff
Merge fixes
parent
8b5b7382
master
darwin-cpu-average
fixedgray
freebsd
linear-graph-scan
lua
next
perfcounters
pkgconfig-on-linux
solaris
sreclaimable
travis-ci
wip
3.0.0beta5
3.0.0beta4
3.0.0beta3
3.0.0beta2
3.0.0beta1
2.2.0
2.1.0
2.0.2
2.0.1
2.0.0
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
Process.c
+1
-3
Process.c
Process.h
+1
-3
Process.h
Settings.c
+2
-2
Settings.c
Settings.h
+2
-2
Settings.h
linux/LinuxProcess.c
+3
-3
linux/LinuxProcess.c
linux/LinuxProcess.h
+1
-1
linux/LinuxProcess.h
linux/LinuxProcessList.c
+1
-1
linux/LinuxProcessList.c
with
11 additions
and
15 deletions
+11
-15
Process.c
View file @
0a184b76
...
...
@@ -45,8 +45,6 @@ in the source distribution for its full text.
#include <sys/types.h>
typedef struct Settings_ Settings;
#define PROCESS_FLAG_IO 1
#define PROCESS_FLAG_IOPRIO 2
#define PROCESS_FLAG_OPENVZ 4
...
...
@@ -660,7 +658,7 @@ ObjectClass Process_class = {
.
compare
=
Process_compare
};
void
Process_init
(
Process
*
this
,
struct
Settings_
*
settings
,
struct
ProcessList_
*
pl
)
{
void
Process_init
(
Process
*
this
,
struct
ProcessList_
*
pl
)
{
this
->
pid
=
0
;
this
->
pl
=
pl
;
this
->
tag
=
false
;
...
...
This diff is collapsed.
Click to expand it.
Process.h
View file @
0a184b76
...
...
@@ -24,8 +24,6 @@ in the source distribution for its full text.
#include <sys/types.h>
typedef
struct
Settings_
Settings
;
#define PROCESS_FLAG_IO 1
#define PROCESS_FLAG_IOPRIO 2
#define PROCESS_FLAG_OPENVZ 4
...
...
@@ -195,7 +193,7 @@ void Process_done(Process* this);
extern
ObjectClass
Process_class
;
void
Process_init
(
Process
*
this
,
struct
Settings_
*
settings
,
struct
ProcessList_
*
pl
);
void
Process_init
(
Process
*
this
,
struct
ProcessList_
*
pl
);
void
Process_toggleTag
(
Process
*
this
);
...
...
This diff is collapsed.
Click to expand it.
Settings.c
View file @
0a184b76
...
...
@@ -22,14 +22,14 @@ in the source distribution for its full text.
#include "Header.h"
#include <stdbool.h>
struct Settings_ {
typedef
struct Settings_ {
char* userSettings;
ProcessList* pl;
Header* header;
int colorScheme;
int delay;
bool changed;
};
}
Settings
;
}*/
...
...
This diff is collapsed.
Click to expand it.
Settings.h
View file @
0a184b76
...
...
@@ -15,14 +15,14 @@ in the source distribution for its full text.
#include "Header.h"
#include <stdbool.h>
struct
Settings_
{
typedef
struct
Settings_
{
char
*
userSettings
;
ProcessList
*
pl
;
Header
*
header
;
int
colorScheme
;
int
delay
;
bool
changed
;
};
}
Settings
;
void
Settings_delete
(
Settings
*
this
);
...
...
This diff is collapsed.
Click to expand it.
linux/LinuxProcess.c
View file @
0a184b76
...
...
@@ -27,15 +27,15 @@ typedef struct LinuxProcess_ {
}*/
LinuxProcess
*
LinuxProcess_new
(
Settings
*
settings
,
ProcessList
*
pl
)
{
LinuxProcess
*
LinuxProcess_new
(
ProcessList
*
pl
)
{
LinuxProcess
*
this
=
calloc
(
sizeof
(
LinuxProcess
),
1
);
Process_init
(
&
this
->
super
,
settings
,
pl
);
Object_setClass
(
this
,
Class
(
Process
));
Process_init
(
&
this
->
super
,
pl
);
return
this
;
}
void
LinuxProcess_delete
(
Object
*
cast
)
{
LinuxProcess
*
this
=
(
LinuxProcess
*
)
this
;
Object_setClass
(
this
,
Class
(
Process
));
Process_done
((
Process
*
)
cast
);
free
(
this
);
}
...
...
This diff is collapsed.
Click to expand it.
linux/LinuxProcess.h
View file @
0a184b76
...
...
@@ -20,7 +20,7 @@ typedef struct LinuxProcess_ {
#define Process_delete LinuxProcess_delete
LinuxProcess
*
LinuxProcess_new
(
Settings
*
settings
);
LinuxProcess
*
LinuxProcess_new
(
ProcessList
*
pl
);
void
LinuxProcess_delete
(
Object
*
cast
);
...
...
This diff is collapsed.
Click to expand it.
linux/LinuxProcessList.c
View file @
0a184b76
...
...
@@ -465,7 +465,7 @@ static bool LinuxProcessList_processEntries(ProcessList* this, const char* dirna
process
=
existingProcess
;
assert
(
process
->
pid
==
pid
);
}
else
{
process
=
(
Process
*
)
LinuxProcess_new
(
settings
,
this
);
process
=
(
Process
*
)
LinuxProcess_new
(
this
);
assert
(
process
->
comm
==
NULL
);
process
->
pid
=
pid
;
process
->
tgid
=
parent
?
parent
->
pid
:
pid
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help