simplifying the code and improving its portability. It also adds a
delay option from OpenBSD, to allow reasonable speed display on fast
terminals, adds use of const, and fixes signal handling and use of
errx() where appropriate.
Patch supplied in PR 6661 by Joseph Myers <jsm28@cam.ac.uk>.