From 6f3c968e64ef5677759dafcc88092d3db2b4c6e9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Feb 2007 20:35:56 +0000 Subject: r21567: Add some more wireshark tests. (This used to be commit 40e2956058fe4aaebf3f7269bce90339d7faf24f) --- source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'source4/pidl/lib/Parse/Pidl/Wireshark') diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index db7d2cf241..0374b60132 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -18,7 +18,7 @@ package Parse::Pidl::Wireshark::NDR; use Exporter; @ISA = qw(Exporter); -@EXPORT_OK = qw(field2name @ett %res PrintIdl StripPrefixes %hf_used RegisterInterfaceHandoff $conformance register_hf_field CheckUsed); +@EXPORT_OK = qw(field2name @ett %res PrintIdl StripPrefixes %hf_used RegisterInterfaceHandoff $conformance register_hf_field CheckUsed ProcessImport ProcessInclude find_type DumpEttList DumpEttDeclaration DumpHfList DumpHfDeclaration DumpFunctionTable); use strict; use Parse::Pidl qw(error warning); @@ -671,7 +671,7 @@ sub RegisterInterface($) indent; $res{code}.=DumpHfList()."\n"; - $res{code}.="\n".DumpEttList()."\n"; + $res{code}.="\n".DumpEttList(@ett)."\n"; if (defined($x->{UUID})) { # These can be changed to non-pidl_code names if the old dissectors @@ -730,8 +730,9 @@ sub ProcessInclude { my @includes = @_; foreach (@includes) { - pidl_hdr "#include \"$_\"\n"; + pidl_hdr "#include \"$_\""; } + pidl_hdr ""; } sub ProcessImport @@ -741,8 +742,9 @@ sub ProcessImport next if($_ eq "security"); s/\.idl\"$//; s/^\"//; - pidl_hdr "#include \"packet-dcerpc-$_\.h\"\n"; + pidl_hdr "#include \"packet-dcerpc-$_\.h\""; } + pidl_hdr ""; } sub ProcessInterface($) @@ -924,7 +926,7 @@ sub Parse($$$$) ProcessInclude(@{$_->{PATHS}}) if ($_->{TYPE} eq "INCLUDE"); } - $res{ett} = DumpEttDeclaration(); + $res{ett} = DumpEttDeclaration(@ett); $res{hf} = DumpHfDeclaration(); my $parser = $notice; @@ -956,8 +958,9 @@ sub register_ett($) push (@ett, $name); } -sub DumpEttList() +sub DumpEttList { + my @ett = @_; my $res = "\tstatic gint *ett[] = {\n"; foreach (@ett) { $res .= "\t\t&$_,\n"; @@ -966,8 +969,9 @@ sub DumpEttList() return "$res\t};\n"; } -sub DumpEttDeclaration() +sub DumpEttDeclaration { + my @ett = @_; my $res = "\n/* Ett declarations */\n"; foreach (@ett) { $res .= "static gint $_ = -1;\n"; -- cgit