Lines Matching refs:profile
211 (prf_file_t profile);
213 static errcode_t profile_get_value(profile_t profile, const char *name,
307 profile_t profile; in profile_init() local
312 profile = malloc(sizeof(struct _profile_t)); in profile_init()
313 if (!profile) in profile_init()
315 memset(profile, 0, sizeof(struct _profile_t)); in profile_init()
316 profile->magic = PROF_MAGIC_PROFILE; in profile_init()
317 last = &profile->first_file; in profile_init()
355 if (!profile->first_file) { in profile_init()
362 *ret_profile = profile; in profile_init()
366 profile_release(profile); in profile_init()
371 profile_release(profile_t profile) in profile_release() argument
375 if (!profile || profile->magic != PROF_MAGIC_PROFILE) in profile_release()
378 for (p = profile->first_file; p; p = next) { in profile_release()
382 profile->magic = 0; in profile_release()
383 free(profile); in profile_release()
392 errcode_t profile_set_default(profile_t profile, const char *def_string) in profile_set_default() argument
401 if (!def_string || !profile || profile->magic != PROF_MAGIC_PROFILE) in profile_set_default()
404 for (prf = profile->first_file; prf; prf = prf->next) { in profile_set_default()
1272 profile_t profile; member
1284 profile_iterator_create(profile_t profile, const char *const *names, int flags, in profile_iterator_create() argument
1290 if (profile == 0) in profile_iterator_create()
1292 if (profile->magic != PROF_MAGIC_PROFILE) in profile_iterator_create()
1306 iter->profile = profile; in profile_iterator_create()
1309 iter->file = profile->first_file; in profile_iterator_create()
1469 errcode_t profile_get_value(profile_t profile, const char *name, in profile_get_value() argument
1483 if ((retval = profile_iterator_create(profile, names, in profile_get_value()
1502 profile_get_string(profile_t profile, const char *name, const char *subname, in profile_get_string() argument
1509 if (profile) { in profile_get_string()
1510 retval = profile_get_value(profile, name, subname, in profile_get_string()
1530 profile_get_integer(profile_t profile, const char *name, const char *subname, in profile_get_integer() argument
1539 if (profile == 0) in profile_get_integer()
1542 retval = profile_get_value(profile, name, subname, subsubname, &value); in profile_get_integer()
1571 profile_get_uint(profile_t profile, const char *name, const char *subname, in profile_get_uint() argument
1581 if (profile == 0) in profile_get_uint()
1584 retval = profile_get_value(profile, name, subname, subsubname, &value); in profile_get_uint()
1612 profile_get_double(profile_t profile, const char *name, const char *subname, in profile_get_double() argument
1621 if (profile == 0) in profile_get_double()
1624 retval = profile_get_value(profile, name, subname, subsubname, &value); in profile_get_double()
1684 profile_get_boolean(profile_t profile, const char *name, const char *subname, in profile_get_boolean() argument
1690 if (profile == 0) { in profile_get_boolean()
1695 retval = profile_get_value(profile, name, subname, subsubname, &value); in profile_get_boolean()
1755 static void do_cmd(profile_t profile, char **argv) in do_cmd() argument
1770 retval = profile_get_values(profile, names, &values); in do_cmd()
1787 retval = profile_get_value(profile, name, subname, in do_cmd()
1791 retval = profile_get_subsection_names(profile, names, in do_cmd()
1795 retval = profile_get_relation_names(profile, names, in do_cmd()
1800 (profile->first_file->root, stdout); in do_cmd()
1803 retval = profile_clear_relation(profile, names); in do_cmd()
1805 retval = profile_update_relation(profile, names+2, in do_cmd()
1810 (profile->first_file->root); in do_cmd()
1813 retval = profile_rename_section(profile, names+1, *names); in do_cmd()
1818 retval = profile_add_relation(profile, names+1, value); in do_cmd()
1820 retval = profile_flush(profile); in do_cmd()
1841 static void do_batchmode(profile_t profile) in do_batchmode() argument
1856 do_cmd(profile, argv); in do_batchmode()
1860 profile_release(profile); in do_batchmode()
1876 profile_t profile; in main() local
1889 retval = profile_init_path(argv[1], &profile); in main()
1894 retval = profile_set_default(profile, default_str); in main()
1902 do_batchmode(profile); in main()
1904 do_cmd(profile, argv+2); in main()
1905 profile_release(profile); in main()