aboutsummaryrefslogtreecommitdiff
path: root/scripts/write_config
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/write_config')
-rw-r--r--scripts/write_config/solution.c11
-rw-r--r--scripts/write_config/write.c6
2 files changed, 9 insertions, 8 deletions
diff --git a/scripts/write_config/solution.c b/scripts/write_config/solution.c
index a8d9fc7..f575864 100644
--- a/scripts/write_config/solution.c
+++ b/scripts/write_config/solution.c
@@ -1,5 +1,6 @@
#include "solution.h"
+extern int exit_status;
void solution_check(struct symlist *sl, FILE * f) {
int c;
// skip first line
@@ -28,20 +29,16 @@ void solution_check(struct symlist *sl, FILE * f) {
continue;
if (sl->array[id - 1].sym == NULL)
continue;
- //tristate val = sym_get_tristate_value(sl->array[id - 1].sym);
- //sym_set_tristate_value(sl->array[id - 1].sym, neg ? no : yes);
- //sym_calc_value(sl->array[id - 1].sym);
if (neg ==
(sym_get_tristate_value(sl->array[id - 1].sym) ==
no ? true : false))
- //printf("Ok\n");
{
- } else
+ } else {
printf("Problem %s=%d/%d\n", sl->array[id - 1].sym->name,
!neg,
sym_get_tristate_value(sl->array[id - 1].sym));
- //if (sym_get_tristate_value(sl->array[id - 1].sym) != val)
- //printf("Change: %s\n", sl->array[id - 1].sym->name);
+ exit_status++;
+ }
} else {
if (w_pos >= w_size) {
w_size *= 2;
diff --git a/scripts/write_config/write.c b/scripts/write_config/write.c
index 86895b6..29fcd60 100644
--- a/scripts/write_config/write.c
+++ b/scripts/write_config/write.c
@@ -11,7 +11,10 @@
int verbose_level;
char *file, *folder;
+int exit_status;
+
int main(int argc, char **argv) {
+ exit_status = 0;
verbose_level = 1;
int i;
for (i = 1; i < argc; i++) {
@@ -47,6 +50,7 @@ int main(int argc, char **argv) {
textdomain(PACKAGE);
conf_parse(file);
+ struct symbol *sym;
//conf_read(def_config_file);
conf_read(".config");
@@ -68,5 +72,5 @@ int main(int argc, char **argv) {
conf_write(".config");
- return 0;
+ return exit_status;
}