GDB (API)
/home/stan/gdb/src/gdb/environ.h
Go to the documentation of this file.
00001 /* Header for environment manipulation library.
00002    Copyright (C) 1989-2013 Free Software Foundation, Inc.
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 3 of the License, or
00007    (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00016 
00017 #if !defined (ENVIRON_H)
00018 #define ENVIRON_H 1
00019 
00020 /* We manipulate environments represented as these structures.  */
00021 
00022 struct gdb_environ
00023   {
00024     /* Number of usable slots allocated in VECTOR.
00025        VECTOR always has one slot not counted here,
00026        to hold the terminating zero.  */
00027     int allocated;
00028     /* A vector of slots, ALLOCATED + 1 of them.
00029        The first few slots contain strings "VAR=VALUE"
00030        and the next one contains zero.
00031        Then come some unused slots.  */
00032     char **vector;
00033   };
00034 
00035 extern struct gdb_environ *make_environ (void);
00036 
00037 extern void free_environ (struct gdb_environ *);
00038 
00039 extern void init_environ (struct gdb_environ *);
00040 
00041 extern char *get_in_environ (const struct gdb_environ *, const char *);
00042 
00043 extern void set_in_environ (struct gdb_environ *, const char *, const char *);
00044 
00045 extern void unset_in_environ (struct gdb_environ *, char *);
00046 
00047 extern char **environ_vector (struct gdb_environ *);
00048 
00049 #endif /* defined (ENVIRON_H) */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines