svn commit: samba r10093 - in branches/SAMBA_4_0/source/pidl: .
lib/Parse/Pidl lib/Parse/Pidl/Ethereal
jelmer at samba.org
jelmer at samba.org
Thu Sep 8 21:59:41 GMT 2005
Author: jelmer
Date: 2005-09-08 21:59:40 +0000 (Thu, 08 Sep 2005)
New Revision: 10093
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10093
Log:
Fix the HF_FIELD conformance file command
Modified:
branches/SAMBA_4_0/source/pidl/README
branches/SAMBA_4_0/source/pidl/TODO
branches/SAMBA_4_0/source/pidl/idl.yp
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/README
===================================================================
--- branches/SAMBA_4_0/source/pidl/README 2005-09-08 20:46:56 UTC (rev 10092)
+++ branches/SAMBA_4_0/source/pidl/README 2005-09-08 21:59:40 UTC (rev 10093)
@@ -1,9 +1,10 @@
Introduction:
=============
This directory contains the source code of the pidl (Perl IDL)
-compiler.
+compiler for Samba 4.
-pidl is the main file of pidl.
+The main sources for pidl are available by Subversion on
+svn+ssh://svnanon.samba.org/samba/branches/SAMBA_4_0/source/pidl
Pidl works by building a parse tree from a .pidl file (a simple
dump of it's internal parse tree) or a .idl file
Modified: branches/SAMBA_4_0/source/pidl/TODO
===================================================================
--- branches/SAMBA_4_0/source/pidl/TODO 2005-09-08 20:46:56 UTC (rev 10092)
+++ branches/SAMBA_4_0/source/pidl/TODO 2005-09-08 21:59:40 UTC (rev 10093)
@@ -3,9 +3,10 @@
- compatibility mode for generating MIDL-readable data:
- strip out pidl-specific properties
- convert subcontext() to an array of uint8.
+ - perhaps replace subcontext() with something more generic? The argument
+ to subcontext() isn't really intuitive at the moment
- don't be so strict on array boundaries.. arrays can and will be empty when
a (regular) remote error occurs
- support nested elements
-- fix stand-alone installation
Modified: branches/SAMBA_4_0/source/pidl/idl.yp
===================================================================
--- branches/SAMBA_4_0/source/pidl/idl.yp 2005-09-08 20:46:56 UTC (rev 10092)
+++ branches/SAMBA_4_0/source/pidl/idl.yp 2005-09-08 21:59:40 UTC (rev 10093)
@@ -422,7 +422,7 @@
undef $/;
my $cpp = $ENV{CPP};
if (! defined $cpp) {
- $cpp = "CPP";
+ $cpp = "cpp";
}
my $data = `$cpp -D__PIDL__ -xc $filename`;
$/ = $saved_delim;
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm 2005-09-08 20:46:56 UTC (rev 10092)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm 2005-09-08 21:59:40 UTC (rev 10093)
@@ -29,7 +29,6 @@
};
}
-
sub handle_hf_rename($$$)
{
my ($data,$old,$new) = @_;
@@ -45,11 +44,11 @@
sub handle_hf_field($$$$$$$$$)
{
- my ($data,$hf,$title,$filter,$ft_type,$base_type,$valsstring,$mask,$blurb) = @_;
+ my ($data,$index,$name,$filter,$ft_type,$base_type,$valsstring,$mask,$blurb) = @_;
- $data->{header_fields}->{$hf} = {
- HF => $hf,
- TITLE => $title,
+ $data->{header_fields}->{$index} = {
+ INDEX => $index,
+ NAME => $name,
FILTER => $filter,
FT_TYPE => $ft_type,
BASE_TYPE => $base_type,
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-09-08 20:46:56 UTC (rev 10092)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm 2005-09-08 21:59:40 UTC (rev 10093)
@@ -16,10 +16,9 @@
use Parse::Pidl::Ethereal::Conformance qw(ReadConformance);
my %types;
-my %hf;
my @ett;
-my $conformance = {imports=>{}};
+my $conformance = undef;
my %ptrtype_mappings = (
"unique" => "NDR_POINTER_UNIQUE",
@@ -671,7 +670,10 @@
{
my $cnf_file = shift;
- $conformance = {};
+ $conformance = {
+ imports => {},
+ header_fields=> {}
+ };
ReadConformance($cnf_file, $conformance) or print "Warning: No conformance file `$cnf_file'\n";
@@ -716,7 +718,6 @@
$tabs = "";
%res = (code=>"",def=>"",hdr=>"");
- %hf = ();
@ett = ();
my $notice =
@@ -814,13 +815,13 @@
return $conformance->{hf_renames}->{$index} if defined ($conformance->{hf_renames}->{$index});
- $hf{$index} = {
+ $conformance->{header_fields}->{$index} = {
INDEX => $index,
NAME => $name,
FILTER => $filter_name,
FT_TYPE => $ft_type,
BASE_TYPE => $base_type,
- VALS => $valsstring,
+ VALSSTRING => $valsstring,
MASK => $mask,
BLURB => $blurb
};
@@ -834,7 +835,7 @@
$res = "\n/* Header field declarations */\n";
- foreach (keys %hf)
+ foreach (keys %{$conformance->{header_fields}})
{
$res .= "static gint $_ = -1;\n";
}
@@ -846,10 +847,10 @@
{
my $res = "\tstatic hf_register_info hf[] = {\n";
- foreach (values %hf)
+ foreach (values %{$conformance->{header_fields}})
{
$res .= "\t{ &$_->{INDEX},
- { \"$_->{NAME}\", \"$_->{FILTER}\", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALS}, $_->{MASK}, \"$_->{BLURB}\", HFILL }},
+ { \"$_->{NAME}\", \"$_->{FILTER}\", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALSSTRING}, $_->{MASK}, \"$_->{BLURB}\", HFILL }},
";
}
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm 2005-09-08 20:46:56 UTC (rev 10092)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm 2005-09-08 21:59:40 UTC (rev 10093)
@@ -2775,7 +2775,7 @@
undef $/;
my $cpp = $ENV{CPP};
if (! defined $cpp) {
- $cpp = "CPP";
+ $cpp = "cpp";
}
my $data = `$cpp -D__PIDL__ -xc $filename`;
$/ = $saved_delim;
More information about the samba-cvs
mailing list