Commit a9e7314b authored by Ilya Dryomov's avatar Ilya Dryomov Committed by Linus Torvalds

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: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 06a79b82
...@@ -2023,6 +2023,8 @@ sub process_file($) { ...@@ -2023,6 +2023,8 @@ sub process_file($) {
return; return;
} }
$. = 1;
$section_counter = 0; $section_counter = 0;
while (<IN>) { while (<IN>) {
if ($state == 0) { if ($state == 0) {
......
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