From 0a3c167f6bcf08b2204ca49831ca49eef73dcbf4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 22:51:30 +0000 Subject: r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server. (This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1) --- source4/script/mkproto.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source4/script') diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl index 479d53da32..1b2a9d355a 100755 --- a/source4/script/mkproto.pl +++ b/source4/script/mkproto.pl @@ -56,14 +56,14 @@ if (not defined($private_define) and defined($private_file)) { } if (defined($public_file)) { - open PUBLIC, ">$public_file"; + open PUBLIC, ">$public_file" or die("Can't open `$public_file': $!"); $public_fd = \*PUBLIC; } if ($private_file eq $public_file) { $private_fd = $public_fd; } elsif (defined($private_file)) { - open PRIVATE, ">$private_file"; + open PRIVATE, ">$private_file" or die("Can't open `$private_file': $!"); ; $private_fd = \*PRIVATE; } @@ -128,6 +128,10 @@ sub process_file($$$) next if ($line =~ /^\/|[;]/); + if ($line =~ s/^_PUBLIC_[\t ]//) { + $target = $public_file; + } + next unless ( $line =~ / ^void|^BOOL|^int|^struct|^char|^const|^\w+_[tT]\s|^uint|^unsigned|^long| ^NTSTATUS|^ADS_STATUS|^enum\s.*\(|^DATA_BLOB|^WERROR|^XFILE|^FILE|^DIR| @@ -142,10 +146,6 @@ sub process_file($$$) next; } - if ($line =~ s/_PUBLIC_//xo) { - $target = $public_file; - } - if ( $line =~ /\(.*\)\s*$/o ) { chomp $line; print $target "$line;\n"; -- cgit