foreach my $d (@{$x->{DATA}}) {
if (($d->{TYPE} eq "DECLARE") or ($d->{TYPE} eq "TYPEDEF")) {
- typelist::addType($d);
if ($d->{DATA}->{TYPE} eq "STRUCT" or $d->{DATA}->{TYPE} eq "UNION") {
CheckPointerTypes($d->{DATA}, $x->{PROPERTIES}->{pointer_default});
}
use ndr;
use eparser;
use validator;
+use typelist;
use util;
use template;
use swig;
print IdlDump::Dump($pidl);
}
+ if ($opt_header || $opt_parser) {
+ typelist::LoadIdl($pidl);
+ }
+
if ($opt_header) {
my($header) = util::ChangeExtension($output, ".h");
util::FileSave($header, IdlHeader::Parse($pidl));
die("Unknown type $dt->{DATA}->{TYPE}");
}
+sub LoadIdl($)
+{
+ my $idl = shift;
+
+ foreach my $x (@{$idl}) {
+ next if $x->{TYPE} ne "INTERFACE";
+ addType($x);
+ foreach my $y (@{$x->{DATA}}) {
+ addType($y) if (
+ $y->{TYPE} eq "TYPEDEF"
+ or $y->{TYPE} eq "DECLARE");
+ }
+ }
+}
+
RegisterPrimitives();