diff options
author | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:02 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-12-07 10:26:02 +0100 |
commit | d67ee86091f9e07f8d85c1fb77c7c58989e676bb (patch) | |
tree | 900f5e62bfd8e8c082be75a94f5348dea819beba /IncSet.h | |
parent | 3cbc50cde37fee19ce98ee8260b0a6095b829c4c (diff) | |
parent | 65357c8c46154de4e4eca14075bfe5523bb5fc14 (diff) | |
download | debian_htop-d67ee86091f9e07f8d85c1fb77c7c58989e676bb.tar.gz debian_htop-d67ee86091f9e07f8d85c1fb77c7c58989e676bb.tar.bz2 debian_htop-d67ee86091f9e07f8d85c1fb77c7c58989e676bb.zip |
Update upstream source from tag 'upstream/3.0.3'
Update to upstream version '3.0.3'
with Debian dir 8a3a733dc80e45b1cde220f88fcfd815869742f0
Diffstat (limited to 'IncSet.h')
-rw-r--r-- | IncSet.h | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -3,13 +3,16 @@ /* htop - IncSet.h (C) 2005-2012 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 <stdbool.h> +#include <stddef.h> + #include "FunctionBar.h" #include "Panel.h" -#include <stdbool.h> +#include "Vector.h" #define INCMODE_MAX 40 @@ -18,10 +21,8 @@ typedef enum { INC_FILTER = 1 } IncType; -#define IncSet_filter(inc_) (inc_->filtering ? inc_->modes[INC_FILTER].buffer : NULL) - typedef struct IncMode_ { - char buffer[INCMODE_MAX+1]; + char buffer[INCMODE_MAX + 1]; int index; FunctionBar* bar; bool isFilter; @@ -35,6 +36,10 @@ typedef struct IncSet_ { bool found; } IncSet; +static inline const char* IncSet_filter(const IncSet* this) { + return this->filtering ? this->modes[INC_FILTER].buffer : NULL; +} + typedef const char* (*IncMode_GetPanelValue)(Panel*, int); void IncSet_reset(IncSet* this, IncType type); @@ -53,7 +58,7 @@ const char* IncSet_getListItemValue(Panel* panel, int i); void IncSet_activate(IncSet* this, IncType type, Panel* panel); -void IncSet_drawBar(IncSet* this); +void IncSet_drawBar(const IncSet* this); int IncSet_synthesizeEvent(IncSet* this, int x); |