1 /* Header for environment manipulation library.
2 Copyright (C) 1989-2016 Free Software Foundation, Inc.
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 3 of the License, or
7 (at your option) any later version.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 #if !defined (ENVIRON_H)
20 /* We manipulate environments represented as these structures. */
24 /* Number of usable slots allocated in VECTOR.
25 VECTOR always has one slot not counted here,
26 to hold the terminating zero. */
28 /* A vector of slots, ALLOCATED + 1 of them.
29 The first few slots contain strings "VAR=VALUE"
30 and the next one contains zero.
31 Then come some unused slots. */
35 extern struct gdb_environ *make_environ (void);
37 extern void free_environ (struct gdb_environ *);
39 extern void init_environ (struct gdb_environ *);
41 extern char *get_in_environ (const struct gdb_environ *, const char *);
43 extern void set_in_environ (struct gdb_environ *, const char *, const char *);
45 extern void unset_in_environ (struct gdb_environ *, const char *);
47 extern char **environ_vector (struct gdb_environ *);
49 #endif /* defined (ENVIRON_H) */