reformat; use getopt(3); lint cleanups; don't assume 24 row terminal;