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

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

2020-07-17 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

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.

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.

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

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: r362430 - head/lib/libutil

2020-06-20 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-20 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

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

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

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

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

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:

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

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

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

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

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:

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:

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

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

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

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

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

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:

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

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:

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

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)

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.

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

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

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

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.

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

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

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

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

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

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

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

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

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

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,

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