diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-05-02 18:00:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:51:57 -0500 |
commit | 0bc6c5a7b159bdd4678a378819b9346523729033 (patch) | |
tree | e3221d107fcccdf4f2ce17a8fd2d6bb5388ab01a /source4/pidl/lib/Parse/Pidl/Samba4 | |
parent | 8f786106a5d49133482a0c73b4e432666a2e4bd4 (diff) | |
download | samba-0bc6c5a7b159bdd4678a378819b9346523729033.tar.gz samba-0bc6c5a7b159bdd4678a378819b9346523729033.tar.bz2 samba-0bc6c5a7b159bdd4678a378819b9346523729033.zip |
r22640: - generate nicer output
- fix compiler warning about unused ';'
metze
(This used to be commit 715060187f482486f00e2d6b2cd62d2a0e215a2f)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm index 2eddf22b05..f43c042da9 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -43,7 +43,7 @@ sub HeaderProperties($$) } if ($ret) { - pidl "/* [" . substr($ret, 0, -1) . "] */"; + pidl " /* [" . substr($ret, 0, -1) . "] */"; } } @@ -108,10 +108,12 @@ sub HeaderStruct($$) pidl tabs()."char _empty_;\n"; } $tab_depth--; - pidl tabs()."}"; + + pidl "};"; if (defined $struct->{PROPERTIES}) { HeaderProperties($struct->{PROPERTIES}, []); } + pidl "\n\n"; } ##################################################################### @@ -132,10 +134,10 @@ sub HeaderEnum($$) } pidl "\n"; $tab_depth--; - pidl "}\n"; + pidl "};\n"; pidl "#else\n"; my $count = 0; - pidl "enum $name { __donnot_use_enum_$name=0x7FFFFFFF}\n"; + pidl "enum $name { __donnot_use_enum_$name=0x7FFFFFFF};\n"; my $with_val = 0; my $without_val = 0; foreach my $e (@{$enum->{ELEMENTS}}) { @@ -191,11 +193,12 @@ sub HeaderUnion($$) } } $tab_depth--; - pidl "}"; + pidl "};"; if (defined $union->{PROPERTIES}) { HeaderProperties($union->{PROPERTIES}, []); } + pidl "\n\n"; } ##################################################################### @@ -297,7 +300,7 @@ sub HeaderFunction($) HeaderFunctionInOut($fn, "in"); HeaderFunctionInOut($fn, "inout"); $tab_depth--; - pidl tabs()."} in;\n\n"; + pidl tabs()."} in;\n"; $needed++; } @@ -311,7 +314,7 @@ sub HeaderFunction($) pidl tabs().mapTypeName($fn->{RETURN_TYPE}) . " result;\n"; } $tab_depth--; - pidl tabs()."} out;\n\n"; + pidl tabs()."} out;\n"; $needed++; } @@ -362,11 +365,6 @@ sub HeaderInterface($) HeaderUnion($d, $d->{NAME}) if ($d->{TYPE} eq "UNION"); HeaderEnum($d, $d->{NAME}) if ($d->{TYPE} eq "ENUM"); HeaderBitmap($d, $d->{NAME}) if ($d->{TYPE} eq "BITMAP"); - pidl ";\n\n" if ($d->{TYPE} eq "BITMAP" or - $d->{TYPE} eq "STRUCT" or - $d->{TYPE} eq "TYPEDEF" or - $d->{TYPE} eq "UNION" or - $d->{TYPE} eq "ENUM"); } foreach my $d (@{$interface->{DATA}}) { |