summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-11-24 23:35:58 +0000
committerTim Potter <tpot@samba.org>2001-11-24 23:35:58 +0000
commit92ba6fc79ebecf55e77504fd2e7fa215d3c1a849 (patch)
treee960619d3d2e9a619785bf404f2609f2e5c32b81 /source4/build/pidl
parent95baaba31c3f906d10fc8d67433b4cf10fa71d1d (diff)
downloadsamba-92ba6fc79ebecf55e77504fd2e7fa215d3c1a849.tar.gz
samba-92ba6fc79ebecf55e77504fd2e7fa215d3c1a849.tar.bz2
samba-92ba6fc79ebecf55e77504fd2e7fa215d3c1a849.zip
Added --eparser to call ethereal parser generator.
(This used to be commit e1f191a9dc563648f9d151c56020e3324854f52f)
Diffstat (limited to 'source4/build/pidl')
-rwxr-xr-xsource4/build/pidl/pidl.pl13
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl
index 7ac7d5860f..6b32ade75a 100755
--- a/source4/build/pidl/pidl.pl
+++ b/source4/build/pidl/pidl.pl
@@ -13,6 +13,7 @@ use Parse::RecDescent;
use dump;
use header;
use parser;
+use eparser;
use util;
my($opt_help) = 0;
@@ -21,6 +22,7 @@ my($opt_dump) = 0;
my($opt_diff) = 0;
my($opt_header) = 0;
my($opt_parser) = 0;
+my($opt_eparser) = 0;
#####################################################################
# parse an IDL file returning a structure containing all the data
@@ -60,6 +62,7 @@ sub ShowHelp()
--dump dump a pidl file back to idl
--header create a C header file
--parser create a C parser
+ --eparser create an ethereal parser
--diff run diff on the idl and dumped output
\n";
exit(0);
@@ -72,6 +75,7 @@ GetOptions (
'dump' => \$opt_dump,
'header' => \$opt_header,
'parser' => \$opt_parser,
+ 'eparser' => \$opt_eparser,
'diff' => \$opt_diff
);
@@ -107,7 +111,14 @@ if ($opt_parser) {
my($idl) = util::LoadStructure($pidl_file);
my($parser) = util::ChangeExtension($idl_file, "c");
print "Generating $parser\n";
- util::FileSave($parser, IdlParser::Dump($idl));
+ util::FileSave($parser, IdlParser::Parse($idl));
+}
+
+if ($opt_eparser) {
+ my($idl) = util::LoadStructure($pidl_file);
+ my($parser) = util::ChangeExtension($idl_file, "c");
+ print "Generating $parser for ethereal\n";
+ util::FileSave($parser, IdlEParser::Parse($idl));
}
if ($opt_diff) {