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
14 my $opt_output = 'librpc/gen_ndr/tables.c';
18 #########################################
23 perl DCE/RPC interface table generator
24 Copyright (C) tridge\@samba.org
26 Usage: tables.pl [options] <idlfile>
29 --output OUTNAME put output in OUTNAME.*
36 'help|h|?' => \$opt_help,
37 'output=s' => \$opt_output,
47 ###################################
48 # extract table entries from 1 file
52 open(FILE, $filename) || die "unable to open $filename\n";
55 while (my $line = <FILE>) {
56 if ($line =~ /extern const struct dcerpc_interface_table (\w+);/) {
58 $init_fns.="\tlibrpc_register_interface(&$1);\n";
63 print TABLEC "#include \"$filename\"\n";
69 print "Creating $opt_output\n";
70 open(TABLEC, ">$opt_output") || die "failed to open $opt_output\n";
74 /* Automatically generated by tables.pl. DO NOT EDIT */
77 #include "librpc/rpc/dcerpc_table.h"
80 process_file($_) foreach (@ARGV);
84 NTSTATUS dcerpc_table_init(void)
86 static BOOL initialized = False;
88 if (initialized) return NT_STATUS_OK;