apply.c: split check_whitespace() into two