add in actual getenv_quad function

This commit is contained in:
Matt Jacob 1999-11-07 01:10:30 +00:00
parent 88002b4c38
commit c1dc94eeb5

View File

@ -69,6 +69,22 @@ getenv(char *name)
*/
int
getenv_int(char *name, int *data)
{
quad_t tmp;
int rval;
rval = getenv_quad(name, &tmp);
if (rval) {
*data = (int) tmp;
}
return (rval);
}
/*
* Return a quad_t value from an environment variable.
*/
quad_t
getenv_quad(char *name, quad_t *data)
{
const char *value, *vtp;
quad_t iv;
@ -80,7 +96,7 @@ getenv_int(char *name, int *data)
if ((vtp == value) || (*vtp != 0))
return(0);
*data = (int)iv;
*data = iv;
return(1);
}