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 Nov 28 18:58:58 UTC 2021
Modified Files:
src/usr.bin/make: Makefile make.c make.h suff.c
Removed Files:
src/usr.bin/make: enum.c enum.h
Log Message:
make: replace bloated bit-set-to-string code with simple code
It was a nice idea to implement a bit-set using an enum type and have a
generic ToString function for them. In the end, the implementation
involved really heavy preprocessor magic and was probably difficult to
understand. Replace all the code with a few bits of straight-forward
preprocessor magic that can be readily understood by just looking 5
lines around, instead of digging through 130 lines of lengthy macro
definitions.
Curiously, this reduces the binary size even though the 3 ToString
functions now have a few lines of duplicate code and there are more
explicit function calls.
The ToString functions are only seldom used, so the additional memory
allocation is acceptable.
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/usr.bin/make/Makefile
cvs rdiff -u -r1.15 -r0 src/usr.bin/make/enum.c
cvs rdiff -u -r1.19 -r0 src/usr.bin/make/enum.h
cvs rdiff -u -r1.244 -r1.245 src/usr.bin/make/make.c
cvs rdiff -u -r1.266 -r1.267 src/usr.bin/make/make.h
cvs rdiff -u -r1.351 -r1.352 src/usr.bin/make/suff.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