]> 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
c5aa993b
JM
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 2 of the License, or
7 (at your option) any later version.
c906108c 8
c5aa993b
JM
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.
c906108c 13
c5aa993b
JM
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., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
c906108c
SS
18
19#if !defined (ENVIRON_H)
20#define ENVIRON_H 1
21
22/* We manipulate environments represented as these structures. */
23
24struct environ
c5aa993b
JM
25 {
26 /* Number of usable slots allocated in VECTOR.
27 VECTOR always has one slot not counted here,
28 to hold the terminating zero. */
29 int allocated;
30 /* A vector of slots, ALLOCATED + 1 of them.
31 The first few slots contain strings "VAR=VALUE"
32 and the next one contains zero.
33 Then come some unused slots. */
34 char **vector;
35 };
c906108c
SS
36
37extern struct environ *
c5aa993b 38 make_environ PARAMS ((void));
c906108c
SS
39
40extern void
41free_environ PARAMS ((struct environ *));
42
43extern void
44init_environ PARAMS ((struct environ *));
45
46extern char *
c5aa993b 47 get_in_environ PARAMS ((const struct environ *, const char *));
c906108c
SS
48
49extern void
50set_in_environ PARAMS ((struct environ *, const char *,
51 const char *));
52
53extern void
54unset_in_environ PARAMS ((struct environ *, char *));
55
56extern char **
c5aa993b 57 environ_vector PARAMS ((struct environ *));
c906108c 58
c5aa993b 59#endif /* defined (ENVIRON_H) */