summaryrefslogtreecommitdiff
path: root/source4/script/mkproto.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-06-18 21:48:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:26 -0500
commit576b1c84fb9c5de642b549d769764488436f2c5f (patch)
tree02029bf1714326324770afcaebb795f0b866d512 /source4/script/mkproto.pl
parent9ed016b692f8fc4f35362dffd25e00e8f72d9c24 (diff)
downloadsamba-576b1c84fb9c5de642b549d769764488436f2c5f.tar.gz
samba-576b1c84fb9c5de642b549d769764488436f2c5f.tar.bz2
samba-576b1c84fb9c5de642b549d769764488436f2c5f.zip
r23542: Include function documentation in prototype headers.
(This used to be commit 03eef5f337446f04239e0b2f840213f0aa7d6ea1)
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");