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

Type representing a number. More...

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

Go to the source code of this file.

Functions

static int number_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
 Set a Number by string - Implements ConfigSetType::string_set() -. More...
 
static int number_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result)
 Get a Number as a string - Implements ConfigSetType::string_get() -. More...
 
static int number_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Set a Number config item by int - Implements ConfigSetType::native_set() -. More...
 
static intptr_t number_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
 Get an int from a Number config item - Implements ConfigSetType::native_get() -. More...
 
static int number_string_plus_equals (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, const char *value, struct Buffer *err)
 Add to a Number by string - Implements ConfigSetType::string_plus_equals() -. More...
 
static int number_string_minus_equals (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, const char *value, struct Buffer *err)
 Subtract from a Number by string - Implements ConfigSetType::string_minus_equals() -. More...
 
static int number_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
 Reset a Number to its initial value - Implements ConfigSetType::reset() -. More...
 

Variables

const struct ConfigSetType cst_number
 Config type representing a number. More...
 

Detailed Description

Type representing a number.

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

Variable Documentation

◆ cst_number

const struct ConfigSetType cst_number
Initial value:
= {
"number",
NULL,
}
static int number_string_plus_equals(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, const char *value, struct Buffer *err)
Add to a Number by string - Implements ConfigSetType::string_plus_equals() -.
Definition: number.c:158
static int number_string_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result)
Get a Number as a string - Implements ConfigSetType::string_get() -.
Definition: number.c:98
static int number_reset(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
Reset a Number to its initial value - Implements ConfigSetType::reset() -.
Definition: number.c:236
static int number_native_set(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Set a Number config item by int - Implements ConfigSetType::native_set() -.
Definition: number.c:115
static int number_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
Set a Number by string - Implements ConfigSetType::string_set() -.
Definition: number.c:44
static intptr_t number_native_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
Get an int from a Number config item - Implements ConfigSetType::native_get() -.
Definition: number.c:149
static int number_string_minus_equals(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, const char *value, struct Buffer *err)
Subtract from a Number by string - Implements ConfigSetType::string_minus_equals() -...
Definition: number.c:197
#define DT_NUMBER
a number
Definition: types.h:35

Config type representing a number.

Definition at line 257 of file number.c.