diff options
author | Karel Kočí <cynerd@email.cz> | 2015-04-11 13:18:07 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-04-11 13:18:07 +0200 |
commit | dc3c959a5f6d74e91f9a2d997d20e47b07b65628 (patch) | |
tree | 6010f883f1b916d004c64b8c88d8938cf10e3dcb /scripts/kconfig_parser/output.c | |
parent | ef33b81dfe8fe8b3b161618b4a7f48fc196b105d (diff) | |
download | linux-conf-perf-dc3c959a5f6d74e91f9a2d997d20e47b07b65628.tar.gz linux-conf-perf-dc3c959a5f6d74e91f9a2d997d20e47b07b65628.tar.bz2 linux-conf-perf-dc3c959a5f6d74e91f9a2d997d20e47b07b65628.zip |
Kconfig_parser renamed to parse_kconfig
Diffstat (limited to 'scripts/kconfig_parser/output.c')
-rw-r--r-- | scripts/kconfig_parser/output.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/scripts/kconfig_parser/output.c b/scripts/kconfig_parser/output.c deleted file mode 100644 index 989f4f0..0000000 --- a/scripts/kconfig_parser/output.c +++ /dev/null @@ -1,65 +0,0 @@ -#include "output.h" - -void fprint_rules_cnf(FILE * f, unsigned id, struct cnfexpr *cnf, bool nt) { - unsigned i, y; - switch (cnf->type) { - case CT_FALSE: - // Never satisfiable - if (!nt) - fprintf(f, "-"); - fprintf(f, "%d\n", id); - break; - case CT_TRUE: - // Always satisfiable - break; - case CT_EXPR: - for (i = 0; i < cnf->size; i++) { - if (!nt) - fprintf(f, "-"); - fprintf(f, "%d ", id); - for (y = 0; y < cnf->sizes[i] - 1; y++) { - fprintf(f, "%d ", cnf->exprs[i][y]); - } - fprintf(f, "%d ", cnf->exprs[i][cnf->sizes[i] - 1]); - fprintf(f, "\n"); - } - break; - } -} - -void fprint_rules(struct symlist *sl, char *output) { - FILE *f; - f = fopen(output, "w"); - if (f == NULL) { - fprintf(stderr, "Can't create file: %s\n", output); - return; - } - size_t i; - struct symlist_el *el; - for (i = 0; i < sl->pos; i++) { - if (sl->array[i].be != NULL) { - el = sl->array + i; - if (el->be != NULL) { - fprint_rules_cnf(f, el->id, el->be, false); - } - if (el->re_be != NULL) { - fprint_rules_cnf(f, el->id, el->re_be, true); - } - } - } - fclose(f); -} - -void fprint_symbol_map(struct symlist *sl, char *output) { - FILE *f; - f = fopen(output, "w"); - if (f == NULL) { - fprintf(stderr, "Can't create file: %s\n", output); - return; - } - size_t i; - for (i = 0; i < sl->pos; i++) { - fprintf(f, "%d:%s\n", sl->array[i].id, sl->array[i].name); - } - fclose(f); -} |