1 /**
2  * @file
3  * Handling of personal config ('my' variables)
4  *
5  * @authors
6  * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
7  *
8  * @copyright
9  * This program is free software: you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License as published by the Free Software
11  * Foundation, either version 2 of the License, or (at your option) any later
12  * version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License along with
20  * this program.  If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef MUTT_MYVAR_H
24 #define MUTT_MYVAR_H
25 
26 #include "mutt/lib.h"
27 
28 /**
29  * struct MyVar - A user-set variable
30  */
31 struct MyVar
32 {
33   char *name;                 ///< Name of user variable
34   char *value;                ///< Value of user variable
35   TAILQ_ENTRY(MyVar) entries; ///< Linked list
36 };
37 TAILQ_HEAD(MyVarList, MyVar);
38 
39 extern struct MyVarList MyVars; ///< List of all the user's custom config variables
40 
41 void        myvar_del(const char *var);
42 const char *myvar_get(const char *var);
43 void        myvar_set(const char *var, const char *val);
44 void        myvar_append(const char *var, const char *val);
45 
46 void myvarlist_free(struct MyVarList *list);
47 
48 #endif /* MUTT_MYVAR_H */
49