[PATCH 2/16] DocBook: allow preprocessor directives between kernel-doc and function

From: Martin Waitz
Date: Thu Mar 03 2005 - 06:14:50 EST


DocBook: allow preprocessor directives between kernel-doc and function
Signed-off-by: Martin Waitz <tali@xxxxxxxxxxxxxx>


# 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 tali@xxxxxxxxxxxxxx 1.2027
# DocBook: allow preprocessor directives between kernel-doc and function
#
# Signed-off-by: Martin Waitz <tali@xxxxxxxxxxxxxx>
# --------------------------------------------
#
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 =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
$prototype =~ s@^\s+@@gos; # strip leading spaces
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/