xref: /illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/include/env.h (revision b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1982-2011 AT&T Intellectual Property          *
5 *                      and is licensed under the                       *
6 *                 Eclipse Public License, Version 1.0                  *
7 *                    by AT&T Intellectual Property                     *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *          http://www.eclipse.org/org/documents/epl-v10.html           *
11 *         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
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