[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4B8837AB.1090204@oracle.com>
Date: Fri, 26 Feb 2010 13:05:47 -0800
From: Randy Dunlap <randy.dunlap@...cle.com>
To: lkml <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
CC: lya Dryomov <idryomov@...il.com>
Subject: [PATCH 1/2] scripts/kernel-doc: track line numbers for each file
separately
From: Ilya Dryomov <idryomov@...il.com>
Subject: kernel-doc: track line numbers for each file separately
The problem is that $. keeps track of the current record number (which
is line number by default). But if you pass it multiple files, it does
not wrap at the end of file, and therefore contains the *total* number
of processed lines.
I suppose we can fix line numbering by introducing a simple assignment
$. = 1
before processing every new file.
Signed-off-by: Ilya Dryomov <idryomov@...il.com>
Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
scripts/kernel-doc | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.33-rc3-git5.orig/scripts/kernel-doc
+++ linux-2.6.33-rc3-git5/scripts/kernel-doc
@@ -2023,6 +2023,8 @@ sub process_file($) {
return;
}
+ $. = 1;
+
$section_counter = 0;
while (<IN>) {
if ($state == 0) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists