40 int main(
int argc,
char** argv)
54 fprintf(stderr,
"Usage: %s ini1 ini2 ... iniN\n", argv[0]);
62 fprintf(stderr,
"ERROR: %s\n", error->message);
66 for(i = 2; i < argc; i++)
72 fprintf(stderr,
"ERROR: %s\n", error->message);
80 fprintf(stderr,
"ERROR: %s\n", error->message);
88 for(i = 0; i < ngrps; i++)
90 printf(
"[%s]\n", groups[i]);
93 for(j = 0; j < nkeys; j++)
98 printf(
" %s:\n", keys[j]);
99 for(k = 0; k < nlist; k++)
101 printf(
" [%d] = %s\n", k,
108 printf(
" %s = %s\n", keys[j],
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.
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.
int main(int argc, char **argv)
Main function for the test.
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, the error object is set and NULL is returned.
char ** fo_config_group_set(fo_conf *conf, int *length)
Gets the set of group names.
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.
The main FOSSology C library.
void fo_config_free(fo_conf *conf)
Frees the memory associated with the internal configuration data structures.
char ** fo_config_key_set(fo_conf *conf, char *group, int *length)
Gets the set of key names for a particular group.
fo_conf * fo_config_load(char *rawname, GError **error)
Load the configuration information from the provided file.