Commit ae093336 authored by Martin Waitz's avatar Martin Waitz Committed by Linus Torvalds

[PATCH] docbook: allow preprocessor directives between kernel-doc and function

Allow preprocessor directives between kernel-doc and function
Signed-off-by: default avatarMartin Waitz <tali@admingilde.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 95500fb7
...@@ -1578,13 +1578,13 @@ sub process_state3_function($$) { ...@@ -1578,13 +1578,13 @@ sub process_state3_function($$) {
my $x = shift; my $x = shift;
my $file = shift; my $file = shift;
if ($x =~ m#\s*/\*\s+MACDOC\s*#io) { if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) {
# do nothing # do nothing
} }
elsif ($x =~ /([^\{]*)/) { elsif ($x =~ /([^\{]*)/) {
$prototype .= $1; $prototype .= $1;
} }
if (($x =~ /\{/) || ($x =~ /\#/) || ($x =~ /;/)) { if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) {
$prototype =~ s@/\*.*?\*/@@gos; # strip comments. $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
$prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
$prototype =~ s@^\s+@@gos; # strip leading spaces $prototype =~ s@^\s+@@gos; # strip leading spaces
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment