svn commit: r363788 - stable/12/bin/sh

2020-08-02 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Aug 3 06:54:04 2020 New Revision: 363788 URL: https://svnweb.freebsd.org/changeset/base/363788 Log: MFC 363621: sh(1): print a newline when ^D quits sh Modified: stable/12/bin/sh/main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/m

svn commit: r363724 - stable/12/share/man/man7

2020-07-31 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Jul 31 07:37:08 2020 New Revision: 363724 URL: https://svnweb.freebsd.org/changeset/base/363724 Log: MFC r363268: Promote use of unprivileged users for building ports by documenting SU_CMD. Phrasing by Daniel O'Connor. Reviewed by: 0mp Differential Revision:

svn commit: r363621 - head/bin/sh

2020-07-27 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jul 27 18:46:20 2020 New Revision: 363621 URL: https://svnweb.freebsd.org/changeset/base/363621 Log: sh(1): print a newline when ^D quits sh I've always found this a little bit confusing: > sh $ ^D> sh $ ^D> Reviewed by: 0mp, jilles MFC after:1 week

svn commit: r363525 - in stable/12: bin/csh bin/sh share/skel

2020-07-25 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Jul 25 11:57:39 2020 New Revision: 363525 URL: https://svnweb.freebsd.org/changeset/base/363525 Log: MFC r342576-342577,342645,342812,342881,343231,343399 (by trasz): r342577 Make sh(1) collapse $HOME into "~" in PS1 r342576 Simplify the way we set the default sh(1

svn commit: r363268 - head/share/man/man7

2020-07-16 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Jul 17 06:33:20 2020 New Revision: 363268 URL: https://svnweb.freebsd.org/changeset/base/363268 Log: Promote use of unprivileged users for building ports by documenting SU_CMD. Phrasing by Daniel O'Connor. Reviewed by: 0mp MFC after:14 days Differential Re

svn commit: r362924 - stable/12/bin/ps

2020-07-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Jul 4 06:34:55 2020 New Revision: 362924 URL: https://svnweb.freebsd.org/changeset/base/362924 Log: MFC r362705 and r362707: ps(1): reuse keyword "cpu" to show CPU number ps(1): don't try to handle non-SMP systems Modified: stable/12/bin/ps/extern.h stable/12/bi

svn commit: r362773 - in stable: 11/lib/libc/string 12/lib/libc/string

2020-06-28 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 29 06:28:01 2020 New Revision: 362773 URL: https://svnweb.freebsd.org/changeset/base/362773 Log: MFC r362495: strtok(3): make it easier to find the RETURN VALUES section Modified: stable/11/lib/libc/string/strtok.3 Directory Properties: stable/11/ (props chan

svn commit: r362773 - in stable: 11/lib/libc/string 12/lib/libc/string

2020-06-28 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 29 06:28:01 2020 New Revision: 362773 URL: https://svnweb.freebsd.org/changeset/base/362773 Log: MFC r362495: strtok(3): make it easier to find the RETURN VALUES section Modified: stable/12/lib/libc/string/strtok.3 Directory Properties: stable/12/ (props chan

svn commit: r362707 - head/bin/ps

2020-06-27 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Jun 27 20:01:56 2020 New Revision: 362707 URL: https://svnweb.freebsd.org/changeset/base/362707 Log: ps(1): don't try to handle non-SMP systems As reported by kib, sysctl machdep.smp_active doesn't exist and on UP we return CPU 0 for all threads anyway. Report

svn commit: r362705 - head/bin/ps

2020-06-27 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Jun 27 19:09:33 2020 New Revision: 362705 URL: https://svnweb.freebsd.org/changeset/base/362705 Log: ps(1): reuse keyword "cpu" to show CPU number This flag will now show the processor number on which a process is running. This change was inspired by PR129965. I

svn commit: r362673 - stable/12/lib/libutil

2020-06-27 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Jun 27 09:01:30 2020 New Revision: 362673 URL: https://svnweb.freebsd.org/changeset/base/362673 Log: MFC r362429 and r362430: libutil: remove extraneous ": " from error messages Make vipw error message less cryptic Modified: stable/12/lib/libutil/gr_util.c stable

svn commit: r362547 - head/usr.sbin/pstat

2020-06-23 Thread Piotr Pawel Stefaniak
Author: pstef Date: Tue Jun 23 18:19:22 2020 New Revision: 362547 URL: https://svnweb.freebsd.org/changeset/base/362547 Log: pstat(8): improve the Size header width after r358181 All size values use fields of width 8. Also, all other headers use fields of width 8. Make the Size header add

svn commit: r362508 - stable/12/contrib/tnftp/src

2020-06-22 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 22 19:15:50 2020 New Revision: 362508 URL: https://svnweb.freebsd.org/changeset/base/362508 Log: MFC r358405 (by hrs): Fix poor performance of ftp(1) due to small SO_SNDBUF and SO_RCVBUF. Modified: stable/12/contrib/tnftp/src/cmds.c stable/12/contrib/tnftp/src/

svn commit: r362506 - stable/12/share/man/man4

2020-06-22 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 22 19:09:17 2020 New Revision: 362506 URL: https://svnweb.freebsd.org/changeset/base/362506 Log: MFC r357186 (by imp): Remove old device list Modified: stable/12/share/man/man4/umass.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/

svn commit: r362507 - stable/11/share/man/man4

2020-06-22 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 22 19:09:47 2020 New Revision: 362507 URL: https://svnweb.freebsd.org/changeset/base/362507 Log: MFC r357186 (by imp): Remove old device list Modified: stable/11/share/man/man4/umass.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/

svn commit: r362495 - head/lib/libc/string

2020-06-22 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 22 11:03:36 2020 New Revision: 362495 URL: https://svnweb.freebsd.org/changeset/base/362495 Log: strtok(3): make it easier to find the RETURN VALUES section MFC after:1 week Modified: head/lib/libc/string/strtok.3 Modified: head/lib/libc/string/strtok.3 =

svn commit: r362469 - stable/12/usr.bin/top

2020-06-21 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 21 20:23:39 2020 New Revision: 362469 URL: https://svnweb.freebsd.org/changeset/base/362469 Log: MFC r349235 (by allanjude): top(1): Don't show the swap line when there are no swap devices Modified: stable/12/usr.bin/top/display.c stable/12/usr.bin/top/machine.

svn commit: r362430 - head/lib/libutil

2020-06-19 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Jun 20 06:20:00 2020 New Revision: 362430 URL: https://svnweb.freebsd.org/changeset/base/362430 Log: Make vipw error message less cryptic Unable to find an editor, vipw would give this error: # env EDITOR=fnord vipw vipw: pw_edit(): No such file or directory

svn commit: r362429 - head/lib/libutil

2020-06-19 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Jun 20 06:10:42 2020 New Revision: 362429 URL: https://svnweb.freebsd.org/changeset/base/362429 Log: libutil: remove extraneous ": " from error messages Each of the err() family of functions already takes care of that. Modified: head/lib/libutil/gr_util.c head/l

svn commit: r361585 - releng/11.4/bin/ps

2020-05-28 Thread Piotr Pawel Stefaniak
Author: pstef Date: Thu May 28 13:19:41 2020 New Revision: 361585 URL: https://svnweb.freebsd.org/changeset/base/361585 Log: MFS r361026 ps: extend the non-standard option -d (tree view) to work with -p Approved by: re (gjb) Modified: releng/11.4/bin/ps/ps.c Directory Properties: re

svn commit: r361430 - stable/12/usr.bin/indent

2020-05-24 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun May 24 09:46:44 2020 New Revision: 361430 URL: https://svnweb.freebsd.org/changeset/base/361430 Log: MFC r361337: indent(1): add fallthrough markers Modified: stable/12/usr.bin/indent/indent.c stable/12/usr.bin/indent/parse.c Directory Properties: stable/12/ (pro

svn commit: r361337 - head/usr.bin/indent

2020-05-21 Thread Piotr Pawel Stefaniak
Author: pstef Date: Thu May 21 17:34:31 2020 New Revision: 361337 URL: https://svnweb.freebsd.org/changeset/base/361337 Log: indent(1): add fallthrough markers This silences -Wimplicit-fallthrough warnings. Submitted by: Michael Paquier Obtained from:postgresql.org MFC afte

svn commit: r361027 - stable/12/bin/ps

