diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-07 21:47:25 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-07 21:47:25 +0000 |
commit | 06b58933ad0f46995c2a676671f92a335dfdfe05 (patch) | |
tree | 8ae8e65299193bbdeeb1c36c97e0bc2dc2b8999d /set.c | |
parent | aee8c19adbaffb8fe189c626d7e188e5ea008b0d (diff) |
Merging non-SASL authentication patch from #863. This also implements
hidden-default settings, which means a setting is hidden unless it was
changed from the default. This seems like appropriate behaviour for
something as obscure as this.
Diffstat (limited to 'set.c')
-rw-r--r-- | set.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -111,6 +111,14 @@ int set_getbool( set_t **head, const char *key ) return bool2int( s ); } +int set_isvisible( set_t *set ) +{ + /* the default value is not stored in value, only in def */ + return !( ( set->flags & SET_HIDDEN ) || + ( ( set->flags & SET_HIDDEN_DEFAULT ) && + ( set->value == NULL ) ) ); +} + int set_setstr( set_t **head, const char *key, char *value ) { set_t *s = set_find( head, key ); |