mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Mark Platform_defaultFields const
This commit is contained in:
parent
c150e4bde9
commit
f614b8a19f
@ -359,7 +359,7 @@ Settings* Settings_new(int initialCpuCount) {
|
||||
// TODO: turn 'fields' into a Vector,
|
||||
// (and ProcessFields into proper objects).
|
||||
this->flags = 0;
|
||||
ProcessField* defaults = Platform_defaultFields;
|
||||
const ProcessField* defaults = Platform_defaultFields;
|
||||
for (int i = 0; defaults[i]; i++) {
|
||||
this->fields[i] = defaults[i];
|
||||
this->flags |= Process_fields[defaults[i]].flags;
|
||||
|
@ -39,7 +39,7 @@ in the source distribution for its full text.
|
||||
#endif
|
||||
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
const SignalItem Platform_signals[] = {
|
||||
{ .name = " 0 Cancel", .number = 0 },
|
||||
|
@ -20,7 +20,7 @@ in the source distribution for its full text.
|
||||
#include "SignalsPanel.h"
|
||||
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
extern const ProcessField Platform_defaultFields[];
|
||||
|
||||
extern double Platform_timebaseToNS;
|
||||
|
||||
|
@ -31,7 +31,7 @@ in the source distribution for its full text.
|
||||
#include <math.h>
|
||||
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
const SignalItem Platform_signals[] = {
|
||||
{ .name = " 0 Cancel", .number = 0 },
|
||||
|
@ -18,7 +18,7 @@ in the source distribution for its full text.
|
||||
#include "SignalsPanel.h"
|
||||
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
extern const ProcessField Platform_defaultFields[];
|
||||
|
||||
extern const SignalItem Platform_signals[];
|
||||
|
||||
|
@ -47,7 +47,7 @@ in the source distribution for its full text.
|
||||
#include "zfs/ZfsCompressedArcMeter.h"
|
||||
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
const SignalItem Platform_signals[] = {
|
||||
{ .name = " 0 Cancel", .number = 0 },
|
||||
|
@ -19,7 +19,7 @@ in the source distribution for its full text.
|
||||
#include "SignalsPanel.h"
|
||||
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
extern const ProcessField Platform_defaultFields[];
|
||||
|
||||
extern const SignalItem Platform_signals[];
|
||||
|
||||
|
@ -65,7 +65,7 @@ in the source distribution for its full text.
|
||||
#endif
|
||||
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
const SignalItem Platform_signals[] = {
|
||||
{ .name = " 0 Cancel", .number = 0 },
|
||||
|
@ -18,7 +18,7 @@ in the source distribution for its full text.
|
||||
#include "ProcessLocksScreen.h"
|
||||
#include "SignalsPanel.h"
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
extern const ProcessField Platform_defaultFields[];
|
||||
|
||||
extern const SignalItem Platform_signals[];
|
||||
|
||||
|
@ -42,7 +42,7 @@ in the source distribution for its full text.
|
||||
#include "XUtils.h"
|
||||
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
/*
|
||||
* See /usr/include/sys/signal.h
|
||||
|
@ -20,7 +20,7 @@ in the source distribution for its full text.
|
||||
#include "SignalsPanel.h"
|
||||
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
extern const ProcessField Platform_defaultFields[];
|
||||
|
||||
/* see /usr/include/sys/signal.h */
|
||||
extern const SignalItem Platform_signals[];
|
||||
|
@ -86,7 +86,7 @@ const SignalItem Platform_signals[] = {
|
||||
|
||||
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, LWPID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
const ProcessField Platform_defaultFields[] = { PID, LWPID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
const MeterClass* const Platform_meterTypes[] = {
|
||||
&CPUMeter_class,
|
||||
|
@ -40,7 +40,7 @@ extern const SignalItem Platform_signals[];
|
||||
|
||||
extern const unsigned int Platform_numberOfSignals;
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
extern const ProcessField Platform_defaultFields[];
|
||||
|
||||
extern const MeterClass* const Platform_meterTypes[];
|
||||
|
||||
|
@ -28,7 +28,7 @@ const SignalItem Platform_signals[] = {
|
||||
|
||||
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
|
||||
|
||||
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
|
||||
|
||||
const MeterClass* const Platform_meterTypes[] = {
|
||||
&CPUMeter_class,
|
||||
|
@ -19,7 +19,7 @@ extern const SignalItem Platform_signals[];
|
||||
|
||||
extern const unsigned int Platform_numberOfSignals;
|
||||
|
||||
extern ProcessField Platform_defaultFields[];
|
||||
extern const ProcessField Platform_defaultFields[];
|
||||
|
||||
extern const MeterClass* const Platform_meterTypes[];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user