Mark ScreenDefaults const

This commit is contained in:
Christian Göttsche 2021-12-16 15:40:50 +01:00 committed by cgzones
parent 14f428a172
commit 6e9a5e9e49
17 changed files with 17 additions and 17 deletions

View File

@ -293,7 +293,7 @@ static ScreenSettings* Settings_defaultScreens(Settings* this) {
if (this->nScreens) if (this->nScreens)
return this->screens[0]; return this->screens[0];
for (unsigned int i = 0; i < Platform_numberOfDefaultScreens; i++) { for (unsigned int i = 0; i < Platform_numberOfDefaultScreens; i++) {
ScreenDefaults* defaults = &Platform_defaultScreens[i]; const ScreenDefaults* defaults = &Platform_defaultScreens[i];
ScreenSettings* settings = Settings_newScreen(this, defaults->name, defaults->columns); ScreenSettings* settings = Settings_newScreen(this, defaults->name, defaults->columns);
settings->sortKey = toFieldIndex(this->dynamicColumns, defaults->sortKey); settings->sortKey = toFieldIndex(this->dynamicColumns, defaults->sortKey);
} }

View File

@ -49,7 +49,7 @@ in the source distribution for its full text.
#endif #endif
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Main", .name = "Main",
.columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -26,7 +26,7 @@ in the source distribution for its full text.
#include "generic/uname.h" #include "generic/uname.h"
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;

View File

@ -32,7 +32,7 @@ in the source distribution for its full text.
#include "dragonflybsd/DragonFlyBSDProcess.h" #include "dragonflybsd/DragonFlyBSDProcess.h"
#include "dragonflybsd/DragonFlyBSDProcessList.h" #include "dragonflybsd/DragonFlyBSDProcessList.h"
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Main", .name = "Main",
.columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -29,7 +29,7 @@ in the source distribution for its full text.
#include "generic/uname.h" #include "generic/uname.h"
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;

View File

@ -50,7 +50,7 @@ in the source distribution for its full text.
#include "zfs/ZfsArcMeter.h" #include "zfs/ZfsArcMeter.h"
#include "zfs/ZfsCompressedArcMeter.h" #include "zfs/ZfsCompressedArcMeter.h"
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Main", .name = "Main",
.columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -25,7 +25,7 @@ in the source distribution for its full text.
#include "generic/uname.h" #include "generic/uname.h"
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;

View File

@ -83,7 +83,7 @@ enum CapMode {
}; };
#endif #endif
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Main", .name = "Main",
.columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -38,7 +38,7 @@ in the source distribution for its full text.
#endif #endif
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;

View File

@ -66,7 +66,7 @@ in the source distribution for its full text.
#define prop_number_signed_value prop_number_integer_value #define prop_number_signed_value prop_number_integer_value
#endif #endif
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Main", .name = "Main",
.columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -34,7 +34,7 @@ in the source distribution for its full text.
#define PLATFORM_LONG_OPTIONS \ #define PLATFORM_LONG_OPTIONS \
// End of list // End of list
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;

View File

@ -46,7 +46,7 @@ in the source distribution for its full text.
#include "openbsd/OpenBSDProcessList.h" #include "openbsd/OpenBSDProcessList.h"
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Main", .name = "Main",
.columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -26,7 +26,7 @@ in the source distribution for its full text.
#include "generic/uname.h" #include "generic/uname.h"
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;

View File

@ -54,7 +54,7 @@ in the source distribution for its full text.
Platform* pcp; Platform* pcp;
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Main", .name = "Main",
.columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -58,7 +58,7 @@ typedef struct Platform_ {
unsigned int ncpu; /* maximum processor count configured */ unsigned int ncpu; /* maximum processor count configured */
} Platform; } Platform;
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;

View File

@ -40,7 +40,7 @@ in the source distribution for its full text.
#include "SolarisProcessList.h" #include "SolarisProcessList.h"
ScreenDefaults Platform_defaultScreens[] = { const ScreenDefaults Platform_defaultScreens[] = {
{ {
.name = "Default", .name = "Default",
.columns = "PID LWPID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", .columns = "PID LWPID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM",

View File

@ -52,7 +52,7 @@ typedef struct envAccum_ {
char* env; char* env;
} envAccum; } envAccum;
extern ScreenDefaults Platform_defaultScreens[]; extern const ScreenDefaults Platform_defaultScreens[];
extern const unsigned int Platform_numberOfDefaultScreens; extern const unsigned int Platform_numberOfDefaultScreens;