Lines Matching refs:cfg

115   svn_config_t *cfg = apr_palloc(result_pool, sizeof(*cfg));
117 cfg->sections = svn_hash__make(result_pool);
118 cfg->pool = result_pool;
119 cfg->x_pool = svn_pool_create(result_pool);
120 cfg->x_values = FALSE;
121 cfg->tmp_key = svn_stringbuf_create_empty(result_pool);
122 cfg->tmp_value = svn_stringbuf_create_empty(result_pool);
123 cfg->section_names_case_sensitive = section_names_case_sensitive;
124 cfg->option_names_case_sensitive = option_names_case_sensitive;
125 cfg->read_only = FALSE;
127 *cfgp = cfg;
138 svn_config_t *cfg;
141 SVN_ERR(svn_config_create2(&cfg,
153 err = svn_config__parse_registry(cfg, file + SVN_REGISTRY_PREFIX_LEN,
157 err = svn_config__parse_file(cfg, file, must_exist, result_pool);
162 *cfgp = cfg;
185 svn_config_t *cfg;
189 err = svn_config_create2(&cfg,
200 cfg, scratch_pool);
203 *cfgp = cfg;
296 get_category_config(svn_config_t **cfg,
305 *cfg = NULL;
330 return read_all(cfg, sys_reg_path, usr_reg_path,
340 svn_config_t *cfg;
343 SVN_ERR(get_category_config(&cfg, config_dir, SVN_CONFIG_CATEGORY_SERVERS,
345 svn_hash_sets(*cfg_hash, SVN_CONFIG_CATEGORY_SERVERS, cfg);
347 SVN_ERR(get_category_config(&cfg, config_dir, SVN_CONFIG_CATEGORY_CONFIG,
349 svn_hash_sets(*cfg_hash, SVN_CONFIG_CATEGORY_CONFIG, cfg);
376 for_each_option(svn_config_t *cfg, void *baton, apr_pool_t *pool,
382 for (sec_ndx = apr_hash_first(pool, cfg->sections);
412 svn_config_merge(svn_config_t *cfg, const char *file,
421 cfg->section_names_case_sensitive,
422 cfg->option_names_case_sensitive,
423 cfg->pool));
426 for_each_option(merge_cfg, cfg, merge_cfg->pool, merge_callback);
451 remove_expansions(svn_config_t *cfg)
453 if (!cfg->x_values)
456 for_each_option(cfg, NULL, cfg->x_pool, rmex_callback);
457 svn_pool_clear(cfg->x_pool);
458 cfg->x_values = FALSE;
499 find_option(svn_config_t *cfg, const char *section, const char *option,
502 void *sec_ptr = get_hash_value(cfg->sections, cfg->tmp_key, section,
503 cfg->section_names_case_sensitive);
510 cfg_option_t *opt = get_hash_value(sec->options, cfg->tmp_key, option,
511 cfg->option_names_case_sensitive);
517 opt = find_option(cfg, SVN_CONFIG__DEFAULT_SECTION, option, &sec);
527 expand_option_value(svn_config_t *cfg, cfg_section_t *section,
535 make_string_from_option(const char **valuep, svn_config_t *cfg,
564 assert(!cfg->read_only);
566 tmp_pool = (x_pool ? x_pool : svn_pool_create(cfg->x_pool));
571 if (expand_option_value(cfg, section, opt->value, &opt->x_value,
578 if (x_pool != cfg->x_pool)
583 opt->x_value = apr_pstrmemdup(cfg->x_pool, opt->x_value,
616 expand_option_value(svn_config_t *cfg, cfg_section_t *section,
641 x_opt = find_option(cfg, section->name, name, NULL);
650 make_string_from_option(&cstring, cfg, section, x_opt, x_pool);
669 cfg->x_values = TRUE;
708 svn_config_addsection(svn_config_t *cfg,
714 s = apr_palloc(cfg->pool, sizeof(cfg_section_t));
715 s->name = apr_pstrdup(cfg->pool, section);
716 if(cfg->section_names_case_sensitive)
719 hash_key = make_hash_key(apr_pstrdup(cfg->pool, section));
720 s->options = svn_hash__make(cfg->pool);
722 svn_hash_sets(cfg->sections, hash_key, s);
751 svn_config__is_expanded(svn_config_t *cfg,
757 if (cfg == NULL)
761 opt = find_option(cfg, section, option, NULL);
781 svn_config_get(svn_config_t *cfg, const char **valuep,
786 if (cfg)
789 cfg_option_t *opt = find_option(cfg, section, option, &sec);
792 make_string_from_option(valuep, cfg, sec, opt, NULL);
800 apr_pool_t *tmp_pool = svn_pool_create(cfg->pool);
802 if (!expand_option_value(cfg, sec, default_value, &x_default,
811 svn_stringbuf_set(cfg->tmp_value, x_default);
812 *valuep = cfg->tmp_value->data;
823 svn_config_set(svn_config_t *cfg,
836 SVN_ERR_ASSERT_NO_RETURN(!cfg->read_only);
838 if (cfg->read_only)
841 remove_expansions(cfg);
843 opt = find_option(cfg, section, option, &sec);
847 opt->value = apr_pstrdup(cfg->pool, value);
854 cfg->option_names_case_sensitive,
855 cfg->pool);
860 sec = svn_config_addsection(cfg, section);
907 svn_config_get_bool(svn_config_t *cfg, svn_boolean_t *valuep,
912 svn_config_get(cfg, &tmp_value, section, option, NULL);
920 svn_config_set_bool(svn_config_t *cfg,
924 svn_config_set(cfg, section, option,
929 svn_config_get_int64(svn_config_t *cfg,
936 svn_config_get(cfg, &tmp_value, section, option, NULL);
946 svn_config_set_int64(svn_config_t *cfg,
951 svn_config_set(cfg, section, option,
952 apr_psprintf(cfg->pool, "%" APR_INT64_T_FMT, value));
956 svn_config_get_yes_no_ask(svn_config_t *cfg, const char **valuep,
962 svn_config_get(cfg, &tmp_value, section, option, NULL);
985 svn_config_get_tristate(svn_config_t *cfg, svn_tristate_t *valuep,
992 svn_config_get(cfg, &tmp_value, section, option, NULL);
1017 svn_config_enumerate_sections(svn_config_t *cfg,
1023 apr_pool_t *subpool = svn_pool_create(cfg->x_pool);
1025 for (sec_ndx = apr_hash_first(subpool, cfg->sections);
1045 svn_config_enumerate_sections2(svn_config_t *cfg,
1054 for (sec_ndx = apr_hash_first(pool, cfg->sections);
1074 svn_config_enumerate(svn_config_t *cfg, const char *section,
1082 find_option(cfg, section, NULL, &sec);
1086 subpool = svn_pool_create(cfg->pool);
1096 make_string_from_option(&temp_value, cfg, sec, opt, NULL);
1107 svn_config_enumerate2(svn_config_t *cfg, const char *section,
1116 find_option(cfg, section, NULL, &sec);
1130 make_string_from_option(&temp_value, cfg, sec, opt, NULL);
1175 const char *svn_config_find_group(svn_config_t *cfg, const char *key,
1184 (void) svn_config_enumerate2(cfg, master_section, search_groups, &gb, pool);
1191 svn_config_get_server_setting(svn_config_t *cfg,
1197 svn_config_get(cfg, &retval, SVN_CONFIG_SECTION_GLOBAL,
1201 svn_config_get(cfg, &retval, server_group, option_name, retval);
1298 svn_config_get_server_setting_int(svn_config_t *cfg,
1308 tmp_value = svn_config_get_server_setting(cfg, server_group,
1330 svn_config_get_server_setting_bool(svn_config_t *cfg,
1337 tmp_value = svn_config_get_server_setting(cfg, server_group,
1345 svn_config_has_section(svn_config_t *cfg, const char *section)
1347 return NULL != get_hash_value(cfg->sections, cfg->tmp_key, section,
1348 cfg->section_names_case_sensitive);
1353 const struct svn_config_t *cfg,
1361 for (section_i = apr_hash_first(scratch_pool, cfg->sections);