diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-07 23:12:05 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-07 23:12:05 +0300 |
commit | 6079aba813fbeaffb174791cda51ea588e5cca20 (patch) | |
tree | d686b683053d57e4925d6ba17f0ae26fb6343c43 /src/tree.c | |
parent | 4b0e477181f51c12f62236ec91f4bb714125393d (diff) | |
download | grecs-6079aba813fbeaffb174791cda51ea588e5cca20.tar.gz grecs-6079aba813fbeaffb174791cda51ea588e5cca20.tar.bz2 |
Bugfixes.
* src/grecs.h (GRECS_MULT): New flag.
* src/lookup.c (parse_label): Allocate array elements.
* src/tree.c (grecs_process_ident): Store string duplicates
in lists.
(reduceproc): Ignore keywords marked with GRECS_MULT.
Diffstat (limited to 'src/tree.c')
-rw-r--r-- | src/tree.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -740,7 +740,8 @@ grecs_process_ident(struct grecs_keyword *kwp, grecs_value_t *value, list = _grecs_simple_list_create(1); list->cmp = grecs_prop_tab[type].cmp; if (type == grecs_type_string) - grecs_list_append(list, value->v.string); + grecs_list_append(list, + grecs_strdup(value->v.string)); else { ptr = grecs_malloc(size); if (grecs_string_convert(ptr, type, @@ -1050,7 +1051,8 @@ reduceproc(enum grecs_tree_recurse_op op, struct grecs_node *node, void *data) clos->cursect = kwp; } } - node_reduce(node, kwp, clos->flags); + if (!(kwp->type & GRECS_MULT)) + node_reduce(node, kwp, clos->flags); } return grecs_tree_recurse_ok; } |