FEAT: added widechar support for INPUT on Linux.

FIX: incorrect flags defined for terminal on Linux.
FIX: calc moved size incorrectly in string/remove-char.
FEAT: minor code tidy up.