summaryrefslogtreecommitdiff
path: root/man/env.3
diff options
context:
space:
mode:
Diffstat (limited to 'man/env.3')
-rw-r--r--man/env.368
1 files changed, 68 insertions, 0 deletions
diff --git a/man/env.3 b/man/env.3
new file mode 100644
index 0000000..c8d0bf2
--- /dev/null
+++ b/man/env.3
@@ -0,0 +1,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)