FreeBSD/usr.sbin/gpioctl/gpioctl.c
/*
 * Our handmade function for converting string to number
 */
Our handmade function for converting string to number
Our handmade function for converting string to number
static int
str2int(const char *s, int *ok)
{
	char *endptr;
	int res = strtod(s, &endptr);
	if (endptr != s + strlen(s) )
		*ok = 0;
	else
		*ok = 1;
	return res;
}
static int str2int ( const char * s , int * ok ) { char * endptr ; int res = strtod ( s , & endptr ) ; if ( endptr != s + strlen ( s ) ) * ok = 0 ; else * ok = 1 ; return res ; }
Our handmade function for converting string to number
Our handmade function for converting string to number