config.c File Reference

Configuration file handling. More...

#include "stdinc.h"
#include "config.h"
#include "gui.h"
#include "vfs.h"
Include dependency graph for config.c:

Go to the source code of this file.

Data Structures

struct  config_entry
 Structure containing a single configuration entry of the application. More...

Defines

#define NUM_SWITCHES   (sizeof configlist / sizeof(struct config_entry))
 The amount of configuration switches available.

Functions

static int string_to_bool (const char *val)
 Convert a "yes"/"no" string to a boolean value.
static int valid_bool (char *val)
 Determine if a boolean string is valid.
static int valid_color (char *val)
 Determine if a color string is valid.
static int valid_percentage (char *val)
 Determine if a percentage string is valid.
static int valid_md5 (char *val)
 Determine if a string containing an MD5 hash is valid.
static struct config_entryconfig_search (const char *opt)
 Search for an entry in the configlist by name.
static int config_setopt (const char *opt, char *val)
 Set a value to a configuration switch.
void config_load (const char *file, int expand)
 Load the configuration from disk.
const char * config_getopt (const char *opt)
 Return the value of a configuration switch.
int config_getopt_bool (const char *val)
 Return a value translated to boolean.
int config_getopt_color (const char *val)
 Return a value translated to curses color code.
int config_getopt_percentage (const char *val)
 Return a value translated to a percentage.

Variables

static struct config_entry configlist []
 List of configuration switches.

Detailed Description

Configuration file handling.

Definition in file config.c.

 All Data Structures Files Functions Variables Defines
Generated on Mon Mar 15 04:45:07 2010 for herrie by  doxygen 1.6.3