Your approach to writing strstris fundamentally wrong. Let's see what you wrote:
char const *ret = sub;
int r = 0;
while ( ret = strchr( ret, *sub ) ) {
if ( strcmp( ++ret, sub+1 ) == 0 ){
r = 1;
}
else{
r = 0;
}
}
return r;
, ret, sub, sub s. , ret s...
ret = strchr( ret, *sub ) sub ret, ret, .
strcmp( ++ret, sub+1 ), , , ret, , sub, ret, ( , ).
, , . , s, s .
, :
sub s. , false.s,- ,
sub n, , n s sub ( s). , true. s .
, - sub, . , sub sub s, , sub. , s , , .