mirror of https://github.com/xzeldon/htop.git
Implement IncSet_filter as function
Make it more readable and fix unenclosed macro arguments
This commit is contained in:
parent
7019949574
commit
6b3dbd5c67
6
IncSet.h
6
IncSet.h
|
@ -21,8 +21,6 @@ typedef enum {
|
||||||
INC_FILTER = 1
|
INC_FILTER = 1
|
||||||
} IncType;
|
} IncType;
|
||||||
|
|
||||||
#define IncSet_filter(inc_) (inc_->filtering ? inc_->modes[INC_FILTER].buffer : NULL)
|
|
||||||
|
|
||||||
typedef struct IncMode_ {
|
typedef struct IncMode_ {
|
||||||
char buffer[INCMODE_MAX+1];
|
char buffer[INCMODE_MAX+1];
|
||||||
int index;
|
int index;
|
||||||
|
@ -38,6 +36,10 @@ typedef struct IncSet_ {
|
||||||
bool found;
|
bool found;
|
||||||
} IncSet;
|
} 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);
|
typedef const char* (*IncMode_GetPanelValue)(Panel*, int);
|
||||||
|
|
||||||
void IncSet_reset(IncSet* this, IncType type);
|
void IncSet_reset(IncSet* this, IncType type);
|
||||||
|
|
Loading…
Reference in New Issue