canfigger v0.3.x Lightweight config file parser library

Loading...
Searching...
No Matches
canfigger.h
Go to the documentation of this file.
1
29#pragma once
30
43 struct attributes
44{
45 char *str;
46 char *current;
47 char *iter_ptr;
48};
49
59 struct Canfigger
60{
61 char *key;
62 char *value;
63 struct attributes *attributes;
64 struct Canfigger *next;
65};
66
74 struct Canfigger *canfigger_parse_file(const char *file, const int delimiter);
75
81 void canfigger_free_current_key_node_advance(struct Canfigger **list);
82
89 void canfigger_free_current_attr_str_advance(struct attributes *attributes, char **attr);
canfigger_free_current_key_node_advance
void canfigger_free_current_key_node_advance(struct Canfigger **list)
Frees the current key node and advances to the next node in the list.
Definition canfigger.c:114
canfigger_parse_file
struct Canfigger * canfigger_parse_file(const char *file, const int delimiter)
Parses a configuration file and creates a linked list of key-value pairs.
Definition canfigger.c:330
canfigger_free_current_attr_str_advance
void canfigger_free_current_attr_str_advance(struct attributes *attributes, char **attr)
Frees the current attribute string and advances to the next attribute.
Definition canfigger.c:75
Canfigger
Structure to represent a key-value pair with attributes in the configuration.
Definition canfigger.h:60
attributes
Structure to hold attribute details of a configuration key.
Definition canfigger.h:44