68#include "canfigger_version.h"
86#define CANFIGGER_CHECK_VERSION(maj, min) \
87 (CANFIGGER_VERSION_MAJOR > (maj) || \
88 (CANFIGGER_VERSION_MAJOR == (maj) && CANFIGGER_VERSION_MINOR >= (min)))
161 const int delimiter);
424 CANFIGGER_USER_DIR_DESKTOP,
425 CANFIGGER_USER_DIR_DOWNLOAD,
426 CANFIGGER_USER_DIR_TEMPLATES,
427 CANFIGGER_USER_DIR_PUBLICSHARE,
428 CANFIGGER_USER_DIR_DOCUMENTS,
429 CANFIGGER_USER_DIR_MUSIC,
430 CANFIGGER_USER_DIR_PICTURES,
431 CANFIGGER_USER_DIR_VIDEOS
void canfigger_free_dirs(char **dirs)
Free an array returned by canfigger_config_dirs() or canfigger_data_dirs().
char * canfigger_config_file(const char *filename)
Return the path to a config file in the platform base config directory.
char ** canfigger_data_dirs(void)
Return the system data search path, most important first.
struct Canfigger * canfigger_parse_file(const char *file, const int delimiter)
Parse a configuration file into a linked list of key-value nodes.
char * canfigger_state_dir(const char *appname)
Return the platform state directory for an application.
char ** canfigger_config_dirs(void)
Return the system config search path, most important first.
char * canfigger_cache_dir(const char *appname)
Return the platform cache directory for an application.
char * canfigger_data_dir(const char *appname)
Return the platform data directory for an application.
canfigger_user_dir
The well-known user directories, as named by the XDG user directories specification.
char * canfigger_find_config_file(const char *appname, const char *filename)
Find an existing config file along the full config search path.
void canfigger_free_list(struct Canfigger **node)
Free all remaining nodes in the list.
void canfigger_free_current_attr_str_advance(struct attributes *attributes, char **attr)
Free the current attribute string and advance to the next attribute.
char * canfigger_config_dir(const char *appname)
Return the platform config directory for an application.
char * canfigger_path_join(const char *dir, const char *file)
Join a directory path and a filename with the platform separator.
void canfigger_free_current_key_node_advance(struct Canfigger **node)
Free the current node and advance the list pointer to the next node.
char * canfigger_runtime_dir(const char *appname)
Return the runtime directory for an application, or NULL.
A single node in the parsed configuration linked list.
Internal iteration state for a node's attribute list.