28 int main(
int argc,
char** argv)
42 fprintf(stderr,
"Usage: %s ini1 ini2 ... iniN\n", argv[0]);
50 fprintf(stderr,
"ERROR: %s\n", error->message);
54 for(i = 2; i < argc; i++)
60 fprintf(stderr,
"ERROR: %s\n", error->message);
68 fprintf(stderr,
"ERROR: %s\n", error->message);
76 for(i = 0; i < ngrps; i++)
78 printf(
"[%s]\n", groups[i]);
81 for(j = 0; j < nkeys; j++)
86 printf(
" %s:\n", keys[j]);
87 for(k = 0; k < nlist; k++)
89 printf(
" [%d] = %s\n", k,
96 printf(
" %s = %s\n", keys[j],
int main(int argc, char **argv)
Main function for the test.
char * fo_config_get_list(fo_conf *conf, char *group, char *key, int idx, GError **error)
int fo_config_list_length(fo_conf *conf, char *group, char *key, GError **error)
Gets the length of the list associated with a particular list key.
void fo_config_free(fo_conf *conf)
Frees the memory associated with the internal configuration data structures.
char ** fo_config_group_set(fo_conf *conf, int *length)
Gets the set of group names.
fo_conf * fo_config_load(char *rawname, GError **error)
Load the configuration information from the provided file.
char * fo_config_get(fo_conf *conf, const char *group, const char *key, GError **error)
Gets an element based on its group name and key name. If the group or key is not found,...
int fo_config_is_list(fo_conf *conf, char *group, char *key, GError **error)
Checks if a particular value is a list or just a normal value.
void fo_config_join(fo_conf *dst, fo_conf *src, GError **error)
Takes all groups and key from a fo_conf and adds them to another.
char ** fo_config_key_set(fo_conf *conf, char *group, int *length)
Gets the set of key names for a particular group.
The main FOSSology C library.