diff options
author | Stef Walter <stefw@redhat.com> | 2014-04-19 13:08:20 +0200 |
---|---|---|
committer | Stef Walter <stefw@redhat.com> | 2014-04-19 22:29:49 +0200 |
commit | c4537dfccbccf8aea2873f2a3a2459b5a6cc8b01 (patch) | |
tree | 0bb275ff59f802145fba066420a1f8cea471551a | |
parent | 600981f4b3c25ade07ec886b7aa53dd169a5b133 (diff) |
asn1: More clear dump display whether something has value/not
When dumping parsed DER/ASN.1 tree, print an asterisk if something
has a value, and a dot if it was parsed, but no value.
-rw-r--r-- | egg/egg-asn1x.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/egg/egg-asn1x.c b/egg/egg-asn1x.c index 566a47a..4b24e8b 100644 --- a/egg/egg-asn1x.c +++ b/egg/egg-asn1x.c @@ -4546,6 +4546,7 @@ traverse_and_dump (GNode *node, gpointer unused) guint i, depth; GString *output; gchar *string; + const gchar *suff; Anode *an; GList *l; @@ -4559,8 +4560,13 @@ traverse_and_dump (GNode *node, gpointer unused) dump_append_flags (output, anode_def_flags (node)); string = g_utf8_casefold (output->str, output->len - 1); g_string_free (output, TRUE); + suff = ""; + if (an->value) + suff = " *"; + else if (an->parsed) + suff = " ."; g_print ("+ %s: %s [%s]%s\n", anode_def_name (node), anode_def_value (node), - string, an->parsed || an->value ? " *" : ""); + string, suff); g_free (string); /* Print out all the options */ |