From d96e5439541bce02c44efa56800c022ec9b43aa7 Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Thu, 26 Jan 2017 12:40:22 -0800 Subject: [PATCH] OpenZFS 7348 - cstyle can't handle ellipsis on continuation line Authored by: Hans Rosenfeld Reviewed by: Yuri Pankov Reviewed by: Jason King Reviewed by: Igor Kozhukhov Reviewed by: Robert Mustacchi Approved by: Dan McDonald Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Ported-by: Giuseppe Di Natale OpenZFS-issue: https://www.illumos.org/issues/7348 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c667d21 Closes #5655 --- scripts/cstyle.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cstyle.pl b/scripts/cstyle.pl index f8dac9c2d..73c708c0b 100755 --- a/scripts/cstyle.pl +++ b/scripts/cstyle.pl @@ -19,6 +19,7 @@ # # CDDL HEADER END # +# Copyright 2016 Nexenta Systems, Inc. # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. @@ -399,7 +400,7 @@ line: while (<$filehandle>) { $prev = $line; next line; } - if ($in_function_header && ! /^ ./ ) { + if ($in_function_header && ! /^ (\w|\.)/ ) { if (/^{}$/ # empty functions || /;/ #run function with multiline arguments || /#/ #preprocessor commands @@ -507,7 +508,7 @@ line: while (<$filehandle>) { err("spaces instead of tabs"); } if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ && - (!/^ \w/ || $in_function != 0)) { + (!/^ (\w|\.)/ || $in_function != 0)) { err("indent by spaces instead of tabs"); } if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) { -- 2.40.0