[PATCH 2/4] stop #define foo(c) ... matching (c)

Philip Hands phil at hands.com
Mon Jan 14 11:49:14 UTC 2013


---
 scripts/licensecheck.pl |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 6eef989..9a66e30 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -333,6 +333,11 @@ sub parse_copyright {
 	|and|or                 # Part of a sentence
 	|(holder|owner)s?.*contributors?  # Part of a sentence
 	)\b';
+    my $copyright_predisindicator_regex = '(
+    ^[#]define\s+\w+\(c\)    # #define foo(c) -- not copyright
+	)';
+
+    if ( ! m%$copyright_predisindicator_regex%ix) {
 
     if (m%$copyright_indicator_regex(?::\s*|\s+)(\S.*)$%ix) {
 	$match = $1;
-- 
1.7.10.4




More information about the devscripts-devel mailing list