diff options
author | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:01 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:01 +0100 |
commit | 65357c8c46154de4e4eca14075bfe5523bb5fc14 (patch) | |
tree | 8f430ee5a0d5de377c4e7c94e47842a27c70d7e8 /CategoriesPanel.c | |
parent | f80394a20254938142011855f2954b3f63fe5909 (diff) | |
download | debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.gz debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.bz2 debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.zip |
New upstream version 3.0.3upstream/3.0.3
Diffstat (limited to 'CategoriesPanel.c')
-rw-r--r-- | CategoriesPanel.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/CategoriesPanel.c b/CategoriesPanel.c index 8a1e16d..4ee1ad4 100644 --- a/CategoriesPanel.c +++ b/CategoriesPanel.c @@ -1,21 +1,27 @@ /* htop - CategoriesPanel.c (C) 2004-2011 Hisham H. Muhammad -Released under the GNU GPL, see the COPYING file +Released under the GNU GPLv2, see the COPYING file in the source distribution for its full text. */ #include "CategoriesPanel.h" +#include <ctype.h> +#include <stdbool.h> +#include <stdlib.h> + +#include "AvailableColumnsPanel.h" #include "AvailableMetersPanel.h" -#include "MetersPanel.h" -#include "DisplayOptionsPanel.h" -#include "ColumnsPanel.h" #include "ColorsPanel.h" -#include "AvailableColumnsPanel.h" - -#include <assert.h> -#include <stdlib.h> +#include "ColumnsPanel.h" +#include "DisplayOptionsPanel.h" +#include "FunctionBar.h" +#include "ListItem.h" +#include "MetersPanel.h" +#include "Object.h" +#include "ProvideCurses.h" +#include "Vector.h" static const char* const CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL}; @@ -81,7 +87,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { break; } default: - if (ch < 255 && isalpha(ch)) + if (0 < ch && ch < 255 && isgraph((unsigned char)ch)) result = Panel_selectByTyping(super, ch); if (result == BREAK_LOOP) result = IGNORED; @@ -91,6 +97,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { int size = ScreenManager_size(this->scr); for (int i = 1; i < size; i++) ScreenManager_remove(this->scr, 1); + switch (selected) { case 0: CategoriesPanel_makeMetersPage(this); @@ -109,7 +116,7 @@ static HandlerResult CategoriesPanel_eventHandler(Panel* super, int ch) { return result; } -PanelClass CategoriesPanel_class = { +const PanelClass CategoriesPanel_class = { .super = { .extends = Class(Panel), .delete = CategoriesPanel_delete |