NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
enum.c File Reference

Type representing an enumeration. More...

#include "config.h"
#include <stddef.h>
#include <limits.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "enum.h"
#include "set.h"
#include "types.h"
+ Include dependency graph for enum.c:

Go to the source code of this file.

Functions

static int enum_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
 Set an Enumeration by string - Implements ConfigSetType::string_set() -. More...
 
static int enum_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result)
 Get an Enumeration as a string - Implements ConfigSetType::string_get() -. More...
 
static int enum_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Set an Enumeration config item by int - Implements ConfigSetType::native_set() -. More...
 
static intptr_t enum_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
 Get an int object from an Enumeration config item - Implements ConfigSetType::native_get() -. More...
 
static int enum_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
 Reset an Enumeration to its initial value - Implements ConfigSetType::reset() -. More...
 

Variables

const struct ConfigSetType cst_enum
 Config type representing an enumeration. More...
 

Detailed Description

Type representing an enumeration.

Authors
  • Richard Russon

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 enum.c.

Variable Documentation

◆ cst_enum

const struct ConfigSetType cst_enum
Initial value:
= {
"enum",
NULL,
NULL,
NULL,
}
static intptr_t enum_native_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
Get an int object from an Enumeration config item - Implements ConfigSetType::native_get() -...
Definition: enum.c:154
static int enum_native_set(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Set an Enumeration config item by int - Implements ConfigSetType::native_set() -. ...
Definition: enum.c:119
static int enum_string_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result)
Get an Enumeration as a string - Implements ConfigSetType::string_get() -.
Definition: enum.c:88
static int enum_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
Set an Enumeration by string - Implements ConfigSetType::string_set() -.
Definition: enum.c:45
#define DT_ENUM
an enumeration
Definition: types.h:31
static int enum_reset(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
Reset an Enumeration to its initial value - Implements ConfigSetType::reset() -.
Definition: enum.c:166

Config type representing an enumeration.

Definition at line 190 of file enum.c.