From: Giuseppe Di Natale Date: Thu, 26 Jan 2017 20:40:22 +0000 (-0800) Subject: OpenZFS 7348 - cstyle can't handle ellipsis on continuation line X-Git-Tag: zfs-0.7.0-rc4~223 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d96e5439541bce02c44efa56800c022ec9b43aa7;p=zfs 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 --- 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/) {