FreeBSD/contrib/ntp/ntpd/ntp_scanner.c
/* U_int -- assumes is_integer() has returned FALSE */
- assumes is_integer() has returned FALSE
- assumes is_integer () has returned FALSE
static int
is_u_int(
	char *lexeme
	)
{
	int	i;
	int	is_hex;
	i = 0;
	if ('0' == lexeme[i] && 'x' == tolower((u_char)lexeme[i + 1])) {
		i += 2;
		is_hex = TRUE;
	} else {
		is_hex = FALSE;
	}
	for (; lexeme[i] != '\0'; i++) {
		if (is_hex && !isxdigit((u_char)lexeme[i]))
			return FALSE;
		if (!is_hex && !isdigit((u_char)lexeme[i]))
			return FALSE;
	}
	return TRUE;
}
static int is_u_int ( char * lexeme ) { int i ; int is_hex ; i = 0 ; if ( ' ' == lexeme [ i ] && ' ' == tolower ( ( u_char ) lexeme [ i + 1 ] ) ) { i += 2 ; is_hex = TRUE ; } else { is_hex = FALSE ; } for ( ; lexeme [ i ] != ' \0 ' ; i ++ ) { if ( is_hex && ! isxdigit ( ( u_char ) lexeme [ i ] ) ) return FALSE ; if ( ! is_hex && ! isdigit ( ( u_char ) lexeme [ i ] ) ) return FALSE ; } return TRUE ; }
U_int -- assumes is_integer() has returned FALSE
U_int -- assumes is_integer () has returned FALSE
/* Check that all the remaining characters are digits */