mirror of https://github.com/NetBSD/src.git
6dc5a3c0cc
Ensure we break ties in every case. This way, even though we use the unstable qsort(3) library routine, the output is reproducible, no matter what algorithm is behind qsort(3). It would be nice if we could just use a stable sort function here, but mergesort(3) is nonstandard, so we'd have to add it to tools/compat, which is a big pain. Instead, put a tie-breaking rule in every comparison function we use with qsort, and abort() in the event of ties -- that way, we noisily refuse to rely on unstable sort order. While here, dispense with any question of integer overflow, and sprinkle comments. PR bin/58115 |
||
---|---|---|
.. | ||
Makefile | ||
TODO | ||
config.1 | ||
config.5 | ||
config.samples.5 | ||
defs.h | ||
files.c | ||
gram.y | ||
hash.c | ||
lint.c | ||
main.c | ||
mkdevsw.c | ||
mkheaders.c | ||
mkioconf.c | ||
mkmakefile.c | ||
mkswap.c | ||
pack.c | ||
scan.l | ||
sem.c | ||
sem.h | ||
util.c |