pidl/ws: whitespace cleanup
authorAurelien Aptel <aaptel@suse.com>
Tue, 9 Feb 2016 17:54:39 +0000 (18:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 20 Jun 2016 10:08:21 +0000 (12:08 +0200)
Imported from the WS repo.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
pidl/lib/Parse/Pidl/Samba4/Python.pm
pidl/lib/Parse/Pidl/Wireshark/NDR.pm

index f43e4d624433e218aab63fdd60c4953b9f015792..3c84b6e4adb7c3f34476431aa4c0b37a98bac8ba 100644 (file)
@@ -1027,21 +1027,21 @@ sub ConvertObjectFromPythonData($$$$$$;$)
        my $ctype_alias = "";
        my $uint_max = "";
        if ($actual_ctype->{TYPE} eq "ENUM") {
-               # Importantly, ENUM values are unsigned in pidl, and
-               # typically map to uint32
-               $ctype_alias = enum_type_fn($actual_ctype);
+               # Importantly, ENUM values are unsigned in pidl, and
+               # typically map to uint32
+               $ctype_alias = enum_type_fn($actual_ctype);
        } elsif ($actual_ctype->{TYPE} eq "BITMAP") {
-               $ctype_alias = bitmap_type_fn($actual_ctype);
+               $ctype_alias = bitmap_type_fn($actual_ctype);
        } elsif ($actual_ctype->{TYPE} eq "SCALAR") {
-               $ctype_alias = expandAlias($actual_ctype->{NAME});
+               $ctype_alias = expandAlias($actual_ctype->{NAME});
        }
 
        # This is the unsigned Python Integer -> C integer validation
-       # case.  The signed case is below.
+       # case.  The signed case is below.
        if ($ctype_alias  =~ /^(uint[0-9]*|hyper|udlong|udlongr
-                                |NTTIME_hyper|NTTIME|NTTIME_1sec
-                                |uid_t|gid_t)$/x) {
-               $self->pidl("{");
+                               |NTTIME_hyper|NTTIME|NTTIME_1sec
+                               |uid_t|gid_t)$/x) {
+               $self->pidl("{");
                $self->indent;
                $self->pidl("const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof($target));");
                $self->pidl("if (PyLong_Check($cvar)) {");
@@ -1092,7 +1092,7 @@ sub ConvertObjectFromPythonData($$$$$$;$)
        # above, so while it looks like a duplicate, it is not
        # actually a duplicate.
        if ($ctype_alias  =~ /^(dlong|char|int[0-9]*|time_t)$/x) {
-               $self->pidl("{");
+               $self->pidl("{");
                $self->indent;
                $self->pidl("const long long int_max = ndr_sizeof2intmax(sizeof($target));");
                $self->pidl("const long long int_min = -int_max - 1;");
index fee7f0654d10ae18d1fb3ba0b1cd2ec86e93b317..47947dff57b0e70be47cb7a81b64ea21855c7f82 100644 (file)
@@ -1143,12 +1143,12 @@ sub Parse($$$$$)
        my $h_basename = basename($h_filename);
 
        $self->{res}->{headers} .= "#include \"$h_basename\"\n";
-
        $self->pidl_code("");
 
        if (defined($self->{conformance}->{ett})) {
                register_ett($self,$_) foreach(@{$self->{conformance}->{ett}})
        }
+
        # Wireshark protocol registration
 
        foreach (@$ndr) {
@@ -1299,7 +1299,7 @@ sub DumpHfList($)
        foreach (sort {$a->{INDEX} cmp $b->{INDEX}} values %{$self->{conformance}->{header_fields}})
        {
                $res .= "\t{ &$_->{INDEX},
-         { ".make_str($_->{NAME}).", ".make_str($_->{FILTER}).", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALSSTRING}, $_->{MASK}, ".make_str_or_null($_->{BLURB}).", HFILL }},
+               { ".make_str($_->{NAME}).", ".make_str($_->{FILTER}).", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALSSTRING}, $_->{MASK}, ".make_str_or_null($_->{BLURB}).", HFILL }},
 ";
        }