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.

Reply via email to