2020-05-13 Thread Piotr Pawel Stefaniak
Author: pstef Date: Thu May 14 06:07:23 2020 New Revision: 361027 URL: https://svnweb.freebsd.org/changeset/base/361027 Log: MFC r360786: ps: extend the non-standard option -d (tree view) to work with -p Modified: stable/12/bin/ps/ps.c Directory Properties: stable/12/ (props changed) M

svn commit: r361026 - stable/11/bin/ps

2020-05-13 Thread Piotr Pawel Stefaniak
Author: pstef Date: Thu May 14 06:05:24 2020 New Revision: 361026 URL: https://svnweb.freebsd.org/changeset/base/361026 Log: MFC r360786: ps: extend the non-standard option -d (tree view) to work with -p Modified: stable/11/bin/ps/ps.c Directory Properties: stable/11/ (props changed) M

svn commit: r360786 - head/bin/ps

2020-05-07 Thread Piotr Pawel Stefaniak
Author: pstef Date: Thu May 7 16:56:18 2020 New Revision: 360786 URL: https://svnweb.freebsd.org/changeset/base/360786 Log: ps: extend the non-standard option -d (tree view) to work with -p Initially it seemed that there were multiple possible ways to do it. Processing option -p could

svn commit: r337862 - in head/usr.bin/indent: . tests

2018-08-15 Thread Piotr Pawel Stefaniak
Author: pstef Date: Wed Aug 15 18:19:45 2018 New Revision: 337862 URL: https://svnweb.freebsd.org/changeset/base/337862 Log: indent(1): bug fix after r336333 The bug was that isalnum() is not exactly equivalent to previous code which also allowed characters "$" and "_", so check for those

svn commit: r337651 - head/usr.bin/indent

2018-08-11 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sat Aug 11 19:20:06 2018 New Revision: 337651 URL: https://svnweb.freebsd.org/changeset/base/337651 Log: indent(1): revert r334640 and r334632 While STACKSIZE macro is indeed problematic on some systems, the commits were wrong to shrink il[] and cstk[], because they ne

svn commit: r336601 - head

2018-07-22 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jul 22 12:45:02 2018 New Revision: 336601 URL: https://svnweb.freebsd.org/changeset/base/336601 Log: Remove old Kyua test files for indent(1) after a rename. This continues work in r334944. Reported by: asomers Modified: head/ObsoleteFiles.inc Modified: hea

svn commit: r336333 - in head/usr.bin/indent: . tests

2018-07-15 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jul 16 05:46:50 2018 New Revision: 336333 URL: https://svnweb.freebsd.org/changeset/base/336333 Log: indent(1): rewrite the integer/floating constant scanning part of lexi.c Remove procedural code that did the scanning, which was faulty and didn't support complex c

svn commit: r336318 - head/usr.bin/indent

2018-07-15 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jul 15 21:04:21 2018 New Revision: 336318 URL: https://svnweb.freebsd.org/changeset/base/336318 Log: indent(1): move case_indent from parser state to the options struct This was missed in r334927. Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent_g

svn commit: r334944 - in head/usr.bin/indent: . tests

2018-06-10 Thread Piotr Pawel Stefaniak
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 unne

svn commit: r334927 - head/usr.bin/indent

2018-06-10 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 10 16:44:18 2018 New Revision: 334927 URL: https://svnweb.freebsd.org/changeset/base/334927 Log: indent(1): group global option variables into an options structure It's clearer now when a variable represents a toggable command line option. Many options were

svn commit: r334640 - head/usr.bin/indent

2018-06-04 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 4 21:21:55 2018 New Revision: 334640 URL: https://svnweb.freebsd.org/changeset/base/334640 Log: indent(1): fix buildworld after r334632 Fix error: comparison of integers of different signs: 'int' and 'unsigned long' by casting nitems() to int. Reported

svn commit: r334636 - head/usr.bin/indent

2018-06-04 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 4 21:05:56 2018 New Revision: 334636 URL: https://svnweb.freebsd.org/changeset/base/334636 Log: indent(1): add --version option There exist multi-platform programs that check indent's version in order to know what they can expect from it. GNU indent provides t

svn commit: r334632 - head/usr.bin/indent

2018-06-04 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 4 20:39:58 2018 New Revision: 334632 URL: https://svnweb.freebsd.org/changeset/base/334632 Log: indent(1): remove the STACKSIZE macro and all of its use It conflicts with a system-provided macro of the same name on another OS. Modified: head/usr.bin/indent/in

