OpenZFS 7348 - cstyle can't handle ellipsis on continuation line

Authored by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/7348
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c667d21
Closes #5655
This commit is contained in:
Giuseppe Di Natale 2017-01-26 12:40:22 -08:00 committed by Brian Behlendorf
parent d4e0040781
commit d96e543954
1 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@
# #
# CDDL HEADER END # CDDL HEADER END
# #
# Copyright 2016 Nexenta Systems, Inc.
# #
# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms. # Use is subject to license terms.
@ -399,7 +400,7 @@ line: while (<$filehandle>) {
$prev = $line; $prev = $line;
next line; next line;
} }
if ($in_function_header && ! /^ ./ ) { if ($in_function_header && ! /^ (\w|\.)/ ) {
if (/^{}$/ # empty functions if (/^{}$/ # empty functions
|| /;/ #run function with multiline arguments || /;/ #run function with multiline arguments
|| /#/ #preprocessor commands || /#/ #preprocessor commands
@ -507,7 +508,7 @@ line: while (<$filehandle>) {
err("spaces instead of tabs"); err("spaces instead of tabs");
} }
if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ && if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ &&
(!/^ \w/ || $in_function != 0)) { (!/^ (\w|\.)/ || $in_function != 0)) {
err("indent by spaces instead of tabs"); err("indent by spaces instead of tabs");
} }
if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) { if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) {