CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 09:06:12 UTC 2021

Modified Files:
src/usr.bin/indent: io.c

Log Message:
indent: remove strange debugging code that went in the output file

Whenever the code to be output contained the magic byte 0x80, instead of
writing this byte, indent wrote the column number at the beginning of
the code snippet, times 7.  Especially the 'times 7' does not make any
sense at all.

In ISO-8859-1, this character position is not assigned.  In Microsoft
Codepage 1252 it is the Euro sign.  In UTF-8 (which was probably not on
the author's list when the code was originally written) it occurs as the
middle byte for code points like U+2026 (horizontal ellipsis) from the
block General Punctuation.

Remove this strange code, thereby fixing indent for UTF-8 code.  The
code had been there since at least 1993-04-09, when it was first
imported to NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 09:21:57 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c indent.h io.c lexi.c

Log Message:
indent: add debug logging for actually writing to the output file

Together with the results of the tokenizer and the 4 buffers for token,
label, code and comment, the debug log now provides a good high-level
view on how the indentation happens and where to look for the many
remaining bugs.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/indent/io.c
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/indent/lexi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 09:48:04 UTC 2021

Modified Files:
src/usr.bin/indent: io.c

Log Message:
indent: manually fix indentation in indent's own source code


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 09:54:12 UTC 2021

Modified Files:
src/usr.bin/indent: indent.h io.c pr_comment.c

Log Message:
indent: replace compute_label_column with compute_label_indent

Using the invariant 'column == 1 + indent'.  This removes several overly
complicated '+ 1' from the code that are not needed conceptually.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/indent/io.c
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 10:06:47 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c indent.h io.c pr_comment.c

Log Message:
indent: replace compute_code_column with compute_code_indent

The goal is to only ever be concerned about the _indentation_ of a
token, never the _column_ it appears in.  Having only one of these
avoids off-by-one errors.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/indent/io.c
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 10:20:54 UTC 2021

Modified Files:
src/usr.bin/indent: indent.h io.c

Log Message:
indent: replace column computation with indentation computation

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 10:32:25 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c indent.h io.c pr_comment.c

Log Message:
indent: inline calls to count_spaces and count_spaces_until

These two functions operated on column numbers instead of indentation,
which required adjustments of '+ 1' and '- 1'.  Their names were
completely wrong since these functions did not count anything, instead
they computed the column.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/indent/io.c
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 10:47:59 UTC 2021

Modified Files:
src/usr.bin/indent: pr_comment.c

Log Message:
indent: document undefined behavior in processing of comments

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 11:19:43 UTC 2021

Modified Files:
src/usr.bin/indent: args.c indent.c indent_globs.h io.c pr_comment.c

Log Message:
indent: fix confusing variable names

The word 'col' should only be used for the 1-based column number.  This
name is completely inappropriate for a line length since that provokes
off-by-one errors.  The name 'cols' would be acceptable although
confusing since it sounds so similar to 'col'.

Therefore, rename variables that are related to the maximum line length
to 'line_length' since that makes for obvious code and nicely relates to
the description of the option in the manual page.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/indent/args.c
cvs rdiff -u -r1.50 -r1.51 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/indent/indent_globs.h
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/indent/io.c
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 11:27:01 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c lexi.c pr_comment.c

Log Message:
indent: remove redundant parentheses

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/indent/lexi.c
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 11:47:22 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: split 'main' into manageable parts

Since several years (maybe even decades) compilers know how to inline
static functions that are only used once.  Therefore there is no need to
have overly long functions anymore, especially not 'main', which is only
called a single time and thus does not add any noticeable performance
degradation.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/usr.bin/indent/indent.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 12:52:24 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c

Log Message:
indent: split 'main_loop' into several functions

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/usr.bin/indent/indent.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 13:04:13 UTC 2021

Modified Files:
src/tests/usr.bin/indent: token-preprocessing.0
token-preprocessing.0.stdout

Log Message:
tests/indent: add another test case for preprocessing directives

In process_preprocessing, the variable 'quote' is not used, which makes
the code suspicious of not handling the combination of string literals
and comments properly.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/token-preprocessing.0 \
src/tests/usr.bin/indent/token-preprocessing.0.stdout

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 13:14:14 UTC 2021

Modified Files:
src/tests/usr.bin/indent: token-preprocessing.0.stdout
src/usr.bin/indent: indent.c

Log Message:
indent: fix handling of '/*' in string literal in preprocessing line

Previously, the '/*' in the string literal had been interpreted as the
beginning of a comment, which was wrong.  Because of that, the variable
declaration in the following line was still interpreted as part of the
comment.  The comment even continued until the end of the file.

Due to indent's forgiving nature, it neither complained nor even
mentioned that anything had gone wrong.  The decision of rather
producing wrong output than failing early is a dangerous one.

At least, there should have been an error message that at the end of the
file, the parser was still in a a comment, expecting the closing '*/'.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/tests/usr.bin/indent/token-preprocessing.0.stdout
cvs rdiff -u -r1.54 -r1.55 src/usr.bin/indent/indent.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 13:25:23 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c indent.h indent_globs.h pr_comment.c

Log Message:
indent: rename pr_comment to process_comment, clean up documentation

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/indent/indent_globs.h
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 13:51:08 UTC 2021

Modified Files:
src/usr.bin/indent: args.c indent.c indent_globs.h io.c pr_comment.c

Log Message:
indent: distinguish between 'column' and 'indentation'

column == 1 + indentation.

In addition, indentation is a relative distance while column is an
absolute position.  Therefore, don't confuse these two concepts, to
prevent off-by-one errors.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/indent/args.c
cvs rdiff -u -r1.56 -r1.57 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/indent/indent_globs.h
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/indent/io.c
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 13:54:01 UTC 2021

Modified Files:
src/usr.bin/indent: io.c

Log Message:
indent: in dump_line, reduce scope of local variable

This allows the variable 'target' in the lower half of the function to
get a more specific name.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 13:55:42 UTC 2021

Modified Files:
src/usr.bin/indent: io.c

Log Message:
indent: rename local variable in dump_line

This clarifies that the variable names a column, not an indentation.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm/pmap

2021-03-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 13 15:29:13 UTC 2021

Modified Files:
src/sys/uvm/pmap: pmap.c

Log Message:
Don't use %jx for 0 or 1 - just use %jd in UVMHIST_LOG format.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/uvm/pmap/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2021-03-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 13 15:29:56 UTC 2021

Modified Files:
src/sys/uvm: uvm_amap.c uvm_aobj.c uvm_bio.c uvm_device.c uvm_km.c
uvm_map.c uvm_swap.c uvm_vnode.c
src/sys/uvm/pmap: pmap_segtab.c

Log Message:
Consistently use %#jx instead of 0x%jx or just %jx in UVMHIST_LOG formats


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/uvm/uvm_amap.c
cvs rdiff -u -r1.152 -r1.153 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.124 -r1.125 src/sys/uvm/uvm_bio.c
cvs rdiff -u -r1.71 -r1.72 src/sys/uvm/uvm_device.c
cvs rdiff -u -r1.159 -r1.160 src/sys/uvm/uvm_km.c
cvs rdiff -u -r1.385 -r1.386 src/sys/uvm/uvm_map.c
cvs rdiff -u -r1.202 -r1.203 src/sys/uvm/uvm_swap.c
cvs rdiff -u -r1.117 -r1.118 src/sys/uvm/uvm_vnode.c
cvs rdiff -u -r1.26 -r1.27 src/sys/uvm/pmap/pmap_segtab.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/sed

2021-03-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 13 15:46:54 UTC 2021

Modified Files:
src/usr.bin/sed: compile.c

Log Message:
Handle \t too (RVP)


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/usr.bin/sed/compile.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libwrap

2021-03-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 13 16:46:49 UTC 2021

Modified Files:
src/lib/libwrap: Makefile

Log Message:
record the libblocklist dependency


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libwrap/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2021-03-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 13 17:14:12 UTC 2021

Modified Files:
src/sys/arch/mips/include: pcb.h
src/sys/arch/mips/mips: trap.c
src/sys/uvm/pmap: pmap.c

Log Message:
s/pfi_faultpte/&p/ for consistency with arm / other uses of ptep


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mips/include/pcb.h
cvs rdiff -u -r1.257 -r1.258 src/sys/arch/mips/mips/trap.c
cvs rdiff -u -r1.59 -r1.60 src/sys/uvm/pmap/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 18:11:31 UTC 2021

Modified Files:
src/usr.bin/indent: pr_comment.c

Log Message:
indent: remove the '+ 1' from right margin calculation in comment

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 18:24:56 UTC 2021

Modified Files:
src/usr.bin/indent: io.c

Log Message:
indent: align comments in indent's own code

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 18:46:39 UTC 2021

Modified Files:
src/usr.bin/indent: indent.c io.c

Log Message:
indent: add debug logging for switching the input buffer

No functional change outside debug mode.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/sparc64/dev

2021-03-13 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Sat Mar 13 20:21:37 UTC 2021

Modified Files:
src/sys/arch/sparc64/dev: vnet.c

Log Message:
sun4v: vnet - reception and transmission of eternet frames seems to work now 
(it is possible to ping 8.8.8.8 from inside a sun4v ldom). Still cleanup of 
debug code to be done.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/dev/vnet.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sdmmc

2021-03-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Mar 13 23:22:44 UTC 2021

Modified Files:
src/sys/dev/sdmmc: sdmmcvar.h

Log Message:
define NO_STOP flag


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/sdmmc/sdmmcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sdmmc

2021-03-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Mar 13 23:26:47 UTC 2021

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
Enable block count only for count > 0.
Don't enable autostop when command sets new flag SCF_NO_STOP.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/sdmmc/sdhc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 23:36:10 UTC 2021

Modified Files:
src/usr.bin/indent: indent_globs.h

Log Message:
indent: fix documentation of parser_state.paren_indents

The column position is not the same as the indentation (off-by-one).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/indent/indent_globs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Mar 13 23:42:23 UTC 2021

Modified Files:
src/usr.bin/indent: indent.h

Log Message:
indent: remove disabled duplicate RCS ID from header

By convention, headers don't record their RCS ID.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/indent/indent.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 00:22:16 UTC 2021

Modified Files:
src/usr.bin/indent: Makefile args.c indent.c io.c lexi.c pr_comment.c

Log Message:
indent: fix lint warnings

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/indent/Makefile
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/indent/args.c
cvs rdiff -u -r1.58 -r1.59 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.47 -r1.48 src/usr.bin/indent/io.c
cvs rdiff -u -r1.40 -r1.41 src/usr.bin/indent/lexi.c
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 00:33:25 UTC 2021

Modified Files:
src/usr.bin/indent: indent.h

Log Message:
indent: give indent a try at formatting its own code

Formatting indent.h required the following manual corrections
afterwards:

The first tab in the comment in line 1 was replaced with a space but
shouldn't be.

The spacing around the '...' in function prototypes was completely
wrong.  It looked like 'const char *,...)__printflike', without any
spaces.

The '*' of the return type 'const char *' was tied to the function name,
even though this declaration was only for a single function.  In such a
case, it's more appropriate to line up the function names.

The function-like macros were not indented to -di.  This is something
that I would not expect from indent, so it's ok to do that manually.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/indent/indent.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 00:50:39 UTC 2021

Modified Files:
src/tests/usr.bin/indent: token-comment.0 token-comment.0.stdout

Log Message:
tests/indent: demonstrate off-by-one error in comment processing


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/token-comment.0 \
src/tests/usr.bin/indent/token-comment.0.stdout

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 01:34:13 UTC 2021

Modified Files:
src/tests/usr.bin/indent: comments.0 comments.0.stdout opt-P.0.stdout
opt-bap+sob.0.stdout token-comment.0.stdout
token-keyword_do_else.0.stdout
src/usr.bin/indent: pr_comment.c

Log Message:
indent: fix off-by-one error in comment wrapping

The manual page says that the default maximum length of a comment line
is 78.  The test 'comments.0' wrongly assumed that this 78 would refer
to the maximum _column_ allowed, which is off by one.

Fix the wording in the test 'comments.0' and remove the (now satisfied)
expectation comments in the test 'token-comment.0'.

Several other tests just happened to hit that limit, fix these as well.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/comments.0 \
src/tests/usr.bin/indent/comments.0.stdout \
src/tests/usr.bin/indent/opt-bap+sob.0.stdout \
src/tests/usr.bin/indent/token-keyword_do_else.0.stdout
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/opt-P.0.stdout \
src/tests/usr.bin/indent/token-comment.0.stdout
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 01:44:37 UTC 2021

Modified Files:
src/usr.bin/indent: io.c

Log Message:
indent: make compute_code_indent more readable

The '?:' operator computing the factor was too hard to read.  When
quickly scanning the code, the 1 in the expression looked too much like
it would be added to the indentation, which would turn the indentation
length into a column number, and that again would smell like an
off-by-one error.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/indent/io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/sys

2021-03-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar 14 02:53:57 UTC 2021

Modified Files:
src/sys/sys: systm.h

Log Message:
Comment on CTASSERT() in COND_SET_STRUCT(); this is a sanity check to
avoid hashing/assigning large structure. Upper-bound is arbitrary, but
be carefully for performance penalty if bumping.

Thanks christos for discussion.


To generate a diff of this commit:
cvs rdiff -u -r1.299 -r1.300 src/sys/sys/systm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2021-03-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar 14 02:56:07 UTC 2021

Modified Files:
src/share/man/man4: options.4

Log Message:
Document NFS_BOOT_UDP instead of NFS_BOOT_TCP; We've switched to
NFS over TCP by default.

Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.517 -r1.518 src/share/man/man4/options.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/mount_nfs

2021-03-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar 14 02:56:51 UTC 2021

Modified Files:
src/sbin/mount_nfs: mount_nfs.8

Log Message:
Fix typo: s/--r/-r/


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sbin/mount_nfs/mount_nfs.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2021-03-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar 14 03:14:42 UTC 2021

Modified Files:
src/sys/dev/pci: radeonfb.c

Log Message:
Initialize dp->rd_cmap_{red,green,blue} in radeonfb_init_palette() for 8bpp,
so that color map can be obtained by WSDISPLAYIO_GETCMAP ioctl(2).

Now, mlterm-fb from pkgsrc/x11/mlterm works just fine on radeonfb(4).


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/dev/pci/radeonfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/mac68k/mac68k

2021-03-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar 14 03:25:01 UTC 2021

Modified Files:
src/sys/arch/mac68k/mac68k: locore.s

Log Message:
Fix DJMEMCMAX option for Quadra/Centris 650/800.

- Use jeq instead of jra for conditional branch.
- Use cmpl instead of cmp (= cmpw) for int variables.

Now, my Quadra 800 recognizes full 520MB memory!


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/arch/mac68k/mac68k/locore.s

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbppc/conf

2021-03-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Mar 14 03:35:39 UTC 2021

Modified Files:
src/sys/arch/evbppc/conf: EXPLORA451

Log Message:
Enable NFS_BOOT_UDP; on-board NIC seems to be too slow for overhead due to
NFS over TCP. Some scores of pkgsrc/benchmarks/bonnie improve nearly x2.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/evbppc/conf/EXPLORA451

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 04:42:17 UTC 2021

Modified Files:
src/usr.bin/indent: pr_comment.c

Log Message:
indent: clean up target column computation in process_comment

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 04:52:10 UTC 2021

Modified Files:
src/usr.bin/indent: pr_comment.c

Log Message:
indent: remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/indent

2021-03-13 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun Mar 14 05:26:42 UTC 2021

Modified Files:
src/usr.bin/indent: pr_comment.c

Log Message:
indent: clean up check_size_comment

The additional parameter last_bl_ptr was only necessary because the last
blank was stored as a pointer into the buffer.  By storing the index in
the buffer instead, it doesn't need to be updated all the time.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/indent/pr_comment.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.