From owner-svn-src-all@freebsd.org Mon Jun 11 05:36:00 2018 Return-Path: Delivered-To: svn-src-all@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 24A4810093CB; Mon, 11 Jun 2018 05:36:00 +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 C9DD36E67A; Mon, 11 Jun 2018 05:35:59 +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 A6C3817481; Mon, 11 Jun 2018 05:35:59 +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 w5B5ZxwO017626; Mon, 11 Jun 2018 05:35:59 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5B5Zv7a017614; Mon, 11 Jun 2018 05:35:57 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201806110535.w5B5Zv7a017614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 11 Jun 2018 05:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334944 - 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: 334944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 05:36:00 -0000 Author: pstef Date: Mon Jun 11 05:35:57 2018 New Revision: 334944 URL: https://svnweb.freebsd.org/changeset/base/334944 Log: indent(1): rename -nsac/-sac ("space after cast") to -ncs/-cs Also update tests and the manpage. GNU indent had the option earlier as -cs, let's not diverge unnecessarily. Added: head/usr.bin/indent/tests/cs.0 - copied unchanged from r334943, head/usr.bin/indent/tests/sac.0 head/usr.bin/indent/tests/cs.0.pro - copied, changed from r334943, head/usr.bin/indent/tests/sac.0.pro head/usr.bin/indent/tests/cs.0.stdout - copied unchanged from r334943, head/usr.bin/indent/tests/sac.0.stdout head/usr.bin/indent/tests/ncs.0 - copied unchanged from r334943, head/usr.bin/indent/tests/nsac.0 head/usr.bin/indent/tests/ncs.0.pro - copied, changed from r334943, head/usr.bin/indent/tests/nsac.0.pro head/usr.bin/indent/tests/ncs.0.stdout - copied unchanged from r334943, head/usr.bin/indent/tests/nsac.0.stdout Deleted: head/usr.bin/indent/tests/nsac.0 head/usr.bin/indent/tests/nsac.0.pro head/usr.bin/indent/tests/nsac.0.stdout head/usr.bin/indent/tests/sac.0 head/usr.bin/indent/tests/sac.0.pro head/usr.bin/indent/tests/sac.0.stdout Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent.1 head/usr.bin/indent/tests/Makefile Modified: head/usr.bin/indent/args.c ============================================================================== --- head/usr.bin/indent/args.c Mon Jun 11 05:28:00 2018 (r334943) +++ head/usr.bin/indent/args.c Mon Jun 11 05:35:57 2018 (r334944) @@ -116,6 +116,7 @@ struct pro { {"ce", PRO_BOOL, true, ON, &opt.cuddle_else}, {"ci", PRO_INT, 0, 0, &opt.continuation_indent}, {"cli", PRO_SPECIAL, 0, CLI, 0}, + {"cs", PRO_BOOL, false, ON, &opt.space_after_cast}, {"c", PRO_INT, 33, 0, &opt.com_ind}, {"di", PRO_INT, 16, 0, &opt.decl_indent}, {"dj", PRO_BOOL, false, ON, &opt.ljust_decl}, @@ -141,6 +142,7 @@ struct pro { {"nbs", PRO_BOOL, false, OFF, &opt.Bill_Shannon}, {"ncdb", PRO_BOOL, true, OFF, &opt.comment_delimiter_on_blankline}, {"nce", PRO_BOOL, true, OFF, &opt.cuddle_else}, + {"ncs", PRO_BOOL, false, OFF, &opt.space_after_cast}, {"ndj", PRO_BOOL, false, OFF, &opt.ljust_decl}, {"neei", PRO_BOOL, false, OFF, &opt.extra_expression_indent}, {"nei", PRO_BOOL, true, OFF, &opt.else_if}, @@ -153,14 +155,12 @@ struct pro { {"npcs", PRO_BOOL, false, OFF, &opt.proc_calls_space}, {"npro", PRO_SPECIAL, 0, IGN, 0}, {"npsl", PRO_BOOL, true, OFF, &opt.procnames_start_line}, - {"nsac", PRO_BOOL, false, OFF, &opt.space_after_cast}, {"nsc", PRO_BOOL, true, OFF, &opt.star_comment_cont}, {"nsob", PRO_BOOL, false, OFF, &opt.swallow_optional_blanklines}, {"nut", PRO_BOOL, true, OFF, &opt.use_tabs}, {"nv", PRO_BOOL, false, OFF, &opt.verbose}, {"pcs", PRO_BOOL, false, ON, &opt.proc_calls_space}, {"psl", PRO_BOOL, true, ON, &opt.procnames_start_line}, - {"sac", PRO_BOOL, false, ON, &opt.space_after_cast}, {"sc", PRO_BOOL, true, ON, &opt.star_comment_cont}, {"sob", PRO_BOOL, false, ON, &opt.swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, Modified: head/usr.bin/indent/indent.1 ============================================================================== --- head/usr.bin/indent/indent.1 Mon Jun 11 05:28:00 2018 (r334943) +++ head/usr.bin/indent/indent.1 Mon Jun 11 05:35:57 2018 (r334944) @@ -30,7 +30,7 @@ .\" @(#)indent.1 8.1 (Berkeley) 7/1/93 .\" $FreeBSD$ .\" -.Dd June 4, 2018 +.Dd June 11, 2018 .Dt INDENT 1 .Os .Sh NAME @@ -55,6 +55,7 @@ .Op Fl \&ce | Fl nce .Op Fl \&ci Ns Ar n .Op Fl cli Ns Ar n +.Op Fl cs | Fl ncs .Op Fl d Ns Ar n .Op Fl \&di Ns Ar n .Op Fl dj | Fl ndj @@ -78,7 +79,6 @@ .Op Fl P Ns Ar file .Op Fl pcs | Fl npcs .Op Fl psl | Fl npsl -.Op Fl sac | Fl nsac .Op Fl \&sc | Fl nsc .Bk -words .Op Fl sob | Fl nsob @@ -259,6 +259,11 @@ causes case labels to be indented half a tab stop. The default is .Fl cli0 . +.It Fl cs , ncs +Control whether parenthesized type names in casts are followed by a space or +not. +The default is +.Fl ncs . .It Fl d Ns Ar n Controls the placement of comments which are not to the right of code. @@ -423,11 +428,6 @@ column 1 \- their types, if any, will be left on the p The default is .Fl psl . -.It Fl sac , nsac -Control whether parenthesized type names in casts are followed by a space or -not. -The default is -.Fl nsac . .It Fl \&sc , nsc Enables (disables) the placement of asterisks (`*'s) at the left edge of all comments. Modified: head/usr.bin/indent/tests/Makefile ============================================================================== --- head/usr.bin/indent/tests/Makefile Mon Jun 11 05:28:00 2018 (r334943) +++ head/usr.bin/indent/tests/Makefile Mon Jun 11 05:35:57 2018 (r334944) @@ -20,9 +20,9 @@ ${PACKAGE}FILES+= label.0.stdout ${PACKAGE}FILES+= label.0.pro ${PACKAGE}FILES+= list_head.0 ${PACKAGE}FILES+= list_head.0.stdout -${PACKAGE}FILES+= nsac.0 -${PACKAGE}FILES+= nsac.0.stdout -${PACKAGE}FILES+= nsac.0.pro +${PACKAGE}FILES+= ncs.0 +${PACKAGE}FILES+= ncs.0.stdout +${PACKAGE}FILES+= ncs.0.pro ${PACKAGE}FILES+= offsetof.0 ${PACKAGE}FILES+= offsetof.0.stdout ${PACKAGE}FILES+= parens.0 @@ -31,9 +31,9 @@ ${PACKAGE}FILES+= parens.0.pro ${PACKAGE}FILES+= pcs.0 ${PACKAGE}FILES+= pcs.0.stdout ${PACKAGE}FILES+= pcs.0.pro -${PACKAGE}FILES+= sac.0 -${PACKAGE}FILES+= sac.0.stdout -${PACKAGE}FILES+= sac.0.pro +${PACKAGE}FILES+= cs.0 +${PACKAGE}FILES+= cs.0.stdout +${PACKAGE}FILES+= cs.0.pro ${PACKAGE}FILES+= struct.0 ${PACKAGE}FILES+= struct.0.stdout ${PACKAGE}FILES+= surplusbad.0 Copied: head/usr.bin/indent/tests/cs.0 (from r334943, head/usr.bin/indent/tests/sac.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/cs.0 Mon Jun 11 05:35:57 2018 (r334944, copy of r334943, head/usr.bin/indent/tests/sac.0) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ +void t(void) { + int a = (double) 8; +} Copied and modified: head/usr.bin/indent/tests/cs.0.pro (from r334943, head/usr.bin/indent/tests/sac.0.pro) ============================================================================== --- head/usr.bin/indent/tests/sac.0.pro Mon Jun 11 05:28:00 2018 (r334943, copy source) +++ head/usr.bin/indent/tests/cs.0.pro Mon Jun 11 05:35:57 2018 (r334944) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ --sac +-cs Copied: head/usr.bin/indent/tests/cs.0.stdout (from r334943, head/usr.bin/indent/tests/sac.0.stdout) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/cs.0.stdout Mon Jun 11 05:35:57 2018 (r334944, copy of r334943, head/usr.bin/indent/tests/sac.0.stdout) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +void +t(void) +{ + int a = (double) 8; +} Copied: head/usr.bin/indent/tests/ncs.0 (from r334943, head/usr.bin/indent/tests/nsac.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/ncs.0 Mon Jun 11 05:35:57 2018 (r334944, copy of r334943, head/usr.bin/indent/tests/nsac.0) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ +void t(void) { + int a = (double) 8; +} Copied and modified: head/usr.bin/indent/tests/ncs.0.pro (from r334943, head/usr.bin/indent/tests/nsac.0.pro) ============================================================================== --- head/usr.bin/indent/tests/nsac.0.pro Mon Jun 11 05:28:00 2018 (r334943, copy source) +++ head/usr.bin/indent/tests/ncs.0.pro Mon Jun 11 05:35:57 2018 (r334944) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ --nsac +-ncs Copied: head/usr.bin/indent/tests/ncs.0.stdout (from r334943, head/usr.bin/indent/tests/nsac.0.stdout) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/indent/tests/ncs.0.stdout Mon Jun 11 05:35:57 2018 (r334944, copy of r334943, head/usr.bin/indent/tests/nsac.0.stdout) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +void +t(void) +{ + int a = (double)8; +}