diff options
author | Karel Kočí <cynerd@email.cz> | 2015-05-01 20:55:43 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-05-01 20:55:43 +0200 |
commit | 3fb6326fc36c69aa0b66de4823b116d7c0a9486c (patch) | |
tree | e335cf1dac16f08048864d8c4189e66be8ea11eb /scripts/parse_kconfig/symlist.c | |
parent | cd1b4f5e954f925bb7689189a5c2fd5fef52d745 (diff) | |
download | linux-conf-perf-3fb6326fc36c69aa0b66de4823b116d7c0a9486c.tar.gz linux-conf-perf-3fb6326fc36c69aa0b66de4823b116d7c0a9486c.tar.bz2 linux-conf-perf-3fb6326fc36c69aa0b66de4823b116d7c0a9486c.zip |
parse_kconfig rewriten
parse_kconfig should now generate full dependency.
It is not transforming whole expression to CNF, but only pairs.
Diffstat (limited to 'scripts/parse_kconfig/symlist.c')
-rw-r--r-- | scripts/parse_kconfig/symlist.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/scripts/parse_kconfig/symlist.c b/scripts/parse_kconfig/symlist.c index f5f42ab..042a950 100644 --- a/scripts/parse_kconfig/symlist.c +++ b/scripts/parse_kconfig/symlist.c @@ -22,6 +22,7 @@ void symlist_add(struct symlist *sl, char *name) { sl->array[sl->pos].def_size = 0; sl->array[sl->pos].dep = NULL; sl->array[sl->pos].rev_dep = NULL; + output_push_symbol((unsigned) sl->pos, name); sl->pos++; } @@ -46,6 +47,10 @@ struct symlist_el *symlist_find(struct symlist *sl, char *name) { // TODO faster implementation? Maybe binary search tree? size_t symlist_id(struct symlist * sl, char *name) { + if (name == NULL) { + printf("Aha\n"); + return 0; + } size_t i = 0; while (i < sl->pos) { if (!strcmp(name, sl->array[i].name)) @@ -55,20 +60,6 @@ size_t symlist_id(struct symlist * sl, char *name) { return 0; } -void symlist_print(struct symlist *sl) { - /* - size_t i; - for (i = 0; i < sl->pos; i++) { - printf("%d:%s\n", sl->array[i].id, sl->array[i].name); - if (sl->array[i].be != NULL) { - printf(" "); - cnf_printf(sl->array[i].be); - printf("\n"); - } - } - */ -} - void symlist_free(struct symlist *sl) { free(sl->array); free(sl); |