return name;
}
+static int is_sep(char c)
+{
+ const char *seps = PATH_SEPS;
+
+ for (seps = PATH_SEPS; *seps; seps++) {
+ if (*seps == c)
+ return 1;
+ }
+
+ return 0;
+}
//
// Return 'item'nth element of semicolon-seperated pathnames specified in the
return 0;
while (itemno--)
- while (*s != EOS && *s++ != ';')
+ while (*s != EOS && !is_sep(*s++))
;
if (*s == EOS)
return 0;
- while (*s != EOS && *s != ';')
+ while (*s != EOS && !is_sep(*s))
*buf++ = *s++;
*buf++ = EOS;