mirror of https://github.com/xzeldon/htop.git
Mark ScreenDefaults const
This commit is contained in:
parent
14f428a172
commit
6e9a5e9e49
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue