Handling of personal config ('my' variables) More...
Go to the source code of this file.
Functions | |
static struct MyVar * | myvar_new (const char *name, const char *value) |
Create a new MyVar. More... | |
static void | myvar_free (struct MyVar **ptr) |
Free a MyVar. More... | |
static struct MyVar * | myvar_find (const char *var) |
Locate a "my_" variable. More... | |
const char * | myvar_get (const char *var) |
Get the value of a "my_" variable. More... | |
void | myvar_set (const char *var, const char *val) |
Set the value of a "my_" variable. More... | |
void | myvar_append (const char *var, const char *val) |
Append to the value of a "my_" variable. More... | |
void | myvar_del (const char *var) |
Unset the value of a "my_" variable. More... | |
void | myvarlist_free (struct MyVarList *list) |
Free a List of MyVars. More... | |
Variables | |
struct MyVarList | MyVars = TAILQ_HEAD_INITIALIZER(MyVars) |
List of all the user's custom config variables. More... | |
Handling of personal config ('my' variables)
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.
|
static |
Create a new MyVar.
name | Variable name |
value | Variable value |
ptr | New MyVar |
Definition at line 44 of file myvar.c.
|
static |
|
static |
Locate a "my_" variable.
var | Variable name |
ptr | Success, variable exists |
NULL | Error, variable doesn't exist |
Definition at line 73 of file myvar.c.
const char * myvar_get | ( | const char * | var | ) |
Get the value of a "my_" variable.
var | Variable name |
ptr | Success, value of variable |
NULL | Error, variable doesn't exist |
Definition at line 92 of file myvar.c.
void myvar_set | ( | const char * | var, |
const char * | val | ||
) |
Set the value of a "my_" variable.
var | Variable name |
val | Value to set |
Definition at line 109 of file myvar.c.
void myvar_append | ( | const char * | var, |
const char * | val | ||
) |
Append to the value of a "my_" variable.
var | Variable name |
val | Value to append |
Definition at line 128 of file myvar.c.
void myvar_del | ( | const char * | var | ) |
Unset the value of a "my_" variable.
var | Variable name |
Definition at line 146 of file myvar.c.
void myvarlist_free | ( | struct MyVarList * | list | ) |
Free a List of MyVars.
list | List of MyVars |
Definition at line 161 of file myvar.c.
struct MyVarList MyVars = TAILQ_HEAD_INITIALIZER(MyVars) |