]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/environ.h
import gdb-1999-07-07 post reformat
[thirdparty/binutils-gdb.git] / gdb / environ.h
CommitLineData
c906108c
SS
1/* Header for environment manipulation library.
2 Copyright 1989, 1992 Free Software Foundation.
3
4This program is free software; you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation; either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17
18#if !defined (ENVIRON_H)
19#define ENVIRON_H 1
20
21/* We manipulate environments represented as these structures. */
22
23struct environ
24{
25 /* Number of usable slots allocated in VECTOR.
26 VECTOR always has one slot not counted here,
27 to hold the terminating zero. */
28 int allocated;
29 /* A vector of slots, ALLOCATED + 1 of them.
30 The first few slots contain strings "VAR=VALUE"
31 and the next one contains zero.
32 Then come some unused slots. */
33 char **vector;
34};
35
36extern struct environ *
37make_environ PARAMS ((void));
38
39extern void
40free_environ PARAMS ((struct environ *));
41
42extern void
43init_environ PARAMS ((struct environ *));
44
45extern char *
46get_in_environ PARAMS ((const struct environ *, const char *));
47
48extern void
49set_in_environ PARAMS ((struct environ *, const char *,
50 const char *));
51
52extern void
53unset_in_environ PARAMS ((struct environ *, char *));
54
55extern char **
56environ_vector PARAMS ((struct environ *));
57
58#endif /* defined (ENVIRON_H) */