6main(
int argc,
char *argv[])
8 char *default_filename = SOURCE_DIR
"/example-01.conf";
9 char *filename_ptr = default_filename;
12 filename_ptr = argv[1];
16 fputs(
"This example program only accepts a single argument:\n\n", stderr);
17 fprintf(stderr,
"%s <config-file>\n\n", argv[0]);
32 printf(
"Key: %s, Value: %s\n", list->key,
33 list->value ? list->value :
"NULL");
42 printf(
"Attribute: %s\n", attr);
struct Canfigger * canfigger_parse_file(const char *file, const int delimiter)
Parse a configuration file into a linked list of key-value nodes.
void canfigger_free_current_attr_str_advance(struct attributes *attributes, char **attr)
Free the current attribute string and advance to the next attribute.
void canfigger_free_current_key_node_advance(struct Canfigger **node)
Free the current node and advance the list pointer to the next node.
A single node in the parsed configuration linked list.