NeoMutt  2024-04-25-89-g194907
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
myvar.c File Reference

Type representing a user-defined variable "my_var". More...

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

Go to the source code of this file.

Functions

static void myvar_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
 Destroy a MyVar - Implements ConfigSetType::destroy() -.
 
static int myvar_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
 Set a MyVar by string - Implements ConfigSetType::string_set() -.
 
static int myvar_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result)
 Get a MyVar as a string - Implements ConfigSetType::string_get() -.
 
static int myvar_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Set a MyVar config item by string - Implements ConfigSetType::native_set() -.
 
static intptr_t myvar_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
 Get a string from a MyVar config item - Implements ConfigSetType::native_get() -.
 
static int myvar_string_plus_equals (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, const char *value, struct Buffer *err)
 Add to a MyVar by string - Implements ConfigSetType::string_plus_equals() -.
 
static int myvar_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
 Reset a MyVar to its initial value - Implements ConfigSetType::reset() -.
 

Variables

const struct ConfigSetType CstMyVar
 Config type representing a MyVar.
 

Detailed Description

Type representing a user-defined variable "my_var".

Authors
  • Richard Russon
  • Rayford Shireman

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

Variable Documentation

◆ CstMyVar

const struct ConfigSetType CstMyVar
Initial value:
= {
"myvar",
NULL,
}
static void myvar_destroy(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef)
Destroy a MyVar - Implements ConfigSetType::destroy() -.
Definition: myvar.c:45
static intptr_t myvar_native_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
Get a string from a MyVar config item - Implements ConfigSetType::native_get() -.
Definition: myvar.c:142
static int myvar_native_set(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Set a MyVar config item by string - Implements ConfigSetType::native_set() -.
Definition: myvar.c:114
static int myvar_reset(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err)
Reset a MyVar to its initial value - Implements ConfigSetType::reset() -.
Definition: myvar.c:180
static int myvar_string_get(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result)
Get a MyVar as a string - Implements ConfigSetType::string_get() -.
Definition: myvar.c:94
static int myvar_string_plus_equals(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, const char *value, struct Buffer *err)
Add to a MyVar by string - Implements ConfigSetType::string_plus_equals() -.
Definition: myvar.c:153
static int myvar_string_set(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err)
Set a MyVar by string - Implements ConfigSetType::string_set() -.
Definition: myvar.c:57
@ DT_MYVAR
a user-defined variable (my_foo)
Definition: types.h:38

Config type representing a MyVar.

Definition at line 207 of file myvar.c.