Hi,


I've found this list through the MAINTAINERS file. Apologies if I'm
posting to the wrong place.

I've been playing with the documentation-generating scripts lately, and
I was wondering if there's a reason why kernel-doc is so restrictive? In
particular, it doesn't allow any whitespace after the initial /** (which
I discovered after I tried in vain for about 2 hours to get my own
comments recognized :), also, it doesn't recognize any comments before
declarations. Here's a small patch to fix this.

--- kernel-doc.orig     Wed Jun 27 22:30:17 2001
+++ kernel-doc  Wed Jun 27 22:54:54 2001
@@ -18,6 +18,11 @@
 #              Functions prototyped as foo(void) same as foo()
 #              Stop eval'ing where we don't need to.
 # -- [EMAIL PROTECTED]
+
+# 27/06/2001 -  Allowed whitespace after initial "/**" and
+#               allowed comments before function declarations.
+# -- Christian Kreibich <[EMAIL PROTECTED]>
+
 # Still to do:
 #      - add perldoc documentation
 #      - Look more closely at some of the scarier bits :)
@@ -816,7 +821,7 @@
 
 $doc_special = "\@\%\$\&";
 
-$doc_start = "^/\\*\\*\$";
+$doc_start = "^/\\*\\*(\\s*)\$"; # Allow whitespace at end of comment
start.
 $doc_end = "\\*/";
 $doc_com = "\\s*\\*\\s*";
 $doc_func = $doc_com."(\\w+):?";
@@ -945,7 +950,7 @@
            elsif (/([^\{]*)/) {
                $prototype .= $1;
            }
-           if (/\{/ || /\#/) { # added for #define AK
+           if (/\{/ || /\#/ || /;/) { # added for #define AK, ';' added for
declarations.
                $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
                $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
                $prototype =~ s@^ +@@gos; # strip leading spaces

Best regards,
-- Christian.
________________________________________________________________________
                                              mailto:[EMAIL PROTECTED]

_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to