diff --git a/src/sdl-instead/util.c b/src/sdl-instead/util.c index d1e69f7..f83c5c3 100644 --- a/src/sdl-instead/util.c +++ b/src/sdl-instead/util.c @@ -20,15 +20,20 @@ char *getpath(const char *d, const char *n) return p; } +static int is_space(int c) +{ + return (c == ' ' || c == '\t'); +} + char *strip(char *s) { char *e; - while (isspace(*s)) + while (is_space(*s)) s ++; if (!*s) return s; e = s + strlen(s) - 1; - while (e != s && isspace(*e)) { + while (e != s && is_space(*e)) { *e = 0; e --; }