svn commit: r334581 - head/usr.bin/indent
Piotr Pawel Stefaniak
pstef at FreeBSD.org
Sun Jun 3 18:38:04 UTC 2018
Author: pstef
Date: Sun Jun 3 18:38:03 2018
New Revision: 334581
URL: https://svnweb.freebsd.org/changeset/base/334581
Log:
indent(1): if the token is a "[" then neither of the blocks is relevant
Modified:
head/usr.bin/indent/indent.c
Modified: head/usr.bin/indent/indent.c
==============================================================================
--- head/usr.bin/indent/indent.c Sun Jun 3 18:34:36 2018 (r334580)
+++ head/usr.bin/indent/indent.c Sun Jun 3 18:38:03 2018 (r334581)
@@ -569,13 +569,15 @@ check_type:
nitems(ps.paren_indents));
ps.p_l_follow--;
}
- if (ps.in_decl && !ps.block_init && !ps.dumped_decl_indent &&
+ if (*token == '[')
+ /* not a function pointer declaration or a function call */;
+ else if (ps.in_decl && !ps.block_init && !ps.dumped_decl_indent &&
ps.procname[0] == '\0' && ps.paren_level == 0) {
/* function pointer declarations */
indent_declaration(dec_ind, tabs_to_var);
ps.dumped_decl_indent = true;
}
- else if (ps.want_blank && *token != '[' &&
+ else if (ps.want_blank &&
((ps.last_token != ident && ps.last_token != funcname) ||
proc_calls_space ||
/* offsetof (1) is never allowed a space; sizeof (2) gets
More information about the svn-src-head
mailing list