From f9a0d4a9d4ddd46d0e1e129d4db6f731e7efafa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Apr 2015 13:41:44 +0200 Subject: Configure write_config to compare and not set value --- scripts/write_config/solution.c | 10 ++++++---- scripts/write_config/write.c | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/write_config/solution.c b/scripts/write_config/solution.c index 03e3f53..5a82a01 100644 --- a/scripts/write_config/solution.c +++ b/scripts/write_config/solution.c @@ -32,12 +32,14 @@ void solution_set(struct symlist *sl, FILE * f) { if (neg == (sym_get_tristate_value(sl->array[id - 1].sym) == no ? true : false)) - printf("Ok\n"); - else + //printf("Ok\n"); + { + } else printf("Problem %s=%d/%d\n", sl->array[id - 1].sym->name, - !neg, sym_get_tristate_value(sl->array[id - 1].sym)); + !neg, + sym_get_tristate_value(sl->array[id - 1].sym)); //if (sym_get_tristate_value(sl->array[id - 1].sym) != val) - //printf("Change\n"); + //printf("Change: %s\n", sl->array[id - 1].sym->name); } else { if (w_pos >= w_size) { w_size *= 2; diff --git a/scripts/write_config/write.c b/scripts/write_config/write.c index d8e87bf..4bec6aa 100644 --- a/scripts/write_config/write.c +++ b/scripts/write_config/write.c @@ -47,8 +47,8 @@ int main(int argc, char **argv) { textdomain(PACKAGE); conf_parse(file); + //conf_read(def_config_file); conf_read(".config"); - conf_write(".config"); FILE *f = fopen(symbol_map_file, "r"); if (f == NULL) { @@ -66,5 +66,7 @@ int main(int argc, char **argv) { solution_set(sl, f); fclose(f); + conf_write(".config"); + return 0; } -- cgit v1.2.3