X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/e19206c2bfbd24ae9eceb5fbba9324fdcb3a544f..3bc429127d05ea3c84e3c151d53ad3546bea5e9b:/man/env.3 diff --git a/man/env.3 b/man/env.3 index 7894d7c..1818b37 100644 --- a/man/env.3 +++ b/man/env.3 @@ -1,7 +1,7 @@ .\" -*-nroff-*- -.TH env 3 "26 July 1999" mLib +.TH env 3 "26 July 1999" "Straylight/Edgeware" "mLib utilities library" .SH "NAME" -env \- efficient fiddline with environment variables +env \- efficient fiddling with environment variables .\" @env_get .\" @env_put .\" @env_import @@ -12,7 +12,7 @@ env \- efficient fiddline with environment variables .B "#include " .BI "char *env_get(sym_table *" t ", const char *" name ); -.BI "void env_put(sym_table * " t , +.BI "void env_put(sym_table *" t , .BI " const char *" name ", const char *" value ); .BI "void env_import(sym_table *" t ", char **" env ); .BI "char **env_export(sym_table *" t ); @@ -39,9 +39,9 @@ The function .B env_export creates a Unix environment array from a symbol table. The environment array is one big block of memory allocated using -.BR malloc (3); +.BR xmalloc (3); hence, one call to -.BR free (3) +.BR xfree (3) releases all the memory used for the pointer array and the strings. .PP The @@ -59,7 +59,8 @@ argument contains an character, it is assumed to be of the form .IB n = v\fR; the -.I value argument is ignored, and the variable +.I value +argument is ignored, and the variable .I n is assigned the value .IR v . @@ -67,8 +68,8 @@ Otherwise, if .I value is not a null pointer, the variable .I name -is assigned the value -.I value . +is assigned +.IR value . Finally, if .I value is null, the variable @@ -77,10 +78,10 @@ is deleted. .PP The .B env_destroy -function frees all the memory used by an environment symbol table. The -table itself is destroyed too. +function frees an environment symbol table, together with all of the +environment variables. .SH "SEE ALSO" .BR sym (3), .BR mLib (3). .SH "AUTHOR" -Mark Wooding, +Mark Wooding,