summaryrefslogtreecommitdiffstats
path: root/source4/build/pidl/tables.pl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/pidl/tables.pl')
-rwxr-xr-xsource4/build/pidl/tables.pl22
1 files changed, 18 insertions, 4 deletions
diff --git a/source4/build/pidl/tables.pl b/source4/build/pidl/tables.pl
index 5f760d4403..8d43dff146 100755
--- a/source4/build/pidl/tables.pl
+++ b/source4/build/pidl/tables.pl
@@ -43,17 +43,24 @@ if ($opt_help) {
###################################
+# add include lines to tables.c
+sub process_include($)
+{
+ my $name = shift;
+ print TABLEC "#include \"$name\"\n";
+}
+
+###################################
# extract table entries from 1 file
sub process_file($)
{
my $filename = shift;
open(FILE, $filename) || die "unable to open $filename\n";
- print TABLEH "#include \"$filename\"\n";
-
while (my $line = <FILE>) {
- if ($line =~ /extern const struct dcerpc_interface_table (\w+);/) {
- print TABLEC "\t&$1,\n";
+ if ($line =~ /extern const struct dcerpc_interface_table dcerpc_table_(\w+);/) {
+ print TABLEC "\t&dcerpc_table_$1,\n";
+ print TABLEH "NTSTATUS dcerpc_$1\_init(void);\n";
}
}
@@ -70,7 +77,14 @@ open(TABLEC, ">$opt_output.c") || die "failed to open $opt_output.c\n";
print TABLEC "
#include \"includes.h\"
+";
+foreach my $filename (@ARGV) {
+ process_include($filename);
+}
+
+
+print TABLEC "
/*
generated by pidl IDL table generator
*/