XMMS2
Macros | Functions | Variables
config.c File Reference
#include "cli.h"
#include <glib.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>

Macros

#define CONFIG_FILENAME   "s4-cli.conf"
 
#define HEX_TO_CHAR(h)   ((h)<10?(h) + '0':(h) + 'a' - 9)
 
#define CHAR_TO_HEX(c)   (((c) & 0xf) + (((c) & 0x40) >> 6) * 9)
 

Functions

void config_init (void)
 
void config_cleanup (void)
 
void set_var (const char *key, char *val)
 
const char * get_var (const char *key)
 
void print_set_var (const char *key)
 

Variables

config_var user_vars []
 
char * config_file
 

Macro Definition Documentation

#define CHAR_TO_HEX (   c)    (((c) & 0xf) + (((c) & 0x40) >> 6) * 9)
#define CONFIG_FILENAME   "s4-cli.conf"

Referenced by config_init().

#define HEX_TO_CHAR (   h)    ((h)<10?(h) + '0':(h) + 'a' - 9)

Function Documentation

void config_cleanup ( void  )
void config_init ( void  )
const char* get_var ( const char *  key)
void print_set_var ( const char *  key)
void set_var ( const char *  key,
char *  val 
)

Referenced by config_init().

Variable Documentation

char* config_file

Referenced by config_cleanup(), and config_init().

config_var user_vars[]
Initial value:
= {
{.key = "default_source", .default_value = "s4", .possible_values = {NULL}},
{.key = "print_mode", .default_value = "verbose", .possible_values = {"verbose", "pretty", "compact", NULL}},
{.key = NULL}
}

Referenced by config_cleanup(), config_init(), get_var(), print_set_var(), and set_var().