.\" based on the description in glibc source and infopages
.\"
.\" Corrections and additions, aeb
-.TH ENVZ_ADD 3 2015-03-02 "" "Linux Programmer's Manual"
+.TH ENVZ_ADD 3 2017-09-15 "" "Linux Programmer's Manual"
.SH NAME
envz_add, envz_entry, envz_get, envz_merge,
envz_remove, envz_strip \- environment string support
.fi
.SH DESCRIPTION
These functions are glibc-specific.
-.LP
+.PP
An argz vector is a pointer to a character buffer together with a length,
see
.BR argz_add (3).
to be the value.
If there is no \(aq=\(aq, the value is taken to be NULL.
(While the value in case of a trailing \(aq=\(aq is the empty string "".)
-.LP
+.PP
These functions are for handling envz vectors.
-.LP
+.PP
.BR envz_add ()
adds the string
.RI \&" name = value \&"
If an entry with the same
.I name
existed, it is removed.
-.LP
+.PP
.BR envz_entry ()
looks for
.I name
in the envz vector
.RI ( envz ,\ envz_len )
and returns the entry if found, or NULL if not.
-.LP
+.PP
.BR envz_get ()
looks for
.I name
an entry for
.I name
without \(aq=\(aq sign.)
-.LP
+.PP
.BR envz_merge ()
adds each entry in
.I envz2
will supersede those with the same name in
.IR *envz ,
otherwise not.
-.LP
+.PP
.BR envz_remove ()
removes the entry for
.I name
from
.RI ( *envz ,\ *envz_len )
if there was one.
-.LP
+.PP
.BR envz_strip ()
removes all entries with value NULL.
.SH RETURN VALUE
.BR envz_strip ()
T} Thread safety MT-Safe
.TE
-
+.sp 1
.SH CONFORMING TO
These functions are a GNU extension.
Handle with care.
.SH EXAMPLE
-.nf
+.EX
#include <stdio.h>
#include <stdlib.h>
#include <envz.h>
printf("%s\en", str);
exit(EXIT_SUCCESS);
}
-.fi
+.EE
.SH SEE ALSO
.BR argz_add (3)