From owner-svn-src-head@freebsd.org Fri Jun 1 09:32:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B4B8F7B483; Fri, 1 Jun 2018 09:32:44 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC0586DFE2; Fri, 1 Jun 2018 09:32:43 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D3CD2707F; Fri, 1 Jun 2018 09:32:43 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w519WhW5001356; Fri, 1 Jun 2018 09:32:43 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w519WhXD001354; Fri, 1 Jun 2018 09:32:43 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201806010932.w519WhXD001354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Fri, 1 Jun 2018 09:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334477 - in head/usr.bin/indent: . tests X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: in head/usr.bin/indent: . tests X-SVN-Commit-Revision: 334477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2018 09:32:44 -0000 Author: pstef Date: Fri Jun 1 09:32:42 2018 New Revision: 334477 URL: https://svnweb.freebsd.org/changeset/base/334477 Log: indent(1): consider tab characters when forcing a newline after a comma Modified: head/usr.bin/indent/indent.c head/usr.bin/indent/tests/declarations.0 head/usr.bin/indent/tests/declarations.0.stdout Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Jun 1 09:17:20 2018 (r334476) +++ head/usr.bin/indent/indent.c Fri Jun 1 09:32:42 2018 (r334477) @@ -1058,7 +1058,9 @@ check_type: if (ps.p_l_follow == 0) { if (ps.block_init_level <= 0) ps.block_init = 0; - if (break_comma && (!ps.leave_comma || compute_code_target() + (e_code - s_code) > max_col - tabsize)) + if (break_comma && (!ps.leave_comma || + count_spaces_until(compute_code_target(), s_code, e_code) > + max_col - tabsize)) force_nl = true; } break; Modified: head/usr.bin/indent/tests/declarations.0 ============================================================================== --- head/usr.bin/indent/tests/declarations.0 Fri Jun 1 09:17:20 2018 (r334476) +++ head/usr.bin/indent/tests/declarations.0 Fri Jun 1 09:32:42 2018 (r334477) @@ -44,6 +44,7 @@ void t2 (char *x, int y) ,n ,o ; + int chars[ /* push the comma beyond column 74 .... */ ], x; } const int int_minimum_size = Modified: head/usr.bin/indent/tests/declarations.0.stdout ============================================================================== --- head/usr.bin/indent/tests/declarations.0.stdout Fri Jun 1 09:17:20 2018 (r334476) +++ head/usr.bin/indent/tests/declarations.0.stdout Fri Jun 1 09:32:42 2018 (r334477) @@ -36,6 +36,8 @@ t2(char *x, int y) ,n ,o ; + int chars[ /* push the comma beyond column 74 .... */ ], + x; } const int int_minimum_size =