diff --git a/Settings.c b/Settings.c index 4b76d612..278f0382 100644 --- a/Settings.c +++ b/Settings.c @@ -293,7 +293,7 @@ static ScreenSettings* Settings_defaultScreens(Settings* this) { if (this->nScreens) return this->screens[0]; 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); settings->sortKey = toFieldIndex(this->dynamicColumns, defaults->sortKey); } diff --git a/darwin/Platform.c b/darwin/Platform.c index dcdee1a5..acc3081a 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -49,7 +49,7 @@ in the source distribution for its full text. #endif -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Main", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/darwin/Platform.h b/darwin/Platform.h index 0022478f..4f8e7c9d 100644 --- a/darwin/Platform.h +++ b/darwin/Platform.h @@ -26,7 +26,7 @@ in the source distribution for its full text. #include "generic/uname.h" -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens; diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c index 6672a776..53727823 100644 --- a/dragonflybsd/Platform.c +++ b/dragonflybsd/Platform.c @@ -32,7 +32,7 @@ in the source distribution for its full text. #include "dragonflybsd/DragonFlyBSDProcess.h" #include "dragonflybsd/DragonFlyBSDProcessList.h" -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Main", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h index f40d5a83..ec140ad0 100644 --- a/dragonflybsd/Platform.h +++ b/dragonflybsd/Platform.h @@ -29,7 +29,7 @@ in the source distribution for its full text. #include "generic/uname.h" -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens; diff --git a/freebsd/Platform.c b/freebsd/Platform.c index eff30855..3cfe5db7 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -50,7 +50,7 @@ in the source distribution for its full text. #include "zfs/ZfsArcMeter.h" #include "zfs/ZfsCompressedArcMeter.h" -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Main", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/freebsd/Platform.h b/freebsd/Platform.h index f5ab27df..c0292d9a 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -25,7 +25,7 @@ in the source distribution for its full text. #include "generic/uname.h" -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens; diff --git a/linux/Platform.c b/linux/Platform.c index 8253817a..2200e478 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -83,7 +83,7 @@ enum CapMode { }; #endif -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Main", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/linux/Platform.h b/linux/Platform.h index 5c16e70f..f2c314f5 100644 --- a/linux/Platform.h +++ b/linux/Platform.h @@ -38,7 +38,7 @@ in the source distribution for its full text. #endif -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens; diff --git a/netbsd/Platform.c b/netbsd/Platform.c index d95be9d9..f442fe78 100644 --- a/netbsd/Platform.c +++ b/netbsd/Platform.c @@ -66,7 +66,7 @@ in the source distribution for its full text. #define prop_number_signed_value prop_number_integer_value #endif -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Main", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/netbsd/Platform.h b/netbsd/Platform.h index 428eb15a..3ad51e28 100644 --- a/netbsd/Platform.h +++ b/netbsd/Platform.h @@ -34,7 +34,7 @@ in the source distribution for its full text. #define PLATFORM_LONG_OPTIONS \ // End of list -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens; diff --git a/openbsd/Platform.c b/openbsd/Platform.c index b8e7ce91..ce227872 100644 --- a/openbsd/Platform.c +++ b/openbsd/Platform.c @@ -46,7 +46,7 @@ in the source distribution for its full text. #include "openbsd/OpenBSDProcessList.h" -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Main", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/openbsd/Platform.h b/openbsd/Platform.h index b3612cc6..e3d61163 100644 --- a/openbsd/Platform.h +++ b/openbsd/Platform.h @@ -26,7 +26,7 @@ in the source distribution for its full text. #include "generic/uname.h" -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens; diff --git a/pcp/Platform.c b/pcp/Platform.c index 952ec7ca..6845207b 100644 --- a/pcp/Platform.c +++ b/pcp/Platform.c @@ -54,7 +54,7 @@ in the source distribution for its full text. Platform* pcp; -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Main", .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/pcp/Platform.h b/pcp/Platform.h index 242e742e..dc51c736 100644 --- a/pcp/Platform.h +++ b/pcp/Platform.h @@ -58,7 +58,7 @@ typedef struct Platform_ { unsigned int ncpu; /* maximum processor count configured */ } Platform; -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens; diff --git a/solaris/Platform.c b/solaris/Platform.c index 15917c94..e852ccfc 100644 --- a/solaris/Platform.c +++ b/solaris/Platform.c @@ -40,7 +40,7 @@ in the source distribution for its full text. #include "SolarisProcessList.h" -ScreenDefaults Platform_defaultScreens[] = { +const ScreenDefaults Platform_defaultScreens[] = { { .name = "Default", .columns = "PID LWPID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", diff --git a/solaris/Platform.h b/solaris/Platform.h index 6bd8179b..1b3dc9f5 100644 --- a/solaris/Platform.h +++ b/solaris/Platform.h @@ -52,7 +52,7 @@ typedef struct envAccum_ { char* env; } envAccum; -extern ScreenDefaults Platform_defaultScreens[]; +extern const ScreenDefaults Platform_defaultScreens[]; extern const unsigned int Platform_numberOfDefaultScreens;