Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=51f5a0c8f63990fcb6e09ed52be348df58c9e416
Commit:     51f5a0c8f63990fcb6e09ed52be348df58c9e416
Parent:     5f8c7c98ae3888cf0a2cf320f514f75cc92f00be
Author:     Randy Dunlap <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 01:48:24 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jul 19 10:04:45 2007 -0700

    kernel-doc: strip C99 comments
    
    Strip C99-style comments from the input stream.
    /*...*/ comments are already stripped.
    C99 comments confuse the kernel-doc script.
    
    Also update some comments.
    
    Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 scripts/kernel-doc |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 08894f4..f5862ab 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -719,6 +719,7 @@ sub output_struct_xml(%) {
            # pointer-to-function
            print "  $1 $parameter) ($2);\n";
        } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
+           # bitfield
            print "  $1 $parameter$2;\n";
        } else {
            print "  ".$type." ".$parameter.";\n";
@@ -1261,6 +1262,7 @@ sub output_struct_text(%) {
            # pointer-to-function
            print "\t$1 $parameter) ($2);\n";
        } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
+           # bitfield
            print "\t$1 $parameter$2;\n";
        } else {
            print "\t".$type." ".$parameter.";\n";
@@ -1697,6 +1699,8 @@ sub process_state3_function($$) {
     my $x = shift;
     my $file = shift;
 
+    $x =~ [EMAIL PROTECTED]/\/.*$@@gos; # strip C99-style comments to end of 
line
+
     if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) {
        # do nothing
     }
@@ -1719,6 +1723,8 @@ sub process_state3_type($$) {
     $x =~ [EMAIL PROTECTED]@ @gos; # strip newlines/cr's.
     $x =~ [EMAIL PROTECTED]@@gos; # strip leading spaces
     $x =~ [EMAIL PROTECTED]@@gos; # strip trailing spaces
+    $x =~ [EMAIL PROTECTED]/\/.*$@@gos; # strip C99-style comments to end of 
line
+
     if ($x =~ /^#/) {
        # To distinguish preprocessor directive from regular declaration later.
        $x .= ";";
@@ -1802,7 +1808,7 @@ sub process_file($) {
 
                $state = 2;
                if (/-(.*)/) {
-                   # strip leading/trailing/multiple spaces #RDD:T:
+                   # strip leading/trailing/multiple spaces
                    $descr= $1;
                    $descr =~ s/^\s*//;
                    $descr =~ s/\s*$//;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to