+ return 0;
+}
+
+int conf_read_simple(const char *name, int load_config)
+{
+ FILE *in = NULL;
+ FILE *defaults = NULL;
+ struct symbol *sym;
+ int i;
+ char *home_dir = getenv("HOME");
+ char *default_config_path = NULL;
+
+ if(home_dir){
+ default_config_path = malloc(strlen(home_dir) + sizeof(LOCAL_BUILD_SETTINGS) + 1);
+ sprintf(default_config_path, "%s%s", home_dir, LOCAL_BUILD_SETTINGS);
+ defaults = zconf_fopen(default_config_path);
+ if(defaults)
+ printf("# using buildsystem predefines from %s\n", default_config_path);
+ free(default_config_path);
+ }
+
+ if(load_config){
+ if (name) {
+ in = zconf_fopen(name);
+ } else {
+ const char **names = conf_confnames;
+ while ((name = *names++)) {
+ name = conf_expand_value(name);
+ in = zconf_fopen(name);
+ if (in) {
+ printf(_("#\n"
+ "# using defaults found in %s\n"
+ "#\n"), name);
+ break;
+ }
+ }
+ }
+ }
+
+ if (!in && !defaults)
+ return 1;
+
+ conf_filename = name;
+ conf_lineno = 0;
+ conf_warnings = 0;
+ conf_unsaved = 0;
+
+ for_all_symbols(i, sym) {
+ sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED;
+ if (sym_is_choice(sym))
+ sym->flags &= ~SYMBOL_NEW;
+ sym->flags &= ~SYMBOL_VALID;
+ switch (sym->type) {
+ case S_INT:
+ case S_HEX:
+ case S_STRING:
+ if (sym->user.val)
+ free(sym->user.val);
+ default:
+ sym->user.val = NULL;
+ sym->user.tri = no;
+ }
+ }
+
+ if(defaults)
+ conf_read_file(defaults, sym);
+
+ if(in)
+ conf_read_file(in, sym);
+