mirror of https://github.com/xzeldon/htop.git
Solaris: make Process callbacks static
Fixes prototype of SolarisProcess_compareByKey since 90ea3ac3
This commit is contained in:
parent
6301d5c1da
commit
a076488809
|
@ -18,17 +18,6 @@ in the source distribution for its full text.
|
|||
#include <sys/syscall.h>
|
||||
|
||||
|
||||
const ProcessClass SolarisProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
.delete = Process_delete,
|
||||
.compare = Process_compare
|
||||
},
|
||||
.writeField = SolarisProcess_writeField,
|
||||
.compareByKey = SolarisProcess_compareByKey
|
||||
};
|
||||
|
||||
const ProcessFieldData Process_fields[LAST_PROCESSFIELD] = {
|
||||
[0] = { .name = "", .title = NULL, .description = NULL, .flags = 0, },
|
||||
[PID] = { .name = "PID", .title = "PID", .description = "Process/thread ID", .flags = 0, .pidColumn = true, },
|
||||
|
@ -78,7 +67,7 @@ void Process_delete(Object* cast) {
|
|||
free(sp);
|
||||
}
|
||||
|
||||
void SolarisProcess_writeField(const Process* this, RichString* str, ProcessField field) {
|
||||
static void SolarisProcess_writeField(const Process* this, RichString* str, ProcessField field) {
|
||||
const SolarisProcess* sp = (const SolarisProcess*) this;
|
||||
char buffer[256]; buffer[255] = '\0';
|
||||
int attr = CRT_colors[DEFAULT_COLOR];
|
||||
|
@ -101,7 +90,7 @@ void SolarisProcess_writeField(const Process* this, RichString* str, ProcessFiel
|
|||
RichString_appendWide(str, attr, buffer);
|
||||
}
|
||||
|
||||
int SolarisProcess_compareByKey(const Process* v1, const Process* v2, ProcessField key) {
|
||||
static int SolarisProcess_compareByKey(const Process* v1, const Process* v2, ProcessField key) {
|
||||
const SolarisProcess* p1 = (const SolarisProcess*)v1;
|
||||
const SolarisProcess* p2 = (const SolarisProcess*)v2;
|
||||
|
||||
|
@ -140,3 +129,14 @@ bool Process_isThread(const Process* this) {
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const ProcessClass SolarisProcess_class = {
|
||||
.super = {
|
||||
.extends = Class(Process),
|
||||
.display = Process_display,
|
||||
.delete = Process_delete,
|
||||
.compare = Process_compare
|
||||
},
|
||||
.writeField = SolarisProcess_writeField,
|
||||
.compareByKey = SolarisProcess_compareByKey
|
||||
};
|
||||
|
|
|
@ -40,10 +40,6 @@ Process* SolarisProcess_new(const Settings* settings);
|
|||
|
||||
void Process_delete(Object* cast);
|
||||
|
||||
void SolarisProcess_writeField(const Process* this, RichString* str, ProcessField field);
|
||||
|
||||
long SolarisProcess_compareByKey(const Process* v1, const Process* v2, ProcessField field);
|
||||
|
||||
bool Process_isThread(const Process* this);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue