usr.bin/patch/inp.c
static bool
rev_in_string(const char *string)
{
	const char	*s;
	size_t		patlen;

	if (revision == NULL)
		return true;
	patlen = strlen(revision);
	if (strnEQ(string, revision, patlen) && isspace((unsigned char)string[patlen]))
		return true;
	for (s = string; *s; s++) {
		if (isspace((unsigned char)*s) && strnEQ(s + 1, revision, patlen) &&
		    isspace((unsigned char)s[patlen + 1])) {
			return true;
		}
	}
	return false;
}
/*
 * True if the string argument contains the revision number we want.
 */
True if the string argument contains the revision number we want.
True if the string argument contains the revision number we want .
static bool
rev_in_string(const char *string)
{
	const char	*s;
	size_t		patlen;
	if (revision == NULL)
		return true;
	patlen = strlen(revision);
	if (strnEQ(string, revision, patlen) && isspace((unsigned char)string[patlen]))
		return true;
	for (s = string; *s; s++) {
		if (isspace((unsigned char)*s) && strnEQ(s + 1, revision, patlen) &&
		    isspace((unsigned char)s[patlen + 1])) {
			return true;
		}
	}
	return false;
}
static bool rev_in_string ( const char * string ) { const char * s ; size_t patlen ; if ( revision == NULL ) return true ; patlen = strlen ( revision ) ; if ( strnEQ ( string , revision , patlen ) && isspace ( ( unsigned char ) string [ patlen ] ) ) return true ; for ( s = string ; * s ; s ++ ) { if ( isspace ( ( unsigned char ) * s ) && strnEQ ( s + 1 , revision , patlen ) && isspace ( ( unsigned char ) s [ patlen + 1 ] ) ) { return true ; } } return false ; }
True if the string argument contains the revision number we want.
True if the string argument contains the revision number we want .