aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2010-02-26 16:05:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-26 20:23:49 -0500
commita9e7314b7940cee00b80995b360dbc06f995cc6e (patch)
tree88283367eb9441e6176a4fd41ecb21e378ce6604 /scripts
parent06a79b82b2a3e4bebb9a20638ca208c780e9e507 (diff)
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 241310e59cd6..8018f6a1dd04 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2023,6 +2023,8 @@ sub process_file($) {
2023 return; 2023 return;
2024 } 2024 }
2025 2025
2026 $. = 1;
2027
2026 $section_counter = 0; 2028 $section_counter = 0;
2027 while (<IN>) { 2029 while (<IN>) {
2028 if ($state == 0) { 2030 if ($state == 0) {