aboutsummaryrefslogtreecommitdiff
path: root/src/format.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-07 13:14:12 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-07 13:14:12 +0300
commitd0371e1111cb083b3916a6ced2ed515a69ca71cc (patch)
tree31cabf0e3dd328c0bb8b2acabc4fc0ee8c844461 /src/format.c
parent366e821d28a007a0ca49b9deb97c6c9cea97f2b9 (diff)
downloadgrecs-d0371e1111cb083b3916a6ced2ed515a69ca71cc.tar.gz
grecs-d0371e1111cb083b3916a6ced2ed515a69ca71cc.tar.bz2
Implement table-driven statement aggregation.
* src/grecs.h (grecs_tree_reduce): Change signature. (nodeproc_closure)<flags>: New member. (value_to_list): Bugfixes. (value_to_array,array_add): New functions. (node_aggregate_stmt): Rewrite. (node_merge_stmt): Take additional argument. (grecs_tree_reduce): Take additional argument. All uses changed. * src/tree.c (grecs_tree_free): Don't coredump on NULL arg. * src/format.c (grecs_format_simple_statement): Bugfix. * tests/reduce03.at: New testcase. * tests/Makefile.am: Add reduce03.at * tests/testsuite.at: Add reduce03.at * tests/gcffmt.c: Single grecs_format_node call is enough to print the entire tree. * tests/gcfset.c (logging_kwtab): Mark "facility" as GRECS_AGGR to disable aggregation. (usage): Update. (main): New options: -print, -locus, -sort, -noset. Pass GRECS_AGGR to grecs_tree_reduce.
Diffstat (limited to 'src/format.c')
-rw-r--r--src/format.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/format.c b/src/format.c
index f12b465..9b6b6af 100644
--- a/src/format.c
+++ b/src/format.c
@@ -143,10 +143,11 @@ grecs_format_simple_statement(struct grecs_keyword *kwp, unsigned level,
if (GRECS_IS_LIST(kwp->type))
fprintf(stream, "list of %s",
gettext(grecs_data_type_string(
- GRECS_TYPE (kwp->type))));
+ GRECS_TYPE(kwp->type))));
else
fprintf(stream, "%s",
- gettext(grecs_data_type_string(kwp->type)));
+ gettext(grecs_data_type_string(
+ GRECS_TYPE(kwp->type))));
fprintf(stream, ">;\n");
}
}

Return to:

Send suggestions and report system problems to the System administrator.