From ae093336be560d4c9259442303ead98662ffcfce Mon Sep 17 00:00:00 2001 From: Martin Waitz Date: Fri, 11 Mar 2005 16:36:44 -0800 Subject: [PATCH] docbook: allow preprocessor directives between kernel-doc and function Allow preprocessor directives between kernel-doc and function Signed-off-by: Martin Waitz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/kernel-doc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/kernel-doc') diff --git a/scripts/kernel-doc b/scripts/kernel-doc index a2eaf382aa48..e019ff102f7e 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1578,13 +1578,13 @@ sub process_state3_function($$) { my $x = 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 } elsif ($x =~ /([^\{]*)/) { $prototype .= $1; } - if (($x =~ /\{/) || ($x =~ /\#/) || ($x =~ /;/)) { + if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) { $prototype =~ s@/\*.*?\*/@@gos; # strip comments. $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. $prototype =~ s@^\s+@@gos; # strip leading spaces -- cgit v1.2.3