Pass int instead of char to iscntrl() and isspace() because that's what they require...