1 /* Copyright (C) 2002, 2010 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
10 #include <sys/types.h>
18 size_t we_wordc
; /* Count of words matched by words. */
19 char **we_wordv
; /* Pointer to list of expanded words. */
20 size_t we_offs
; /* Slots to reserve at the beginning of we_wordv. */
23 typedef struct _wordexp_t wordexp_t
;
25 #define WRDE_DOOFFS 0x0001 /* Use we_offs. */
26 #define WRDE_APPEND 0x0002 /* Append to output from previous call. */
27 #define WRDE_NOCMD 0x0004 /* Don't perform command substitution. */
28 #define WRDE_REUSE 0x0008 /* pwordexp points to a wordexp_t struct returned from
29 a previous successful call to wordexp. */
30 #define WRDE_SHOWERR 0x0010 /* Print error messages to stderr. */
31 #define WRDE_UNDEF 0x0020 /* Report attempt to expand undefined shell variable. */
43 /* Note: This implementation of wordexp requires a version of bash
44 that supports the --wordexp and --protected arguments to be present
45 on the system. It does not support the WRDE_UNDEF flag. */
46 int wordexp(const char *__restrict
, wordexp_t
*__restrict
, int);
47 void wordfree(wordexp_t
*);
53 #endif /* _WORDEXP_H_ */