Home | History | Annotate | Download | only in xargs

Lines Matching defs:s1

40 	char *s1, *s2, *this;
42 s1 = *str;
43 if (s1 == NULL)
46 * If maxsize is 0 then set it to to the length of s1, because we have
47 * to duplicate s1. XXX we maybe should double-check whether the match
48 * appears in s1. If it doesn't, then we also have to set the length
49 * to the length of s1, to avoid modifying the argument. It may make
50 * sense to check if maxsize is <= strlen(s1), because in that case we
55 maxsize = strlen(s1) + 1;
64 if (match == NULL || replstr == NULL || maxsize == strlen(s1)) {
65 (void)strlcpy(s2, s1, maxsize);
70 this = strstr(s1, match);
73 if ((strlen(s2) + strlen(s1) + strlen(replstr) -
75 (void)strlcat(s2, s1, maxsize);
78 (void)strncat(s2, s1, (uintptr_t)this - (uintptr_t)s1);
80 s1 = this + strlen(match);
82 (void)strcat(s2, s1);