ca5656172e
Most of this is cleaning up, but there are some functional changes, doc/comment improvements, error checking, gcc -Wall cleanups. Input buffer flushing is enabled now, although I'm still not quite certain it's right.