aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2006-07-22 11:29:17 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2006-07-22 11:29:17 +0000
commit7a8f737dd1e8709f96d52d0f2e3369c51ef15c06 (patch)
treedda9a2494011e907fa64099d4d6e607a6bb21de1 /print.c
parentb7c2c4bdd94e43dadb46646286212fc51df9c174 (diff)
print generated items in brackets [], just as we do it on the screen
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18783 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'print.c')
-rw-r--r--print.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/print.c b/print.c
index 4c1f019aec..f0fdff8722 100644
--- a/print.c
+++ b/print.c
@@ -154,11 +154,19 @@ void proto_tree_print_node(proto_node *node, gpointer data)
proto_item_fill_label(fi, label_str);
}
+ if(PROTO_ITEM_IS_GENERATED(node)) {
+ label_ptr = g_strdup_printf("[%s]", label_ptr);
+ }
+
if (!print_line(pdata->stream, pdata->level, label_ptr)) {
pdata->success = FALSE;
return;
}
+ if(PROTO_ITEM_IS_GENERATED(node)) {
+ g_free(label_ptr);
+ }
+
/* If it's uninterpreted data, dump it (unless our caller will
be printing the entire packet in hex). */
if (fi->hfinfo->id == proto_data && pdata->print_hex_for_data) {