~ubuntu-branches/ubuntu/gutsy/wireshark/gutsy-security

« back to all changes in this revision

Viewing changes to tools/pidl/lib/Parse/Pidl/Samba4/EJS.pm

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2007-04-01 08:58:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070401085840-or3qhrpv8alt1bwg
Tags: 0.99.5-1
* New upstream release.
* debian/patches/09_idl2wrs.dpatch: updated to patch idl2wrs.sh.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
730
730
    $constants{$const->{NAME}} = $const->{VALUE};
731
731
}
732
732
 
 
733
sub EjsImport
 
734
{
 
735
        my @imports = @_;
 
736
        foreach (@imports) {
 
737
                s/\.idl\"$//;
 
738
                s/^\"//;
 
739
                pidl_hdr "#include \"librpc/gen_ndr/ndr_$_\_ejs\.h\"\n";
 
740
        }
 
741
}
 
742
 
733
743
#####################################################################
734
744
# parse the interface definitions
735
745
sub EjsInterface($$)
743
753
        pidl_hdr "#ifndef _HEADER_EJS_$interface->{NAME}\n";
744
754
        pidl_hdr "#define _HEADER_EJS_$interface->{NAME}\n\n";
745
755
 
746
 
        if (has_property($interface, "depends")) {
747
 
                foreach (split / /, $interface->{PROPERTIES}->{depends}) {
748
 
                        pidl_hdr "#include \"librpc/gen_ndr/ndr_$_\_ejs\.h\"\n";
749
 
                }
750
 
        }
751
 
 
752
756
        pidl_hdr "\n";
753
757
 
754
758
        foreach my $d (@{$interface->{TYPES}}) {
834
838
            ($x->{TYPE} eq "INTERFACE") && NeededInterface($x, \%needed);
835
839
    }
836
840
 
837
 
    foreach my $x (@{$ndr}) {
 
841
    foreach my $x (@$ndr) {
838
842
            ($x->{TYPE} eq "INTERFACE") && EjsInterface($x, \%needed);
 
843
                ($x->{TYPE} eq "IMPORT") && EjsImport(@{$x->{PATHS}});
839
844
    }
840
845
 
841
846
    return ($res_hdr, $res);