NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
DOXYGEN
myvar.h
Go to the documentation of this file.
1
23#ifndef MUTT_MYVAR_H
24#define MUTT_MYVAR_H
25
26#include "mutt/lib.h"
27
31struct MyVar
32{
33 char *name;
34 char *value;
35 TAILQ_ENTRY(MyVar) entries;
36};
37TAILQ_HEAD(MyVarList, MyVar);
38
39extern struct MyVarList MyVars;
40
41void myvar_del(const char *var);
42const char *myvar_get(const char *var);
43void myvar_set(const char *var, const char *val);
44void myvar_append(const char *var, const char *val);
45
46void myvarlist_free(struct MyVarList *list);
47
48#endif /* MUTT_MYVAR_H */
Convenience wrapper for the library headers.
void myvar_del(const char *var)
Unset the value of a "my_" variable.
Definition: myvar.c:146
struct MyVarList MyVars
List of all the user's custom config variables.
Definition: myvar.c:34
void myvar_set(const char *var, const char *val)
Set the value of a "my_" variable.
Definition: myvar.c:109
TAILQ_HEAD(MyVarList, MyVar)
void myvar_append(const char *var, const char *val)
Append to the value of a "my_" variable.
Definition: myvar.c:128
const char * myvar_get(const char *var)
Get the value of a "my_" variable.
Definition: myvar.c:92
void myvarlist_free(struct MyVarList *list)
Free a List of MyVars.
Definition: myvar.c:161
A user-set variable.
Definition: myvar.h:32
char * name
Name of user variable.
Definition: myvar.h:33
char * value
Value of user variable.
Definition: myvar.h:34
TAILQ_ENTRY(MyVar) entries
Linked list.