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:           Sat Aug  1 21:40:50 UTC 2020

Modified Files:
        src/usr.bin/make: buf.c buf.h cond.c for.c main.c var.c

Log Message:
make(1): switch Buffer size from int to size_t

This change helps to make the various integer types compatible and is a
preparational step for setting WARNS=6 in the Makefile.

The documentation of buf.c has been cleaned up and condensed since it
was mostly redundant, and some statements were even slightly wrong.

All code changes are covered by the existing unit tests, except for the
few lines in for.c around for_var_len.  These changes have been reviewed
thoroughly and manually, like all the others in this commit.

Those buffer functions that deal with sizes have been renamed by
appending a Z, to make sure that no function call was accidentally
forgotten.  They will be renamed back in a follow-up commit.

As usual, the scope of a few affected variables has been reduced, and
some variables had to be split since they had been incorrectly merged
before.

The order of the arguments to Buf_AddBytes has changed from (mem_len,
mem) to (mem, mem_len), in order to make it consistent with the
functions from the C standard library, such as snprintf.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/make/buf.c
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/make/buf.h
cvs rdiff -u -r1.86 -r1.87 src/usr.bin/make/cond.c
cvs rdiff -u -r1.58 -r1.59 src/usr.bin/make/for.c
cvs rdiff -u -r1.293 -r1.294 src/usr.bin/make/main.c
cvs rdiff -u -r1.387 -r1.388 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