Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   kre
Date:           Mon Apr 29 07:55:38 UTC 2019

Modified Files:
        src/common/lib/libutil: snprintb.c
        src/lib/libutil: snprintb.3
        src/sys/sys: mman.h
        src/tests/lib/libutil: t_snprintb.c

Log Message:
snprintb(3) says that, in the new(?) Torek format, all fields specs end with \0
The F spec is one of those, it should be terminated with \0 just like all
the others (irrelevant that it has no extra data to delimit).

Fix <sys/mman.h> to define the snprintb() format string correctly (include
the missing \0's).   Fix the copy of that definition included into
snprintb(3) to match the updated mman.h version (ride the date bump
from the day before yesterday .. this is the same change, just corrected).

Undo the previous snprintb.c change ("off by one" fix) which was an
attempt to make the broken mman.h usage work (and did, but not the way
it should be done).   Also, after using the new * format (instead of only
when something has already matched) skip the associated data so we don't
attempt to interpret it as more field specifiers.  This func needs lots of TLC!

Fix the ATF tests for snprintb() to not assume that F format is really
exactly like f format, and has data after the field specifier.  It doesn't.
Add several more tests (including testing the '*' field operator
recently added).


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/common/lib/libutil/snprintb.c
cvs rdiff -u -r1.20 -r1.21 src/lib/libutil/snprintb.3
cvs rdiff -u -r1.58 -r1.59 src/sys/sys/mman.h
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libutil/t_snprintb.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