2012-03-08 Luis Machado <lgustavo@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / environ.h
CommitLineData
c906108c 1/* Header for environment manipulation library.
0b302171
JB
2 Copyright (C) 1989, 1992, 2000, 2005, 2007-2012 Free Software
3 Foundation, Inc.
c906108c 4
c5aa993b
JM
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
a9762ec7 7 the Free Software Foundation; either version 3 of the License, or
c5aa993b 8 (at your option) any later version.
c906108c 9
c5aa993b
JM
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
c906108c 14
c5aa993b 15 You should have received a copy of the GNU General Public License
a9762ec7 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c
SS
17
18#if !defined (ENVIRON_H)
19#define ENVIRON_H 1
20
21/* We manipulate environments represented as these structures. */
22
1bf1958d 23struct gdb_environ
c5aa993b
JM
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 };
c906108c 35
1bf1958d 36extern struct gdb_environ *make_environ (void);
c906108c 37
1bf1958d 38extern void free_environ (struct gdb_environ *);
c906108c 39
1bf1958d 40extern void init_environ (struct gdb_environ *);
c906108c 41
1bf1958d 42extern char *get_in_environ (const struct gdb_environ *, const char *);
c906108c 43
1bf1958d 44extern void set_in_environ (struct gdb_environ *, const char *, const char *);
c906108c 45
1bf1958d 46extern void unset_in_environ (struct gdb_environ *, char *);
c906108c 47
1bf1958d 48extern char **environ_vector (struct gdb_environ *);
c906108c 49
c5aa993b 50#endif /* defined (ENVIRON_H) */
This page took 0.833262 seconds and 4 git commands to generate.