Type representing a boolean. More...
#include "config.h"
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "bool.h"
#include "set.h"
#include "subset.h"
#include "types.h"
Go to the source code of this file.
Functions | |
static int | bool_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err) |
Set a Bool by string - Implements ConfigSetType::string_set() -. | |
static int | bool_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result) |
Get a Bool as a string - Implements ConfigSetType::string_get() -. | |
static int | bool_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) |
Set a Bool config item by bool - Implements ConfigSetType::native_set() -. | |
static intptr_t | bool_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Get a bool from a Bool config item - Implements ConfigSetType::native_get() -. | |
static int | bool_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Reset a Bool to its initial value - Implements ConfigSetType::reset() -. | |
int | bool_he_toggle (struct ConfigSubset *sub, struct HashElem *he, struct Buffer *err) |
Toggle the value of a bool. | |
int | bool_str_toggle (struct ConfigSubset *sub, const char *name, struct Buffer *err) |
Toggle the value of a bool. | |
Variables | |
const char * | BoolValues [] |
Valid strings for creating a Bool. | |
const struct ConfigSetType | CstBool |
Config type representing an boolean. | |
Type representing a boolean.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file bool.c.
int bool_he_toggle | ( | struct ConfigSubset * | sub, |
struct HashElem * | he, | ||
struct Buffer * | err | ||
) |
Toggle the value of a bool.
num | Result, e.g. CSR_SUCCESS |
Definition at line 196 of file bool.c.
int bool_str_toggle | ( | struct ConfigSubset * | sub, |
const char * | name, | ||
struct Buffer * | err | ||
) |
Toggle the value of a bool.
sub | Config Subset |
name | Name of config item |
err | Buffer for error messages |
num | Result, e.g. CSR_SUCCESS |
Definition at line 224 of file bool.c.
const char* BoolValues[] |
const struct ConfigSetType CstBool |
Config type representing an boolean.