svn commit: r334630 - head/usr.bin/indent

2018-06-04 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 4 20:24:31 2018 New Revision: 334630 URL: https://svnweb.freebsd.org/changeset/base/334630 Log: indent(1): remove static const char copyright[] It repeats what is already said in the heading comment and it's optimized out so serves no purpose. Modified: hea

svn commit: r334628 - head/usr.bin/indent

2018-06-04 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jun 4 19:47:24 2018 New Revision: 334628 URL: https://svnweb.freebsd.org/changeset/base/334628 Log: indent(1): replace BSD bcopy() with C memmove() Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c =

svn commit: r334590 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 21:40:38 2018 New Revision: 334590 URL: https://svnweb.freebsd.org/changeset/base/334590 Log: indent(1): new option -lpl With -lpl, code surrounded by parentheses in continuation lines is lined up even if it would extend past the right margin. With -nlp

svn commit: r334589 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 21:34:29 2018 New Revision: 334589 URL: https://svnweb.freebsd.org/changeset/base/334589 Log: indent(1): revert introduction of -lpl That was committed with the wrong message. Will be re-added. Modified: head/usr.bin/indent/args.c head/usr.bin/indent/inde

svn commit: r334588 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 20:59:59 2018 New Revision: 334588 URL: https://svnweb.freebsd.org/changeset/base/334588 Log: indent(1): new option -lpl (always line up to parenthesis) With -lp, if a line has an opening paren which is not closed on that line, then continuation lines will b

svn commit: r334587 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 20:48:58 2018 New Revision: 334587 URL: https://svnweb.freebsd.org/changeset/base/334587 Log: indent(1): manual page corretions Add missing options, synchronize syntax summary with the actual option list, and other fixes. Submitted by: Tom Lane Modifie

svn commit: r334583 - in head/usr.bin/indent: . tests

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 19:05:20 2018 New Revision: 334583 URL: https://svnweb.freebsd.org/changeset/base/334583 Log: indent(1): if an identifier can be either a typedef name or as a struct member, it is taken as the latter Modified: head/usr.bin/indent/lexi.c head/usr.bin/indent/t

svn commit: r334581 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
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 =

svn commit: r334580 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 18:34:36 2018 New Revision: 334580 URL: https://svnweb.freebsd.org/changeset/base/334580 Log: indent(1): don't add a space after a label It's not needed and it fools pr_comment(). Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.

svn commit: r334579 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 18:32:11 2018 New Revision: 334579 URL: https://svnweb.freebsd.org/changeset/base/334579 Log: indent(1): ignore null characters from input Modified: head/usr.bin/indent/io.c Modified: head/usr.bin/indent/io.c

svn commit: r334578 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 18:29:20 2018 New Revision: 334578 URL: https://svnweb.freebsd.org/changeset/base/334578 Log: indent(1): don't overflow di_stack[] Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c

svn commit: r334576 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 18:19:41 2018 New Revision: 334576 URL: https://svnweb.freebsd.org/changeset/base/334576 Log: indent(1): improve CHECK_SIZE_ macros Rewrite the macros so that they take a parameter. Consumers use it to signal how much room in the buffer they need; this lets

svn commit: r334574 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 17:55:50 2018 New Revision: 334574 URL: https://svnweb.freebsd.org/changeset/base/334574 Log: indent(1): remove troff output support The troff output in indent was invented at Sun and the online documentation for some post-SunOS operating system includes thi

svn commit: r334571 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 17:11:01 2018 New Revision: 334571 URL: https://svnweb.freebsd.org/changeset/base/334571 Log: indent(1): avoid resetting last_bl to a bogus value when reallocating underlying buffer Modified: head/usr.bin/indent/indent_globs.h Modified: head/usr.bin/indent/in

svn commit: r334570 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 17:07:56 2018 New Revision: 334570 URL: https://svnweb.freebsd.org/changeset/base/334570 Log: indent(1): the check for buffer overflow has to be done before copy Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c =

svn commit: r334569 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 17:05:55 2018 New Revision: 334569 URL: https://svnweb.freebsd.org/changeset/base/334569 Log: indent(1): use errx() instead of abort() Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c

