summaryrefslogtreecommitdiff
path: root/source4/script/mkproto.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-27 22:51:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:51 -0500
commit0a3c167f6bcf08b2204ca49831ca49eef73dcbf4 (patch)
treeb6373b840d8b899161575abfa637f6a32e6d068f /source4/script/mkproto.pl
parent7285e102f063122ca8ef1222cc6e9a5cde176b41 (diff)
downloadsamba-0a3c167f6bcf08b2204ca49831ca49eef73dcbf4.tar.gz
samba-0a3c167f6bcf08b2204ca49831ca49eef73dcbf4.tar.bz2
samba-0a3c167f6bcf08b2204ca49831ca49eef73dcbf4.zip
r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.
(This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1)
Diffstat (limited to 'source4/script/mkproto.pl')
-rwxr-xr-xsource4/script/mkproto.pl12
1 files changed, 6 insertions, 6 deletions
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";