diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-06-18 21:48:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:53:26 -0500 |
commit | 576b1c84fb9c5de642b549d769764488436f2c5f (patch) | |
tree | 02029bf1714326324770afcaebb795f0b866d512 /source4/script | |
parent | 9ed016b692f8fc4f35362dffd25e00e8f72d9c24 (diff) | |
download | samba-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')
-rwxr-xr-x | source4/script/mkproto.pl | 16 |
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"); |