svn commit: r334568 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 17:03:55 2018 New Revision: 334568 URL: https://svnweb.freebsd.org/changeset/base/334568 Log: indent(1): limit character classification functions' input to unsigned char Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent.c head/usr.bin/indent/io

svn commit: r334567 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 16:52:30 2018 New Revision: 334567 URL: https://svnweb.freebsd.org/changeset/base/334567 Log: indent(1): recognize more type names Most are from C99. Modified: head/usr.bin/indent/lexi.c Modified: head/usr.bin/indent/lexi.c

svn commit: r334566 - in head/usr.bin/indent: . tests

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 16:42:58 2018 New Revision: 334566 URL: https://svnweb.freebsd.org/changeset/base/334566 Log: indent(1): don't format function declarations as variables Added: head/usr.bin/indent/tests/f_decls.0 (contents, props changed) head/usr.bin/indent/tests/f_decls.0.

svn commit: r334565 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 16:27:40 2018 New Revision: 334565 URL: https://svnweb.freebsd.org/changeset/base/334565 Log: indent(1): remove is_procname. It was a shorthand for checking if ps.procname is a non-empty string; the same can be done with ps.procname[0] which avoids the need

svn commit: r334564 - in head/usr.bin/indent: . tests

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 16:21:15 2018 New Revision: 334564 URL: https://svnweb.freebsd.org/changeset/base/334564 Log: indent(1): disjoint parser state from lexi() The function is sometimes used as a look-ahead, so ideally it should bear no information about parser state. Modified:

svn commit: r334563 - in head/usr.bin/indent: . tests

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 15:28:55 2018 New Revision: 334563 URL: https://svnweb.freebsd.org/changeset/base/334563 Log: indent(1): improve handling of boxed comments indentation The trick is to copy everything from the start of the line into the buffer that stores newlines and commen

svn commit: r334560 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 14:13:11 2018 New Revision: 334560 URL: https://svnweb.freebsd.org/changeset/base/334560 Log: indent(1): improve predictability of lexi() lexi() reads the input stream and categorizes the next token. indent will sometimes buffer up a sequence of tokens in or

svn commit: r334559 - in head/usr.bin/indent: . tests

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 14:03:20 2018 New Revision: 334559 URL: https://svnweb.freebsd.org/changeset/base/334559 Log: indent(1): improve handling of comments and newlines between "if (...)" or "while (...)" and "else" or "{" * Don't flush newlines - there can be multiple of them an

svn commit: r334556 - head/usr.bin/indent

2018-06-03 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jun 3 13:40:58 2018 New Revision: 334556 URL: https://svnweb.freebsd.org/changeset/base/334556 Log: indent(1): remove undocumented and rather useless option (-ps) It's used to treat the "->" access operator as a binary operator and put space characters around it.

svn commit: r334495 - head/usr.bin/indent

2018-06-01 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Jun 1 20:45:35 2018 New Revision: 334495 URL: https://svnweb.freebsd.org/changeset/base/334495 Log: indent(1): improve an error message When producing a "[...] requires a parameter" error, provide the recognized name of the option instead of argument provided. Mo

svn commit: r334493 - in head/usr.bin/indent: . tests

2018-06-01 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Jun 1 19:56:41 2018 New Revision: 334493 URL: https://svnweb.freebsd.org/changeset/base/334493 Log: indent(1): restore working -pcs My previous indent(1) commit accidentally broke the -pcs option (which adds space between function name and opening parenthesis in f

svn commit: r334480 - in head/usr.bin/indent: . tests

2018-06-01 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Jun 1 09:58:44 2018 New Revision: 334480 URL: https://svnweb.freebsd.org/changeset/base/334480 Log: indent(1): don't add unneeded space to function pointer declarations If the current token is an opening parenthesis, it's either a function call (or sizeof or offse

svn commit: r334477 - in head/usr.bin/indent: . tests

2018-06-01 Thread Piotr Pawel Stefaniak
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

svn commit: r334478 - in head/usr.bin/indent: . tests

2018-06-01 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Jun 1 09:41:15 2018 New Revision: 334478 URL: https://svnweb.freebsd.org/changeset/base/334478 Log: indent(1): don't indent typedef declarations as object declarations Modified: head/usr.bin/indent/indent.c head/usr.bin/indent/indent_codes.h head/usr.bin/indent/le

