From: Ilya Dryomov Date: Fri, 26 Feb 2010 21:05:47 +0000 (-0800) Subject: kernel-doc: track line numbers for each file separately X-Git-Tag: v2.6.34-rc1~273 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;ds=sidebyside;h=a9e7314b7940cee00b80995b360dbc06f995cc6e;p=cascardo%2Flinux.git 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 Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds --- 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($) { return; } + $. = 1; + $section_counter = 0; while () { if ($state == 0) {