diff --git a/IncSet.c b/IncSet.c index d280caf4..8cd850b3 100644 --- a/IncSet.c +++ b/IncSet.c @@ -31,7 +31,7 @@ void IncSet_reset(IncSet* this, IncType type) { static const char* const searchFunctions[] = {"Next ", "Cancel ", " Search: ", NULL}; static const char* const searchKeys[] = {"F3", "Esc", " "}; -static int searchEvents[] = {KEY_F(3), 27, ERR}; +static const int searchEvents[] = {KEY_F(3), 27, ERR}; static inline void IncMode_initSearch(IncMode* search) { memset(search, 0, sizeof(IncMode)); @@ -41,7 +41,7 @@ static inline void IncMode_initSearch(IncMode* search) { static const char* const filterFunctions[] = {"Done ", "Clear ", " Filter: ", NULL}; static const char* const filterKeys[] = {"Enter", "Esc", " "}; -static int filterEvents[] = {13, 27, ERR}; +static const int filterEvents[] = {13, 27, ERR}; static inline void IncMode_initFilter(IncMode* filter) { memset(filter, 0, sizeof(IncMode)); diff --git a/InfoScreen.c b/InfoScreen.c index ceb29f74..515d64f0 100644 --- a/InfoScreen.c +++ b/InfoScreen.c @@ -19,7 +19,7 @@ static const char* const InfoScreenFunctions[] = {"Search ", "Filter ", "Refresh static const char* const InfoScreenKeys[] = {"F3", "F4", "F5", "Esc"}; -static int InfoScreenEvents[] = {KEY_F(3), KEY_F(4), KEY_F(5), 27}; +static const int InfoScreenEvents[] = {KEY_F(3), KEY_F(4), KEY_F(5), 27}; InfoScreen* InfoScreen_init(InfoScreen* this, const Process* process, FunctionBar* bar, int height, const char* panelHeader) { this->process = process; diff --git a/MetersPanel.c b/MetersPanel.c index 7e47ad8b..7e20be0f 100644 --- a/MetersPanel.c +++ b/MetersPanel.c @@ -22,7 +22,7 @@ in the source distribution for its full text. // we call them "Styles". static const char* const MetersFunctions[] = {"Style ", "Move ", " ", "Delete", "Done ", NULL}; static const char* const MetersKeys[] = {"Space", "Enter", " ", "Del", "F10"}; -static int MetersEvents[] = {' ', 13, ERR, KEY_DC, KEY_F(10)}; +static const int MetersEvents[] = {' ', 13, ERR, KEY_DC, KEY_F(10)}; // We avoid UTF-8 arrows ← → here as they might display full-width on Chinese // terminals, breaking our aligning. @@ -30,7 +30,7 @@ static int MetersEvents[] = {' ', 13, ERR, KEY_DC, KEY_F(10)}; // considered "Ambiguous characters". static const char* const MetersMovingFunctions[] = {"Style ", "Lock ", "Up ", "Down ", "Left ", "Right ", " ", "Delete", "Done ", NULL}; static const char* const MetersMovingKeys[] = {"Space", "Enter", "Up", "Dn", "<-", "->", " ", "Del", "F10"}; -static int MetersMovingEvents[] = {' ', 13, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, ERR, KEY_DC, KEY_F(10)}; +static const int MetersMovingEvents[] = {' ', 13, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, ERR, KEY_DC, KEY_F(10)}; static FunctionBar* Meters_movingBar = NULL; void MetersPanel_cleanup() { diff --git a/TraceScreen.c b/TraceScreen.c index 47cf0ab1..e6bd1fb1 100644 --- a/TraceScreen.c +++ b/TraceScreen.c @@ -33,7 +33,7 @@ static const char* const TraceScreenFunctions[] = {"Search ", "Filter ", "AutoSc static const char* const TraceScreenKeys[] = {"F3", "F4", "F8", "F9", "Esc"}; -static int TraceScreenEvents[] = {KEY_F(3), KEY_F(4), KEY_F(8), KEY_F(9), 27}; +static const int TraceScreenEvents[] = {KEY_F(3), KEY_F(4), KEY_F(8), KEY_F(9), 27}; const InfoScreenClass TraceScreen_class = { .super = {