summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-08 21:59:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:37:52 -0500
commitd9cdaccaa7049c773e876047320839dd6d2d9459 (patch)
tree0d55d40beb24e22cdd6822bf0218aad7f928a6eb /source4
parent3e941e6a92e273dc8d5bca982870b3a91cbcd521 (diff)
downloadsamba-d9cdaccaa7049c773e876047320839dd6d2d9459.tar.gz
samba-d9cdaccaa7049c773e876047320839dd6d2d9459.tar.bz2
samba-d9cdaccaa7049c773e876047320839dd6d2d9459.zip
r10093: Fix the HF_FIELD conformance file command
(This used to be commit 0c0a4b55cff4079276073060dae91ff0c19af42f)
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/README5
-rw-r--r--source4/pidl/TODO3
-rw-r--r--source4/pidl/idl.yp2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm9
-rw-r--r--source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm19
-rw-r--r--source4/pidl/lib/Parse/Pidl/IDL.pm2
6 files changed, 21 insertions, 19 deletions
diff --git a/source4/pidl/README b/source4/pidl/README
index 8c709e5ecd..7458344761 100644
--- a/source4/pidl/README
+++ b/source4/pidl/README
@@ -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
diff --git a/source4/pidl/TODO b/source4/pidl/TODO
index f341dba846..1f5875aebe 100644
--- a/source4/pidl/TODO
+++ b/source4/pidl/TODO
@@ -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
diff --git a/source4/pidl/idl.yp b/source4/pidl/idl.yp
index ce8100722b..b703d4fa72 100644
--- a/source4/pidl/idl.yp
+++ b/source4/pidl/idl.yp
@@ -422,7 +422,7 @@ sub parse_idl($$)
undef $/;
my $cpp = $ENV{CPP};
if (! defined $cpp) {
- $cpp = "CPP";
+ $cpp = "cpp";
}
my $data = `$cpp -D__PIDL__ -xc $filename`;
$/ = $saved_delim;
diff --git a/source4/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm b/source4/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm
index 8a4782073d..d0a3047939 100644
--- a/source4/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm
+++ b/source4/pidl/lib/Parse/Pidl/Ethereal/Conformance.pm
@@ -29,7 +29,6 @@ sub handle_type($$$$$$$$)
};
}
-
sub handle_hf_rename($$$)
{
my ($data,$old,$new) = @_;
@@ -45,11 +44,11 @@ sub handle_param_value($$$)
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,
diff --git a/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm b/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm
index ee774d1898..315c31a6f6 100644
--- a/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Ethereal/NDR.pm
@@ -16,10 +16,9 @@ use Parse::Pidl::Dump qw(DumpTypedef DumpFunction);
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 @@ sub Initialize($)
{
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 @@ sub Parse($$$$)
$tabs = "";
%res = (code=>"",def=>"",hdr=>"");
- %hf = ();
@ett = ();
my $notice =
@@ -814,13 +815,13 @@ sub register_hf_field($$$$$$$$)
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 @@ sub DumpHfDeclaration()
$res = "\n/* Header field declarations */\n";
- foreach (keys %hf)
+ foreach (keys %{$conformance->{header_fields}})
{
$res .= "static gint $_ = -1;\n";
}
@@ -846,10 +847,10 @@ sub DumpHfList()
{
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 }},
";
}
diff --git a/source4/pidl/lib/Parse/Pidl/IDL.pm b/source4/pidl/lib/Parse/Pidl/IDL.pm
index dd667cb9eb..1aa4426cd6 100644
--- a/source4/pidl/lib/Parse/Pidl/IDL.pm
+++ b/source4/pidl/lib/Parse/Pidl/IDL.pm
@@ -2775,7 +2775,7 @@ sub parse_idl($$)
undef $/;
my $cpp = $ENV{CPP};
if (! defined $cpp) {
- $cpp = "CPP";
+ $cpp = "cpp";
}
my $data = `$cpp -D__PIDL__ -xc $filename`;
$/ = $saved_delim;