mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
delta: enums are much cooler than defines
This commit is contained in:
parent
807f464522
commit
4c4e643161
|
@ -34,6 +34,18 @@
|
|||
|
||||
static bool arg_no_pager = false;
|
||||
|
||||
enum {
|
||||
SHOW_MASKED = 1 << 0,
|
||||
SHOW_EQUIV = 1 << 1,
|
||||
SHOW_REDIR = 1 << 2,
|
||||
SHOW_OVERRIDEN = 1 << 3,
|
||||
SHOW_UNCHANGED = 1 << 4,
|
||||
SHOW_DIFF = 1 << 5,
|
||||
|
||||
SHOW_DEFAULTS =
|
||||
(SHOW_MASKED | SHOW_EQUIV | SHOW_REDIR | SHOW_OVERRIDEN | SHOW_DIFF)
|
||||
};
|
||||
|
||||
static int equivalent(const char *a, const char *b) {
|
||||
char *x, *y;
|
||||
int r;
|
||||
|
@ -55,15 +67,7 @@ static int equivalent(const char *a, const char *b) {
|
|||
return r;
|
||||
}
|
||||
|
||||
#define SHOW_MASKED 1 << 0
|
||||
#define SHOW_EQUIV 1 << 1
|
||||
#define SHOW_REDIR 1 << 2
|
||||
#define SHOW_OVERRIDEN 1 << 3
|
||||
#define SHOW_UNCHANGED 1 << 4
|
||||
#define SHOW_DIFF 1 << 5
|
||||
|
||||
#define SHOW_DEFAULTS \
|
||||
(SHOW_MASKED | SHOW_EQUIV | SHOW_REDIR | SHOW_OVERRIDEN | SHOW_DIFF)
|
||||
|
||||
static int notify_override_masked(int flags, const char *top, const char *bottom) {
|
||||
if (!(flags & SHOW_MASKED))
|
||||
|
|
Loading…
Reference in a new issue