Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/usr.bin/make
Module Name: src
Committed By: rillig
Date: Sun Jul 26 15:09:10 UTC 2020
Modified Files:
src/usr.bin/make: buf.c buf.h var.c
Log Message:
make(1): add Buffer functions for common tasks
Adding a string or a substring to a buffer are common tasks when handling
variables. There is no need to spell out the strlen call or the pointer
subtraction at every call site.
Subtracting pointers results in a ptrdiff_t, which would have to be
converted to an int in each case for WARNS=6. Having this conversion in a
single place keeps the code clean.
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/make/buf.c
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/buf.h
cvs rdiff -u -r1.312 -r1.313 src/usr.bin/make/var.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