* [PATCH 1/2] scripts/kernel-doc: track line numbers for each file separately
@ 2010-02-26 21:05 Randy Dunlap
0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2010-02-26 21:05 UTC (permalink / raw)
To: lkml, Linus Torvalds; +Cc: lya Dryomov
From: Ilya Dryomov <idryomov@gmail.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@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-26 21:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-26 21:05 [PATCH 1/2] scripts/kernel-doc: track line numbers for each file separately Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox