blob: c8d0bf212fc11bed79e3ab7d7068fea718500960 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
.TH qlibs: env 3
.SH NAME
env \- manage variables in the environment
.SH SYNTAX
.B #include \(dqenv.h\(dq
char **\fBenviron\fP;
char *\fBenv_put\fP(char *\fINAME\fR,char *\fIvalue\fR);
.br
char *\fBenv_puts\fP(char *\fINAME=value\fR);
.br
char *\fBenv_set\fP(char *\fINAME=value\fR);
.br
char *\fBenv_unset\fP(char *\fINAME\fR);
.br
char *\fBenv_get\fP(char *\fINAME\fR);
.br
char *\fBenv_pick\fP();
.br
char *\fBenv_clear\fP();
.SH DESCRIPTION
The environment,
.BR environ ,
is a 0-terminated array of 0-terminated strings,
called environment variables.
Each environment variable is of the form
.IR NAME\fB=\fIvalue .
.B env_puts
puts the string
.I \'NAME=value\'
into the environment.
.B env_put
assigns the new enviromment variable
.I NAME
with
.IR value .
.B env_set
assigns an existing environment variable
.I NAME
with
.IR value :
.IR \'NAME=value\' .
.B env_unset
unsets an existing environment variable given as
.IR NAME .
.B env_get
returns the assigned value of the first variable whose name is
.IR NAME ,
or
.I 0
if there is no such variable.
.B env_pick
returns any variable in the environment,
or
.I 0
if the environment is empty.
.B env_clear
clears the whole envionment.
.SH "SEE ALSO"
environ(7)
|