/* simple conversion of two-digit string with error checking  */
static int cnvrt2(char *str, int *valp)
/* simple conversion of two-digit string with error checking  */
static int cnvrt2(char *str, int *valp)
{
	int val;
	if ((*str < '0') || (*str > '9'))
		return (-1);
	val = *str - '0';
	++str;
	if ((*str < '0') || (*str > '9'))
		return (-1);
	*valp = 10 * val + (*str - '0');
	return (0);
}