xref: /titanic_41/usr/src/lib/libshell/common/include/env.h (revision d5ace9454616652a717c9831d949dffa319381f9)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1982-2008 AT&T Intellectual Property          *
5 *                      and is licensed under the                       *
6 *                  Common Public License, Version 1.0                  *
7 *                    by AT&T Intellectual Property                     *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *            http://www.opensource.org/licenses/cpl1.0.txt             *
11 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                  David Korn <dgk@research.att.com>                   *
18 *                                                                      *
19 ***********************************************************************/
20 #pragma prototyped
21 #ifndef  _ENV_H
22 #define	_ENV_H	1
23 
24 #ifdef _BLD_env
25 #    ifdef __EXPORT__
26 #	define export	__EXPORT__
27 #    endif
28 #else
29      typedef void *Env_t;
30 #endif
31 
32 /* for use with env_open */
33 #define ENV_STABLE	(-1)
34 
35 /* for third agument to env_add */
36 #define ENV_MALLOCED	1
37 #define ENV_STRDUP	2
38 
39 extern void	env_close(Env_t*);
40 extern int	env_add(Env_t*, const char*, int);
41 extern int	env_delete(Env_t*, const char*);
42 extern char	**env_get(Env_t*);
43 extern Env_t	*env_open(char**,int);
44 extern Env_t	*env_scope(Env_t*,int);
45 
46 #undef extern
47 
48 #endif
49 
50 
51