r5669: Couple of minor clearifications, simplifications.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 6 Mar 2005 12:33:44 +0000 (12:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:10:58 +0000 (13:10 -0500)
source/build/pidl/README
source/build/pidl/ndr_client.pm [moved from source/build/pidl/client.pm with 98% similarity]
source/build/pidl/ndr_header.pm
source/build/pidl/pidl.pl

index 4b675ce2100f32897d15ee7e5e83c9a2eea9ef0a..e0878888408d16a5ee04cef286e45046afe606fc 100644 (file)
@@ -18,12 +18,12 @@ dump.pm - Converts the parse tree back to an IDL file
 validator.pm  - Validates the parse tree
 
 -- DCE/RPC+NDR --
-client.pm - Generates client call functions in C
+ndr_client.pm - Generates client call functions in C using the NDR parser
 eparser.pm - Generates a parser for the ethereal network sniffer by 
                                applying regexes to the output of parser.pm
 swig.pm        - Generates SWIG interface files (.i)
-header.pm - Generates a header file with structures
-parser.pm - Generates pull/push functions for parsing 
+ndr_header.pm - Generates a header file with structures
+ndr.pm - Generates pull/push functions for parsing NDR
 server.pm - Generates server side implementation in C
 template.pm - Generates stubs in C for server implementation
 
similarity index 98%
rename from source/build/pidl/client.pm
rename to source/build/pidl/ndr_client.pm
index 1be895208fea713de2d70bf7ecc0cd9a6f7950ed..e5d4cc156960abfda9e3afe56bc6066677409a9f 100644 (file)
@@ -3,7 +3,7 @@
 # Copyright tridge@samba.org 2003
 # released under the GNU GPL
 
-package IdlClient;
+package NdrClient;
 
 use strict;
 
index c928ee1db31c6d014176ce15389e540df381422e..3e673466e0581ac0e63fe491613a81260612a7f7 100644 (file)
@@ -61,15 +61,12 @@ sub HeaderElement($)
     HeaderType($element, $element->{TYPE}, "");
     pidl " ";
     if ($element->{POINTERS} && $element->{TYPE} ne "string") {
-           my($n) = $element->{POINTERS};
-           for (my($i)=$n; $i > 0; $i--) {
+           for (my($i)=$element->{POINTERS}; $i > 0; $i--) {
                    pidl "*";
            }
-    }
-    if (defined $element->{ARRAY_LEN} && 
-       !util::is_constant($element->{ARRAY_LEN}) &&
-       !$element->{POINTERS}) {
-           # conformant arrays are ugly! I choose to implement them with
+    } elsif (NdrParser::is_surrounding_array($element) || 
+               defined $element->{ARRAY_LEN} && !util::is_constant($element->{ARRAY_LEN})) {
+           # surrounding arrays are ugly! I choose to implement them with
            # pointers instead of the [1] method
            pidl "*";
     }
index f7b213dcb049439576a682ba9d67275d6fff71bf..6bbb2ec78c946df75f135a30a5df00071db8f616 100755 (executable)
@@ -15,10 +15,10 @@ use Getopt::Long;
 use File::Basename;
 use idl;
 use dump;
+use ndr_client;
 use ndr_header;
 use ndr;
 use server;
-use client;
 use dcom_proxy;
 use dcom_stub;
 use com_header;
@@ -75,9 +75,9 @@ sub ShowHelp()
          --output OUTNAME      put output in OUTNAME.*
          --parse               parse a idl file to a .pidl file
          --dump                dump a pidl file back to idl
-         --header              create a C header file
+         --header              create a C NDR header file
          --parser              create a C NDR parser
-         --client              create a C client
+         --client              create a C NDR client
          --server              create server boilerplate
          --template            print a template for a pipe
          --eparser             create an ethereal parser
@@ -213,7 +213,7 @@ sub process_file($)
                $res .= "#include \"$h_filename\"\n\n";
 
                foreach my $x (@{$pidl}) {
-                       $res .= IdlClient::ParseInterface($x);
+                       $res .= NdrClient::ParseInterface($x);
                }
 
                util::FileSave($client, $res);