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:           Wed Nov  3 21:47:35 UTC 2021

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

Log Message:
indent: inline indentation_after, shorten function name to ind_add

There were only few calls to indentation_after, so inlining it spares
the need to look at yet another function definition. Another effect is
that code.s and code.e appear in the code as a pair now, instead of a
single code.s, making the scope of the function call obvious.

In ind_add, there is no need to check for '\0' anymore since none of the
buffers can ever contain a null character, these are filtered out by
inbuf_read_line.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.204 -r1.205 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.75 -r1.76 src/usr.bin/indent/indent.h
cvs rdiff -u -r1.108 -r1.109 src/usr.bin/indent/io.c
cvs rdiff -u -r1.93 -r1.94 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.




Home | Main Index | Thread Index | Old Index