diff options
author | Elise Lennion <elise.lennion@gmail.com> | 2016-12-19 19:11:04 -0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-12-20 20:23:33 +0100 |
commit | 0e1824475e2e7aee09dd2d5c38fc4ebd4b7ab8bb (patch) | |
tree | bd874497cbc923152ade88b453141f82ffb0182e /src/expression.c | |
parent | 68de70f2b3fc64b7016da48530946165c9986780 (diff) |
expression: Show the base which pre-defined constants are displayed
so the user know how we express it.
The base was added to all symbol tables, which are associated with
datatype->sym_tbl, so they are displayed in the right base.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expression.c')
-rw-r--r-- | src/expression.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/expression.c b/src/expression.c index 2aada77d..b7403c70 100644 --- a/src/expression.c +++ b/src/expression.c @@ -114,7 +114,11 @@ void expr_describe(const struct expr *expr) printf("\n"); if (expr->dtype->sym_tbl != NULL) { - printf("\npre-defined symbolic constants:\n"); + printf("\npre-defined symbolic constants "); + if (expr->dtype->sym_tbl->base == BASE_DECIMAL) + printf("(in decimal):\n"); + else + printf("(in hexadecimal):\n"); symbol_table_print(expr->dtype->sym_tbl, expr->dtype, expr->byteorder); } |