| 1 | /* Header for environment manipulation library. |
| 2 | Copyright (C) 1989, Free Software Foundation. |
| 3 | |
| 4 | This program is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation; either version 1, or (at your option) |
| 7 | any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program; if not, write to the Free Software |
| 16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 17 | |
| 18 | /* We manipulate environments represented as these structures. */ |
| 19 | |
| 20 | struct environ |
| 21 | { |
| 22 | /* Number of usable slots allocated in VECTOR. |
| 23 | VECTOR always has one slot not counted here, |
| 24 | to hold the terminating zero. */ |
| 25 | int allocated; |
| 26 | /* A vector of slots, ALLOCATED + 1 of them. |
| 27 | The first few slots contain strings "VAR=VALUE" |
| 28 | and the next one contains zero. |
| 29 | Then come some unused slots. */ |
| 30 | char **vector; |
| 31 | }; |
| 32 | |
| 33 | struct environ *make_environ (); |
| 34 | void free_environ (); |
| 35 | void init_environ (); |
| 36 | char *get_in_environ (); |
| 37 | void set_in_environ (); |
| 38 | void unset_in_environ (); |
| 39 | char **environ_vector (); |