From 65a9f77d3f0e0dc40d5b9dfc851559ec93a08d87 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 26 Jan 2005 06:51:39 +0000 Subject: r5009: Put bitmaps in their own subtree. (This used to be commit 8ca1e3aa3b5007f9da3e951e15e0380ae170a1cf) --- source4/build/pidl/eparser.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/build') diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm index 8075e42cb9..ab8904ab9d 100644 --- a/source4/build/pidl/eparser.pm +++ b/source4/build/pidl/eparser.pm @@ -319,6 +319,8 @@ sub NeededTypedef($) 'bitmask' => "$2" }; } + + $needed{"ett_$t->{NAME}"} = 1; } } @@ -645,10 +647,13 @@ sub RewriteC($$$) pidl $_; if (defined($bitmaps{$cur_fn})) { + pidl "\t{\n\t\tproto_tree *subtree = NULL;\n\n"; + pidl "\t\tif (tree->proto_tree)\n\t\t\tsubtree = proto_item_add_subtree(tree->proto_tree->last_child, ett_$cur_fn);\n\n"; foreach my $e (@{$bitmaps{$cur_fn}->{DATA}{ELEMENTS}}) { $e =~ /^(.*?) \( (.*?) \)$/; - pidl "\tproto_tree_add_boolean(tree->proto_tree, hf_${cur_fn}_$1, ndr->tvb, ndr->offset - sizeof(v), sizeof(v), v);\n"; + pidl "\t\tproto_tree_add_boolean(subtree, hf_${cur_fn}_$1, ndr->tvb, ndr->offset - sizeof(v), sizeof(v), v);\n"; } + pidl "\t}\n"; } next; -- cgit