mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
@ -75,32 +75,15 @@ ProcessFieldData Process_fields[] = {
|
||||
[LAST_PROCESSFIELD] = { .name = "*** report bug! ***", .title = NULL, .description = NULL, .flags = 0, },
|
||||
};
|
||||
|
||||
char* Process_pidFormat = "%7u ";
|
||||
char* Process_tpgidFormat = "%7u ";
|
||||
|
||||
void Process_setupColumnWidths() {
|
||||
int maxPid = Platform_getMaxPid();
|
||||
if (maxPid == -1) return;
|
||||
if (maxPid > 99999) {
|
||||
Process_fields[PID].title = " PID ";
|
||||
Process_fields[PPID].title = " PPID ";
|
||||
Process_fields[TPGID].title = " TPGID ";
|
||||
Process_fields[TGID].title = " TGID ";
|
||||
Process_fields[PGRP].title = " PGRP ";
|
||||
Process_fields[SESSION].title = " SESN ";
|
||||
Process_pidFormat = "%7u ";
|
||||
Process_tpgidFormat = "%7d ";
|
||||
} else {
|
||||
Process_fields[PID].title = " PID ";
|
||||
Process_fields[PPID].title = " PPID ";
|
||||
Process_fields[TPGID].title = "TPGID ";
|
||||
Process_fields[TGID].title = " TGID ";
|
||||
Process_fields[PGRP].title = " PGRP ";
|
||||
Process_fields[SESSION].title = " SESN ";
|
||||
Process_pidFormat = "%5u ";
|
||||
Process_tpgidFormat = "%5d ";
|
||||
}
|
||||
}
|
||||
ProcessPidColumn Process_pidColumns[] = {
|
||||
{ .id = PID, .label = "PID" },
|
||||
{ .id = PPID, .label = "PPID" },
|
||||
{ .id = TPGID, .label = "TPGID" },
|
||||
{ .id = TGID, .label = "TGID" },
|
||||
{ .id = PGRP, .label = "PGRP" },
|
||||
{ .id = SESSION, .label = "SESN" },
|
||||
{ .id = 0, .label = NULL },
|
||||
};
|
||||
|
||||
FreeBSDProcess* FreeBSDProcess_new(Settings* settings) {
|
||||
FreeBSDProcess* this = calloc(sizeof(FreeBSDProcess), 1);
|
||||
|
Reference in New Issue
Block a user