From: Daniel Stenberg Date: Mon, 4 Dec 2023 09:50:42 +0000 (+0100) Subject: checksrc.pl: support #line instructions X-Git-Tag: curl-8_5_0~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c4fba8cf5fb6026e36720281fbd6c461dc21dfd;p=thirdparty%2Fcurl.git checksrc.pl: support #line instructions makes it identify the correct source file and line --- diff --git a/scripts/checksrc.pl b/scripts/checksrc.pl index 34664585c5..76f4660816 100755 --- a/scripts/checksrc.pl +++ b/scripts/checksrc.pl @@ -403,6 +403,13 @@ sub scanfile { checksrc($cmd, $line, $file, $l) } + if($l =~ /^#line (\d+) \"([^\"]*)\"/) { + # a #line instruction + $file = $2; + $line = $1; + next; + } + # check for a copyright statement and save the years if($l =~ /\* +copyright .* (\d\d\d\d|)/i) { my $count = 0;