Commit 2d7010fe authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] trivial: scripts_kernel-doc should strip comments inside structs'

From: Rusty Russell <rusty@rustcorp.com.au>

From:  <adobriyan@mail.ru>

  Long block comment before declaration moves it out of page in pdfs.

  Alexey

  $ ./linux-2.6.6-rc2/scripts/kernel-doc.orig -text test.c
  struct stuff:
  struct stuff {
          int a;
          /** comment here*/char b;
  };
  Members:
  a
           aaaa
  b
           bbbbb
  Description:
  stuff

  $ ./linux-2.6.6-rc2/scripts/kernel-doc -text test.c
  struct stuff:
  struct stuff {
          int a;
          char b;
  };
  Members:
  a
           aaaa
  b
           bbbbb
  Description:
  stuff
parent d6e56fb2
...@@ -1304,6 +1304,8 @@ sub create_parameterlist($$$) { ...@@ -1304,6 +1304,8 @@ sub create_parameterlist($$$) {
} }
foreach my $arg (split($splitter, $args)) { foreach my $arg (split($splitter, $args)) {
# strip comments
$arg =~ s/\/\*.*\*\///;
# strip leading/trailing spaces # strip leading/trailing spaces
$arg =~ s/^\s*//; $arg =~ s/^\s*//;
$arg =~ s/\s*$//; $arg =~ s/\s*$//;
......
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