* Copyright (c) 1980 The Regents of the University of California.
* This module is believed to contain source code proprietary to AT&T.
* Use and redistribution is subject to the Berkeley Software License
* Agreement and your Software Agreement with AT&T (Western Electric).
static char sccsid
[] = "@(#)getenv_.c 5.2 (Berkeley) 4/12/91";
* return environment variables
* call getenv (ENV_NAME, evar)
* ENV_NAME is the name of an environment variable
* evar is a character variable which will receive
* the current value of ENV_NAME,
* or all blanks if ENV_NAME is not defined
getenv_(fname
, value
, flen
, vlen
)
register char **env
= environ
;
for (fp
=fname
, i
=0; i
<= flen
; i
++) {
if (i
== flen
|| *fp
== ' ') {
else if (*ep
++ != *fp
++) break;
b_char(" ", value
, vlen
);