log: fix building with NDEBUG.
sources/terminal: exit on EOF.
terminal: allow toggling all inputs ('-'); refactor input reading.