xref: /titanic_51/usr/src/lib/libast/common/comp/wordexp.h (revision 565679070e884800f5d041d42d226813c0bbf6d8)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *          Copyright (c) 1985-2009 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 *                 Glenn Fowler <gsf@research.att.com>                  *
18 *                  David Korn <dgk@research.att.com>                   *
19 *                   Phong Vo <kpv@research.att.com>                    *
20 *                                                                      *
21 ***********************************************************************/
22 #pragma prototyped
23 /*
24  * posix wordexp interface definitions
25  */
26 
27 #ifndef _WORDEXP_H
28 #define _WORDEXP_H
29 
30 #include <ast_common.h>
31 
32 #define WRDE_APPEND	01
33 #define WRDE_DOOFFS	02
34 #define WRDE_NOCMD	04
35 #define WRDE_NOSYS	0100
36 #define WRDE_REUSE	010
37 #define WRDE_SHOWERR	020
38 #define WRDE_UNDEF	040
39 
40 #define WRDE_BADCHAR	1
41 #define WRDE_BADVAL	2
42 #define WRDE_CMDSUB	3
43 #define WRDE_NOSPACE	4
44 #define WRDE_SYNTAX	5
45 #define WRDE_NOSHELL	6
46 
47 typedef struct _wdarg
48 {
49 	size_t	we_wordc;
50 	char	**we_wordv;
51 	size_t	we_offs;
52 } wordexp_t;
53 
54 #if _BLD_ast && defined(__EXPORT__)
55 #define extern		__EXPORT__
56 #endif
57 
58 extern int wordexp(const char*, wordexp_t*, int);
59 extern int wordfree(wordexp_t*);
60 
61 #undef	extern
62 
63 #endif /* _WORDEXP_H */
64