isspace to is_space -- due strange bug in win

This commit is contained in:
p.kosyh 2009-09-10 04:40:12 +00:00
parent 9a202692d2
commit df72a929d5

View file

@ -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 --;
}