
/*
The following two routines check the string they are passed to see if it has 
any illegal characters.  If it does, a pointer to the bad character is 
returned; otherwise NULL is returned.
*/

STRING
bad_INTEGER (string)

STRING	string;
{
if (*string == '+' || *string == '-')
    string++;
while (isdigit (*string++));
if (*--string)
    return (string);
else
    return (NULL);
}

STRING
bad_REAL (string)

STRING	string;
{
IMPORTED INTEGER	atod ();	/* This way gives pntr to non-valid */

if (*(string = (STRING)atod (string)))
    return (string);
else
    return (NULL);
}
