1 /*
2  * BEGIN illumos section
3  *   This is an unstable interface; changes may be made
4  *   without notice.
5  * END illumos section
6  */
7 /***********************************************************************
8 *                                                                      *
9 *               This software is part of the ast package               *
10 *          Copyright (c) 1985-2011 AT&T Intellectual Property          *
11 *                      and is licensed under the                       *
12 *                 Eclipse Public License, Version 1.0                  *
13 *                    by AT&T Intellectual Property                     *
14 *                                                                      *
15 *                A copy of the License is available at                 *
16 *          http://www.eclipse.org/org/documents/epl-v10.html           *
17 *         (with md5 checksum b35adb5213ca9657e911e9befb180842)         *
18 *                                                                      *
19 *              Information and Software Systems Research               *
20 *                            AT&T Research                             *
21 *                           Florham Park NJ                            *
22 *                                                                      *
23 *                 Glenn Fowler <gsf@research.att.com>                  *
24 *                  David Korn <dgk@research.att.com>                   *
25 *                   Phong Vo <kpv@research.att.com>                    *
26 *                                                                      *
27 ***********************************************************************/
28 #pragma prototyped
29 /*
30  * posix wordexp interface definitions
31  */
32 
33 #ifndef _WORDEXP_H
34 #define _WORDEXP_H
35 
36 #include <ast_common.h>
37 
38 #define WRDE_APPEND	01
39 #define WRDE_DOOFFS	02
40 #define WRDE_NOCMD	04
41 #define WRDE_NOSYS	0100
42 #define WRDE_REUSE	010
43 #define WRDE_SHOWERR	020
44 #define WRDE_UNDEF	040
45 
46 #define WRDE_BADCHAR	1
47 #define WRDE_BADVAL	2
48 #define WRDE_CMDSUB	3
49 #define WRDE_NOSPACE	4
50 #define WRDE_SYNTAX	5
51 #define WRDE_NOSHELL	6
52 
53 typedef struct _wdarg
54 {
55 	size_t	we_wordc;
56 	char	**we_wordv;
57 	size_t	we_offs;
58 } wordexp_t;
59 
60 #if _BLD_ast && defined(__EXPORT__)
61 #define extern		__EXPORT__
62 #endif
63 
64 extern int wordexp(const char*, wordexp_t*, int);
65 extern int wordfree(wordexp_t*);
66 
67 #undef	extern
68 
69 #endif /* _WORDEXP_H */
70