2 .TH env 3 "26 July 1999" "Straylight/Edgeware" "mLib utilities library"
4 env \- efficient fiddling with environment variables
12 .B "#include <mLib/env.h>"
14 .BI "char *env_get(sym_table *" t ", const char *" name );
15 .BI "void env_put(sym_table *" t ,
16 .BI " const char *" name ", const char *" value );
17 .BI "void env_import(sym_table *" t ", char **" env );
18 .BI "char **env_export(sym_table *" t );
23 header manipulate environment variables stored in a hash table.
27 reads a standard Unix environment array and stores the variables in the
28 symbol table. (A standard Unix environment array is an array of
29 pointers to strings of the form
31 terminated by a null pointer. This format is used for the global
35 function.) The symbol table must have already been created (see
40 creates a Unix environment array from a symbol table. The environment
41 array is one big block of memory allocated using
45 releases all the memory used for the pointer array and the strings.
49 function looks up a variable in an environment symbol table. The
50 returned result is the variable's value if it exists, or a null pointer
55 function sets or deletes environment variables. If the
59 character, it is assumed to be of the form
63 argument is ignored, and the variable
69 is not a null pointer, the variable
81 function frees an environment symbol table, together with all of the
82 environment variables.
87 Mark Wooding, <mdw@distorted.org.uk>