package COMHeader;
-use typelist;
+use pidl::typelist;
use strict;
package DCOMProxy;
-use com_header;
+use pidl::com_header;
use strict;
package EthHeader;
use strict;
-use typelist;
my($res);
my($tab_depth);
package EthParser;
use strict;
-use typelist;
-use ndr;
+use pidl::typelist;
+use pidl::ndr;
# the list of needed functions
#line 305 "build/pidl/idl.yp"
-use util;
+use pidl::util;
sub _Error {
if (exists $_[0]->YYData->{ERRMSG}) {
# start code
%%
-use util;
+use pidl::util;
sub _Error {
if (exists $_[0]->YYData->{ERRMSG}) {
package Ndr;
use strict;
-use typelist;
+use pidl::typelist;
#####################################################################
# return a table describing the order in which the parts of an element
package NdrHeader;
use strict;
-use typelist;
+use pidl::typelist;
my($res);
my($tab_depth);
package NdrParser;
use strict;
-use typelist;
-use ndr;
+use pidl::typelist;
+use pidl::ndr;
# list of known types
my %typefamily;
use strict;
use FindBin qw($RealBin);
-use lib "$RealBin";
-use lib "$RealBin/lib";
+use lib "$RealBin/..";
use Getopt::Long;
use File::Basename;
-use idl;
-use dump;
-use ndr_client;
-use ndr_header;
-use ndr_parser;
-use server;
-use dcom_proxy;
-use dcom_stub;
-use com_header;
-use odl;
-use eth_parser;
-use eth_header;
-use validator;
-use typelist;
-use util;
-use template;
-use swig;
-use compat;
+use pidl::idl;
+use pidl::dump;
+use pidl::ndr_client;
+use pidl::ndr_header;
+use pidl::ndr_parser;
+use pidl::server;
+use pidl::dcom_proxy;
+use pidl::dcom_stub;
+use pidl::com_header;
+use pidl::odl;
+use pidl::eth_parser;
+use pidl::eth_header;
+use pidl::validator;
+use pidl::typelist;
+use pidl::util;
+use pidl::template;
+use pidl::swig;
+use pidl::compat;
my($opt_help) = 0;
my($opt_parse) = 0;
# display help text
sub ShowHelp()
{
- print "
- perl IDL parser and code generator
- Copyright (C) tridge\@samba.org
-
- Usage: pidl.pl [options] <idlfile>
-
- Options:
- --help this help page
- --output=OUTNAME put output in OUTNAME.*
- --parse parse a idl file to a .pidl file
- --dump dump a pidl file back to idl
- --header[=OUTFILE] create a C NDR header file
- --parser[=OUTFILE] create a C NDR parser
- --client create a C NDR client
- --server create server boilerplate
- --template print a template for a pipe
- --eth-parser create an ethereal parser
- --eth-header create an ethereal header file
- --swig create swig wrapper file
- --diff run diff on the idl and dumped output
- --keep keep the .pidl file
- --odl accept ODL input
- --dcom-proxy create DCOM proxy (implies --odl)
- --com-header create header for COM interfaces (implies --odl)
- --warn-compat warn about incompatibility with other compilers
- --quiet be quiet
- \n";
+print "perl IDL parser and code generator
+Copyright (C) tridge\@samba.org
+
+Usage: pidl.pl [options] <idlfile>
+
+Options:
+ --help this help page
+ --output=OUTNAME put output in OUTNAME.*
+ --parse parse a idl file to a .pidl file
+ --dump dump a pidl file back to idl
+ --header[=OUTFILE] create a C NDR header file
+ --parser[=OUTFILE] create a C NDR parser
+ --client create a C NDR client
+ --server create server boilerplate
+ --template print a template for a pipe
+ --eth-parser create an ethereal parser
+ --eth-header create an ethereal header file
+ --swig create swig wrapper file
+ --diff run diff on the idl and dumped output
+ --keep keep the .pidl file
+ --odl accept ODL input
+ --dcom-proxy create DCOM proxy (implies --odl)
+ --com-header create header for COM interfaces (implies --odl)
+ --warn-compat warn about incompatibility with other compilers
+ --quiet be quiet
+\n";
exit(0);
}
package Test;
use strict;
-use util;
+use pidl::util;
use Getopt::Long;
my $cc = $ENV{CC};
use strict;
use FindBin qw($RealBin);
-use lib "$RealBin/..";
+use lib "$RealBin/../..";
use test;
my %settings = Test::GetSettings(@ARGV);
use strict;
use FindBin qw($RealBin);
-use lib "$RealBin/..";
+use lib "$RealBin/../..";
use test;
my %settings = Test::GetSettings(@ARGV);
--- /dev/null
+#!/usr/bin/perl
+# Array testing
+# (C) 2005 Jelmer Vernooij <jelmer@samba.org>
+# Published under the GNU General Public License
+use strict;
+
+use FindBin qw($RealBin);
+use lib "$RealBin/../..";
+use test;
+
+my %settings = Test::GetSettings(@ARGV);
+$settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
+$settings{'IncludeFiles'} = ['ndr_test.h'];
+$settings{'ExtraFiles'} = ['ndr_test.c'];
+
+Test::test_idl(
+ # Name
+ 'Fixed-Array',
+
+ # Settings
+ \%settings,
+
+ # IDL
+ '[public] void Test([in] uint8 x[10]);',
+
+ # C Test
+ '
+ uint8_t data[] = {1,2,3,4,5,6,7,8,9,10};
+ int i;
+ DATA_BLOB b;
+ struct ndr_pull *ndr;
+ struct Test r;
+
+ b.data = data;
+ b.length = 10;
+ ndr = ndr_pull_init_blob(&b, mem_ctx);
+
+ if (NT_STATUS_IS_ERR(ndr_pull_Test(ndr, NDR_IN, &r)))
+ return 1;
+
+ if (ndr->offset != 10)
+ return 2;
+
+ for (i = 0; i < 10; i++) {
+ if (r.in.x[i] != i+1) return 3;
+ }
+');
use strict;
use FindBin qw($RealBin);
-use lib "$RealBin/..";
+use lib "$RealBin/../..";
use test;
my %settings = Test::GetSettings(@ARGV);
use strict;
use FindBin qw($RealBin);
-use lib "$RealBin/..";
+use lib "$RealBin/../..";
use test;
my %settings = Test::GetSettings(@ARGV);
use strict;
use FindBin qw($RealBin);
-use lib "$RealBin/..";
+use lib "$RealBin/../..";
use test;
my %settings = Test::GetSettings(@ARGV);
###########################################################
package config_mk;
-use input;
+use smb_build::input;
use strict;
AC_DEFUN([_SMB_BUILD_CORE],
[
-$PERL -I$srcdir/build/smb_build <<\_SMB_ACEOF
+$PERL -I$srcdir/build <<\_SMB_ACEOF
use strict;
my %INPUT;
-use main;
+use smb_build::main;
###########################################################
### First we list all info from configure ###
### Released under the GNU GPL ###
###########################################################
-use makefile;
-use smb_build_h;
-use input;
-use config_mk;
-use output;
-use dot;
+use smb_build::makefile;
+use smb_build::smb_build_h;
+use smb_build::input;
+use smb_build::config_mk;
+use smb_build::output;
+use smb_build::dot;
use strict;
sub smb_build_main($)
./build/pidl/tests/ndr_alloc.pl
./build/pidl/tests/ndr_refptr.pl
./build/pidl/tests/ndr_string.pl
+./build/pidl/tests/ndr_array.pl