plan9port/man/man3/getenv.3
Russ Cox 977b25a76a tmac: introduce real manual reference macro instead of overloading IR
The overloading of IR emits magic \X'...' sequences that turn into HTML manual links.
But not all such IR invocations should be manual links;
those had to be written to avoid the IR macro before.
Worse, the \X'...' ending the IR causes troff to emit only a single space after a period.

Defining a new IM macro for manual references fixes both problems.

Fixes #441.
2020-08-13 23:43:43 -04:00

47 lines
738 B
Groff

.TH GETENV 3
.SH NAME
getenv, putenv \- access environment variables
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.PP
.nf
.B
char* getenv(char *name)
.br
.B
int putenv(char *name, char *val)
.fi
.SH DESCRIPTION
.I Getenv
fetches the environment value associated with
.I name
into memory allocated with
.IM malloc (3) ,
0-terminates it,
and returns a pointer to that area.
If no file exists, 0
is returned.
.PP
.I Putenv
sets the environment value associated with
.I name
to
.IR val .
.SH SOURCE
.B \*9/src/lib9/getenv.c
.SH DIAGNOSTICS
Sets
.IR errstr .
.SH BUGS
To avoid name conflicts with the underlying system,
.I getenv
and
.I putenv
are preprocessor macros defined as
.I p9getenv
and
.IR p9putenv ;
see
.IM intro (3) .