fix wide scanf's handling of input failure on %c, and simplify %[