Lines Matching refs:set

152 void xlu__cfg_set_free(XLU_ConfigSetting *set) {  in xlu__cfg_set_free()  argument
153 if (!set) return; in xlu__cfg_set_free()
154 free(set->name); in xlu__cfg_set_free()
155 xlu__cfg_value_free(set->value); in xlu__cfg_set_free()
156 free(set); in xlu__cfg_set_free()
160 XLU_ConfigSetting *set, *set_next; in xlu_cfg_destroy() local
163 for (set= cfg->settings; in xlu_cfg_destroy()
164 set; in xlu_cfg_destroy()
165 set= set_next) { in xlu_cfg_destroy()
166 set_next= set->next; in xlu_cfg_destroy()
167 xlu__cfg_set_free(set); in xlu_cfg_destroy()
174 XLU_ConfigSetting *set; in find() local
176 for (set= cfg->settings; in find()
177 set; in find()
178 set= set->next) in find()
179 if (!strcmp(set->name, n)) in find()
180 return set; in find()
186 XLU_ConfigSetting *set; in find_atom() local
188 set= find(cfg,n); in find_atom()
189 if (!set) return ESRCH; in find_atom()
191 if (set->value->type!=XLU_STRING) { in find_atom()
196 cfg->config_source, set->lineno, n); in find_atom()
199 *set_r= set; in find_atom()
252 XLU_ConfigSetting *set; in xlu_cfg_get_string() local
255 e= find_atom(cfg,n,&set,dont_warn); if (e) return e; in xlu_cfg_get_string()
256 *value_r= set->value->u.string; in xlu_cfg_get_string()
262 XLU_ConfigSetting *set; in xlu_cfg_replace_string() local
265 e= find_atom(cfg,n,&set,dont_warn); if (e) return e; in xlu_cfg_replace_string()
267 *value_r= strdup(set->value->u.string); in xlu_cfg_replace_string()
274 XLU_ConfigSetting *set; in xlu_cfg_get_long() local
278 e= find_atom(cfg,n,&set,dont_warn); if (e) return e; in xlu_cfg_get_long()
279 errno= 0; l= strtol(set->value->u.string, &ep, 0); in xlu_cfg_get_long()
288 cfg->config_source, set->lineno, n, strerror(e)); in xlu_cfg_get_long()
291 if (*ep || ep==set->value->u.string) { in xlu_cfg_get_long()
295 cfg->config_source, set->lineno, n); in xlu_cfg_get_long()
316 XLU_ConfigSetting *set; in xlu_cfg_get_list() local
317 set= find(cfg,n); if (!set) return ESRCH; in xlu_cfg_get_list()
318 if (set->value->type!=XLU_LIST) { in xlu_cfg_get_list()
323 cfg->config_source, set->lineno, n); in xlu_cfg_get_list()
327 if (list_r) *list_r= &set->value->u.list; in xlu_cfg_get_list()
328 if (entries_r) *entries_r= set->value->u.list.nvalues; in xlu_cfg_get_list()
455 XLU_ConfigSetting *set; in xlu__cfg_set_store() local
460 set = malloc(sizeof(*set)); in xlu__cfg_set_store()
461 if (!set) { in xlu__cfg_set_store()
465 set->name= name; in xlu__cfg_set_store()
466 set->value = val; in xlu__cfg_set_store()
467 set->lineno= lineno; in xlu__cfg_set_store()
468 set->next= ctx->cfg->settings; in xlu__cfg_set_store()
469 ctx->cfg->settings= set; in xlu__cfg_set_store()