svn commit: r334475 - in head/usr.bin/indent: . tests

2018-06-01 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Jun 1 08:54:51 2018 New Revision: 334475 URL: https://svnweb.freebsd.org/changeset/base/334475 Log: indent(1): identifiers inside parentheses are not declarations Also make lparen position calculation consider tab stops. This improves function pointer typedef f

svn commit: r321487 - head/usr.bin/indent

2017-07-25 Thread Piotr Pawel Stefaniak
Author: pstef Date: Tue Jul 25 17:04:35 2017 New Revision: 321487 URL: https://svnweb.freebsd.org/changeset/base/321487 Log: indent(1): add option -tsn for setting tab size. Modified: head/usr.bin/indent/args.c head/usr.bin/indent/indent.1 head/usr.bin/indent/indent.c head/usr.bin/inden

svn commit: r321396 - in head/usr.bin/indent: . tests

2017-07-23 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jul 23 20:25:53 2017 New Revision: 321396 URL: https://svnweb.freebsd.org/changeset/base/321396 Log: indent(1): better alignment of comments on code. If aligning the beginning of a comment to -cn would mean no space between code and the comment, align it to the nex

svn commit: r321383 - head/usr.bin/indent/tests

2017-07-23 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jul 23 15:07:52 2017 New Revision: 321383 URL: https://svnweb.freebsd.org/changeset/base/321383 Log: indent(1): rename the profile file. Currently, indent's testing mechanism will attempt to apply options from a file named ${test}.pro - and this test's filename is

svn commit: r321382 - in head/usr.bin/indent: . tests

2017-07-23 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jul 23 14:33:04 2017 New Revision: 321382 URL: https://svnweb.freebsd.org/changeset/base/321382 Log: indent(1): don't produce unnecessary blank lines. Don't force a blank line between an opening brace and a block comment -- not even if -bbb (blank lines before bloc

svn commit: r321381 - in head/usr.bin/indent: . tests

2017-07-23 Thread Piotr Pawel Stefaniak
Author: pstef Date: Sun Jul 23 14:04:45 2017 New Revision: 321381 URL: https://svnweb.freebsd.org/changeset/base/321381 Log: indent(1): don't produce unneeded space character in function declarators. Modified: head/usr.bin/indent/indent.c head/usr.bin/indent/indent_codes.h head/usr.bin/in

svn commit: r318471 - in head/usr.bin/indent: . tests

2017-05-18 Thread Piotr Pawel Stefaniak
Author: pstef Date: Thu May 18 17:15:58 2017 New Revision: 318471 URL: https://svnweb.freebsd.org/changeset/base/318471 Log: indent(1): Support binary integer literals. This was done by Romain Tartière for PR123553. I initially thought that it would break code like this: #define b00101010 -

svn commit: r313544 - head/usr.bin/indent/tests

2017-02-10 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Feb 10 09:31:39 2017 New Revision: 313544 URL: https://svnweb.freebsd.org/changeset/base/313544 Log: indent(1): add regression test cases These examples show expected behavior of indent(1). They are meant to be used together with a regression test mechanism, either

svn commit: r311141 - head/usr.bin/indent

2017-01-02 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jan 2 20:49:24 2017 New Revision: 311141 URL: https://svnweb.freebsd.org/changeset/base/311141 Log: indent(1): add a piece missed in r311138. Modified: head/usr.bin/indent/args.c Modified: head/usr.bin/indent/args.c ===

svn commit: r311138 - head/usr.bin/indent

2017-01-02 Thread Piotr Pawel Stefaniak
Author: pstef Date: Mon Jan 2 20:23:46 2017 New Revision: 311138 URL: https://svnweb.freebsd.org/changeset/base/311138 Log: indent(1): add option -P for loading user-provided files as profiles Without this change, indent(1) would only look to load options from ~/.indent.pro if it's there

svn commit: r310863 - head/usr.bin/indent

2016-12-30 Thread Piotr Pawel Stefaniak
Author: pstef Date: Fri Dec 30 21:00:45 2016 New Revision: 310863 URL: https://svnweb.freebsd.org/changeset/base/310863 Log: indent(1): Avoid out of bounds access of array ps.paren_indents ps.p_l_follow can't be allowed to grow beyond maximum index of paren_indents. Approved by: pfg (