diff options
Diffstat (limited to 'source4/script')
-rwxr-xr-x | source4/script/mkproto.pl | 12 |
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"; |