Lines Matching refs:s1
47 * The prefix function returns 0 if *s1 is not a prefix
48 * of *s2. If *s1 exactly matches *s2, the negative of
49 * the length is returned. If *s1 is a prefix of *s2,
50 * the length of *s1 is returned.
53 isprefix(const char *s1, const char *s2)
58 if (*s1 == '\0')
60 os1 = s1;
61 c1 = *s1;
66 c1 = *++s1;
69 return(*s1 ? 0 : (*s2 ? (s1 - os1) : (os1 - s1)));