3 ###################################################
4 # package to produce a table of all idl parsers
5 # Copyright tridge@samba.org 2003
6 # Copyright jelmer@samba.org 2005
7 # released under the GNU GPL
17 #########################################
22 perl NDR interface table generator
23 Copyright (C) tridge\@samba.org
25 Usage: tables.pl [options] <idlfile>
33 'help|h|?' => \
$opt_help,
43 ###################################
44 # extract table entries from 1 file
48 open(FILE
, $filename) || die "unable to open $filename\n";
51 while (my $line = <FILE
>) {
52 if ($line =~ /extern const struct ndr_interface_table (\w+);/) {
54 $init_fns.="\tstatus = ndr_table_register(&$1);\n";
55 $init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
60 print "#include \"$filename\"\n";
68 /* Automatically generated by tables.pl. DO NOT EDIT */
71 #include "librpc/ndr/libndr.h"
72 #include "librpc/ndr/ndr_table.h"
75 process_file
($_) foreach (@ARGV);
79 NTSTATUS ndr_table_register_builtin_tables(void)