From 576b1c84fb9c5de642b549d769764488436f2c5f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Jun 2007 21:48:57 +0000 Subject: r23542: Include function documentation in prototype headers. (This used to be commit 03eef5f337446f04239e0b2f840213f0aa7d6ea1) --- source4/script/mkproto.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source4/script/mkproto.pl') 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 = ) { 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"); -- cgit