summaryrefslogtreecommitdiff
path: root/source4/script/mkproto.pl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script/mkproto.pl')
-rwxr-xr-xsource4/script/mkproto.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index ebdd803991..827304b650 100755
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -158,10 +158,24 @@ sub process_file($$$)
$private_file->("\n/* The following definitions come from $filename */\n\n");
+ my $comment = undef;
+ my $incomment = 0;
while (my $line = <FH>) {
my $target = \&private;
my $is_public = 0;
+ if ($line =~ /^\/\*\*/) {
+ $comment = "";
+ $incomment = 1;
+ }
+
+ if ($incomment) {
+ $comment .= $line;
+ if ($line =~ /\*\//) {
+ $incomment = 0;
+ }
+ }
+
# these are ordered for maximum speed
next if ($line =~ /^\s/);
@@ -189,6 +203,8 @@ sub process_file($$$)
next if ($line =~ /^int\s*main/);
+ $target->("\n$comment") if (defined($comment)); $comment = undef;
+
if ( $line =~ /\(.*\)\s*$/o ) {
chomp $line;
$target->("$line;\n");