VLC 4.0.0-dev
Loading...
Searching...
No Matches
chain.c File Reference
Include dependency graph for chain.c:

Macros

#define SKIPSPACE(p)
#define SKIPTRAILINGSPACE(p, e)

Functions

static bool IsEscapeNeeded (char c)
static bool IsEscape (const char *psz)
static bool IsSpace (char c)
static const char * ChainGetEnd (const char *psz_string)
 This function will return a pointer after the end of a string element.
static char * ChainGetValue (const char **ppsz_string)
 It will extract an option value (=... or {...}).
const char * config_ChainParseOptions (config_chain_t **pp_cfg, const char *psz_opts)
 This function will parse a configuration string (psz_opts) and.
char * config_ChainCreate (char **ppsz_name, config_chain_t **pp_cfg, const char *psz_chain)
 This function will parse a configuration string (psz_string) and.
void config_ChainDestroy (config_chain_t *p_cfg)
 This function will release a linked list of config_chain_t (Including the head).
void config_ChainParse (vlc_object_t *p_this, const char *psz_prefix, const char *const *ppsz_options, const config_chain_t *cfg)
 This function will.
config_chain_tconfig_ChainDuplicate (const config_chain_t *p_src)
 This function will duplicate a linked list of config_chain_t.
char * config_StringUnescape (char *psz_string)
 This function will unescape a string in place and will return a pointer on the given string.
char * config_StringEscape (const char *str)
 This function will escape a string that can be unescaped by config_StringUnescape.

Macro Definition Documentation

◆ SKIPSPACE

#define SKIPSPACE ( p)
Value:
p += strspn( p, " \t" )
#define p(t)

Referenced by ChainGetEnd(), ChainGetValue(), config_ChainCreate(), and config_ChainParseOptions().

◆ SKIPTRAILINGSPACE

#define SKIPTRAILINGSPACE ( p,
e )
Value:
do { while( e > p && IsSpace( *(e-1) ) ) e--; } while(0)
static bool IsSpace(char c)
Definition chain.c:54

Referenced by ChainGetValue().

Function Documentation

◆ ChainGetEnd()

const char * ChainGetEnd ( const char * psz_string)
static

This function will return a pointer after the end of a string element.

It will search the closing element which is } for { (it will handle nested { ... }) " for " ' for '

References ChainGetEnd(), IsEscape(), p, and SKIPSPACE.

Referenced by ChainGetEnd(), and ChainGetValue().

◆ ChainGetValue()

char * ChainGetValue ( const char ** ppsz_string)
static

It will extract an option value (=... or {...}).

It will remove the initial = if present but keep the {}

References ChainGetEnd(), config_StringUnescape(), p, psz_value, SKIPSPACE, SKIPTRAILINGSPACE, and strndup().

Referenced by config_ChainParseOptions().

◆ IsEscape()

bool IsEscape ( const char * psz)
static

References IsEscapeNeeded().

Referenced by ChainGetEnd(), and config_StringUnescape().

◆ IsEscapeNeeded()

bool IsEscapeNeeded ( char c)
static

Referenced by config_StringEscape(), and IsEscape().

◆ IsSpace()

bool IsSpace ( char c)
static