Dunst
Lightweight notification daemon
Loading...
Searching...
No Matches
ini.c File Reference
#include "ini.h"
#include "utils.h"
#include "log.h"
#include "settings.h"
+ Include dependency graph for ini.c:

Go to the source code of this file.

Functions

struct sectionget_section (struct ini *ini, const char *name)
 
struct sectionget_or_create_section (struct ini *ini, const char *name)
 
void add_entry (struct ini *ini, const char *section_name, const char *key, const char *value)
 
const char * section_get_value (struct ini *ini, const struct section *s, const char *key)
 
const char * get_value (struct ini *ini, const char *section, const char *key)
 
bool ini_is_set (struct ini *ini, const char *ini_section, const char *ini_key)
 
const char * next_section (const struct ini *ini, const char *section)
 
struct iniload_ini_file (FILE *fp)
 
void finish_ini (struct ini *ini)
 

Detailed Description

License
BSD-3-Clause

Definition in file ini.c.

Function Documentation

◆ add_entry()

void add_entry ( struct ini * ini,
const char * section_name,
const char * key,
const char * value )

Definition at line 39 of file ini.c.

◆ finish_ini()

void finish_ini ( struct ini * ini)

Definition at line 163 of file ini.c.

◆ get_or_create_section()

struct section * get_or_create_section ( struct ini * ini,
const char * name )

Definition at line 24 of file ini.c.

◆ get_section()

struct section * get_section ( struct ini * ini,
const char * name )

Definition at line 14 of file ini.c.

◆ get_value()

const char * get_value ( struct ini * ini,
const char * section,
const char * key )

Definition at line 62 of file ini.c.

◆ ini_is_set()

bool ini_is_set ( struct ini * ini,
const char * ini_section,
const char * ini_key )

Definition at line 68 of file ini.c.

◆ load_ini_file()

struct ini * load_ini_file ( FILE * fp)

Definition at line 89 of file ini.c.

◆ next_section()

const char * next_section ( const struct ini * ini,
const char * section )
Returns
the next known section
Return values
ifsection == NULL returns first section
NULLif no more sections are available

Definition at line 73 of file ini.c.

◆ section_get_value()

const char * section_get_value ( struct ini * ini,
const struct section * s,
const char * key )

Definition at line 50 of file ini.c.