FreeBSD/usr.sbin/rwhod/rwhod.c
/*
 * Check out host name for unprintables
 * and other funnies before allowing a file
 * to be created.  Sorry, but blanks aren't allowed.
 */
Check out host name for unprintables
and other funnies before allowing a file
to be created.  Sorry, but blanks aren't allowed.
Check out host name for unprintables and other funnies before allowing a file to be created . Sorry but blanks aren ' t allowed .
int
verify(char *name, int maxlen)
{
	int size;
	size = 0;
	while (*name != '\0' && size < maxlen - 1) {
		if (!isascii((unsigned char)*name) ||
		    !(isalnum((unsigned char)*name) ||
		    ispunct((unsigned char)*name))) {
			return (0);
		}
		name++;
		size++;
	}
	*name = '\0';
	return (size > 0);
}
int verify ( char * name , int maxlen ) { int size ; size = 0 ; while ( * name != ' \0 ' && size < maxlen - 1 ) { if ( ! isascii ( ( unsigned char ) * name ) || ! ( isalnum ( ( unsigned char ) * name ) || ispunct ( ( unsigned char ) * name ) ) ) { return ( 0 ) ; } name ++ ; size ++ ; } * name = ' \0 ' ; return ( size > 0 ) ; }
Check out host name for unprintables
 and other funnies before allowing a file
 to be created.
Check out host name for unprintables and other funnies before allowing a file to be created .