#ifndef HAVE_STRCSPN /* * strcspn - find length of initial segment of s1 consisting entirely * of characters not from s2 */ static size_t strcspn(s1, s2) const char_u *s1; const char_u *s2; { register char_u *scan1; register char_u *scan2; register int count; count = 0; for (scan1 = s1; *scan1 != '\0'; scan1++) { for (scan2 = s2; *scan2 != '\0';) /* ++ moved down. */ if (*scan1 == *scan2++) return count; count++; } return count; } #endif