DocBook: allow preprocessor directives between kernel-doc and function
Signed-off-by: Martin Waitz <[EMAIL PROTECTED]>


# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.2026  -> 1.2027 
#         scripts/kernel-doc    1.24    -> 1.25   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 05/01/26      [EMAIL PROTECTED]       1.2027
# DocBook: allow preprocessor directives between kernel-doc and function
# 
# Signed-off-by: Martin Waitz <[EMAIL PROTECTED]>
# --------------------------------------------
#
diff -Nru a/scripts/kernel-doc b/scripts/kernel-doc
--- a/scripts/kernel-doc        Thu Mar  3 11:41:25 2005
+++ b/scripts/kernel-doc        Thu Mar  3 11:41:25 2005
@@ -1578,13 +1578,13 @@
     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 =~ [EMAIL PROTECTED]@ @gos; # strip newlines/cr's.
        $prototype =~ [EMAIL PROTECTED]@@gos; # strip leading spaces
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to