Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/indent



Module Name:    src
Committed By:   rillig
Date:           Fri Oct 29 23:48:50 UTC 2021

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

Log Message:
indent: remove redundant comments, remove punctuation from debug log

The comment about 'null stmt' between braces probably meant 'no
statements between braces'.

The comments at psym_switch_expr only repeated what the code says or had
been outdated 29 years ago already since opt.case_indent does not have
to be 'one level down'.

In the debug log, the quotes around the symbol names are not necessary
after a ':'. The parse stack also does not need this much punctuation.

Reducing a do-while loop to nothing instead of a statement saves a few
CPU cycles. It works because after each lbrace, a stmt is pushed to the
parser stack. This stmt can only ever be reduced to a stmt_list but
never be removed.


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.113 -r1.114 src/usr.bin/indent/lexi.c
cvs rdiff -u -r1.46 -r1.47 src/usr.bin/indent/parse.c

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




Home | Main Index | Thread Index | Old Index