Author: tpot Date: 2005-08-25 11:05:49 +0000 (Thu, 25 Aug 2005) New Revision: 9611
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9611 Log: Reset global variables (hf and ett lists) for each parser run. This avoids building up buckets of unecessary definitions from other parsers. Get rid of warning and FIXME for unknown data types. This is handled by the interface depends list and including the appropriate header files. Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm =================================================================== --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm 2005-08-25 08:22:42 UTC (rev 9610) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm 2005-08-25 11:05:49 UTC (rev 9611) @@ -16,6 +16,8 @@ use Parse::Pidl::Ethereal::Conformance qw(ReadConformance); my %types; +my %hf; +my @ett; my $conformance = {imports=>{}}; @@ -280,8 +282,6 @@ } elsif ($conformance->{imports}->{$l->{DATA_TYPE}}) { $call = $conformance->{imports}->{$l->{DATA_TYPE}}; } else { - warn("Unknown data type `$l->{DATA_TYPE}'"); - pidl_code "/* FIXME: Handle unknown data type $l->{DATA_TYPE} */"; if ($l->{DATA_TYPE} =~ /^([a-z]+)\_(.*)$/) { pidl_code "offset = $1_dissect_$2(tvb,offset,pinfo,tree,drep,$hf,$param);"; @@ -705,6 +705,8 @@ $tabs = ""; %res = (code=>"",def=>"",hdr=>""); + %hf = (); + @ett = (); my $notice = "/* DO NOT EDIT @@ -764,8 +766,6 @@ # ETT ############################################################################### -my @ett = (); - sub register_ett($) { my $name = shift; @@ -797,8 +797,6 @@ # HF ############################################################################### -my %hf = (); - sub register_hf_field($$$$$$$$) { my ($index,$name,$filter_name,$ft_type,$base_type,$valsstring,$mask,$blurb) = @_;
